Skip to main content

Android Goals API

The OpenBack SDK can be used to track Goals. These can range from anything such as a user completing a signup process, to a user purchasing a product.

Every goal on the dashboard has six components:

  • Goal Code - This is a unique identifier for each goal.
  • Goal Name - A name to easily distinguish between each goal.
  • Goal Description - A short description of what the goal achieves.
  • Number of Steps - The number of steps required for the goal to be completed. For example, step 1 is a user viewing a product, step 2 is the user adding the product to their cart. Step 3 and goal completion is the user purchasing the product.
  • Conversion Window - The length of time after a notification is received that it can be attributed to a goal completion.
  • Default Goal Value - This sets how much the goal completion is worth.

Logging a Goal

Logging a goal within the SDK has 4 parameters:

  • Goal code - The goal code that you defined within the dashboard.
  • Step number - The step in the goal process being tracked.
  • Goal value - The value of the goal completion.
  • Goal currency - The currency of the goal value. currently USD only
note

USD is currently the only supported currency.

OpenBack.logGoal("checkout", 1, 42.3);

OpenBack.logGoal("checkout", 1, 42.3, "USD");
Parameters
goalStringThe achieved goal.
stepIntegerThe goal step number.
valuefloatThe value associated with the goal step.
currencyStringThe currency code (ISO 4217)