Skip to main content
Version: 1.0.0

Goal Friction Impact (GFI) Tracking in Android with Appxiom SDK

Manual Integration: Define goals and track user completion rates with two simple API calls.

Appxiom SDK's Goal Friction Impact (GFI) feature enables you to track user journeys through critical app flows and understand how bugs and performance issues impact your business metrics. Define goals for key user flows like signup, purchase, onboarding, or any other, and Appxiom will monitor completion rates, identify friction points, and calculate customer loss when issues occur.

How Goal Friction Impact Works

GFI transforms traditional bug reporting into business intelligence:

  • Define Goals: Mark the start and end of important user flows
  • Track Completion: Monitor how many users successfully complete each goal
  • Identify Friction: Detect when crashes, freezes, API failures or any other issues interrupt user journeys
  • Measure Impact: Calculate completion rates, drop-off points, and potential customer loss
  • Prioritize Fixes: Focus on bugs that have the highest business impact

Implementing Goal Tracking

Use the beginGoal() and completeGoal() methods to track user journeys through your app's critical flows.

Starting a Goal

// Start tracking a signup goal
Long goalId = Ax.beginGoal(this, "user_signup");

// Start tracking a purchase goal
Long checkoutGoalId = Ax.beginGoal(this, "checkout_process");

// Start tracking an onboarding goal
Long onboardingGoalId = Ax.beginGoal(this, "user_onboarding");

Completing a Goal

// Complete the signup goal
Ax.completeGoal(this, goalId);

// Complete the checkout goal
Ax.completeGoal(this, checkoutGoalId);

// Complete the onboarding goal
Ax.completeGoal(this, onboardingGoalId);

Example: Tracking a Signup Flow

Here's how to implement GFI for a typical user signup process:

public class SignupActivity extends AppCompatActivity {
private Long signupGoalId;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_signup);

// Begin tracking the signup goal
signupGoalId = Ax.beginGoal(this, "user_signup");
}

private void onSignupSuccess() {
// User successfully completed signup
Ax.completeGoal(this, signupGoalId);

// Navigate to next screen
startActivity(new Intent(this, DashboardActivity.class));
}

private void onSignupFailure(String error) {
// Goal will automatically be marked as incomplete
// Appxiom will track this as a friction point
Log.e("Signup", "Signup failed: " + error);
}
}

Best Practices for Goal Tracking

1. Choose Meaningful Goals

  • Focus on business-critical user flows
  • Track complete end-to-end journeys
  • Use descriptive goal names

2. Strategic Placement

  • Call beginGoal() at the start of the user flow
  • Call completeGoal() only when the user successfully completes the entire journey
  • Don't call completeGoal() for partial completions

3. Goal Naming Convention

Important: Goal names are automatically filtered and have the following restrictions:

  • Only alphanumeric characters (A-Z, a-z, 0-9) and underscores (_) are allowed. All other characters are removed.
  • Maximum length is 64 characters. Names longer than 64 characters will be truncated.
// Original goal name → Filtered goal name
"user_registration_flow" → "user_registration_flow" // Underscores preserved
"premium-subscription-purchase" → "premiumsubscriptionpurchase" // Hyphens removed
"first.time.user.onboarding" → "firsttimeuseronboarding" // Dots removed
"user@signup#flow" → "usersignupflow" // Special characters removed

// Length limit example
"very_long_goal_name_that_exceeds_the_maximum_allowed_length_limit_of_64_characters_will_be_truncated"
→ "very_long_goal_name_that_exceeds_the_maximum_allowed_length_li" // Truncated at 64 chars

Best Practices:

// Good: Descriptive, specific, and under 64 characters
Ax.beginGoal(this, "user_registration_flow");
Ax.beginGoal(this, "premium_subscription_purchase");
Ax.beginGoal(this, "first_time_user_onboarding");

// Will be automatically filtered
Ax.beginGoal(this, "premium-subscription-purchase"); // → "premiumsubscriptionpurchase"
Ax.beginGoal(this, "first.time.user.onboarding"); // → "firsttimeuseronboarding"

// Avoid: Vague, too granular, or excessively long
Ax.beginGoal(this, "button_click");
Ax.beginGoal(this, "action");

Frequently Asked Questions (FAQ)

Q: How do I enable Goal Friction Impact tracking in my app?
A: Simply call beginGoal() and completeGoal() to track user journeys.

Q: Does GFI tracking work in both debug and release builds?
A: Yes, GFI tracking works in both debug and release builds, allowing you to monitor goals during development and in production.

Q: Can I track multiple goals simultaneously for the same user?
A: Yes, you can track multiple goals concurrently. Each beginGoal() call returns a unique ID that you use with completeGoal().

Q: Are there any restrictions on goal names?
A: Yes, goal names have two restrictions: 1) They are automatically filtered to contain only alphanumeric characters (A-Z, a-z, 0-9) and underscores (_). Other special characters, spaces, and symbols are removed. For example, "user-signup.flow" becomes "usersignupflow", and "user_signup_flow" remains unchanged. 2) Maximum length is 64 characters - names longer than this will be truncated.

Q: What happens if I don't call completeGoal() for a started goal?
A: Then that goal will be tracked as a incomplete, causing inconsistent data to be displayed in Appxiom dashboard.

Q: Can I see goal data in real-time?
A: Yes, goal analytics are available in the Appxiom dashboard in near real-time where you can view data as they are synced from the app.

Q: Can I use GFI with other analytics tools?
A: Yes, GFI can be used alongside other analytics and conversion tracking tools without conflicts.

Q: How do I handle goals that span multiple activities or fragments?
A: Store the goal ID in a shared location (like a singleton, or view model) and pass it between activities to call completeGoal() when the entire flow is finished.