- Track conversions in your mobile experiment so you can determine which variation won
- Create and track tap goals, view goals, and custom events (including revenue)
- Remove goals from an experiment or delete them entirely
Measuring success of your mobile experiment and tracking conversion events is easy with Optimizely. This article will help you set up and manage your experiments’ goals.
In the Editor, click Goals next to Start Experiment:
This brings up a list of the experiment's current goals. Web goals include engagement, clicks, and pageviews. Mobile goals include taps and views. You can track custom events (including revenue) across both of these platforms, as long as they're implemented both on your site and in your app.
To create a goal, click Create a New Goal in the Experiment Goals window.
The Create New Goal window appears. The default goal type is a custom event. If you want to change the goal type, select it from the Goal Type drop down menu.
For mobile experiments, there are main types of goals:
- taps (iOS and Android)
- views (iOS and Android)
- custom events (iOS and Android).
- (Revenue tracking (iOS and Android) is a special type of custom event. )
In addition to SDK installation, your app must be connected to Optimizely in order to create tap and view goals. You can add Custom Event goals without connecting to the Editor. Now, we’re ready to manage and create goals!
Tap Goals (iOS and Android)
Optimizely records a conversion for a tap goal every time a user taps a view on your page. Optimizely dynamically tags each view on each element in your app so visual edits can be made and events can be tracked. As long as Optimizely can detect and tag the view, Optimizely can detect when taps happen on that specific view. You will see the goal appear as viewId in the goal window once the goal triggered is detected.
Create a tap goal that tracks taps to the Sign In button of your app.
- Select Create a New Goal on the Optimizely mobile experiment page. The Create New Goal window appears.
- Select Tap as the goal type.
- Create your tap goal through one of two methods:
- Tap the Device Screenshot
On the device screenshot in the Create New Goal dialog, tap the desired event in your app. You want to track sign-in taps, so you tap the Sign In button.
- Use the View Selector
You can use the View Selector to set up a tap goal. Click View Selector at the bottom of the device screenshot and select the desired element.
- Tap the Device Screenshot
- Your tap event appears automatically for tracking in Optimizely.
- Add a name for the goal and click Create. (Or, if you are editing is an existing goal, click Save.)
The tap goal is added as an experiment goal.
When you start your experiment, this goal appears on the Results page as its own goal module. You can investigate the results for each goal through metrics: Uniques, Totals, and Lifecycle.
View Goals (iOS and Android)
Optimizely records a conversion event for a view goal every time a certain view appears. Unlike tap goals, which track smaller elements such as buttons and images, view goals track top-level views such as screen views.
You should set a view goal...
- when a user action that is not a tap, such as a swipe, results in a new view that you want to track.
- when tap goals may not accurately capture of the frequency of a conversion event due to the prevalence of user failure, such as form submissions that contain required fields.
Create a view goal. Instead of tracking the sign-in tap, which would capture all failed user login attempts, track views of the screen that appears after a successful login.
- On the Create New Goal window, select View as the goal type.
- On your mobile device or Simulator, go to your desired view. For this goal, track the view that appears immediately after a successful sign-in.
- Back in Optimizely, your view automatically appears as a tracked event.
- Add name for the goal, and click Save. The view goal is added as an experiment goal.
- When you start your experiment, this view goal gets its own goal module on the Results page, where you can gain an understanding of your users' behaviors.
You can use the custom events goal to track events and behavior other than taps and view changes. To do this, implement code directly into the appropriate View Controller file.
A few examples of custom events are:
- Deleting a task with a swipe
- Completing a purchase
- Receipt validation
Revenue Tracking Goals (iOS and Android)
The most popular custom event goal is revenue tracking for an experiment’s variations. Add revenue as a separate goal to be tracked properly.
- In the Experiment Goals dialog, click Add a Saved Goal.
- Hover over the Total Revenue module. Click Add.
The revenue goal is added to your experiment.
- To actually collect revenue data from your app, implement the goal in the appropriate location of your app’s code. Insert the following revenue tracking code within the appropriate ViewController file for your app. If you don’t know where to this file, check with a development expert on your team.
[Optimizely trackRevenue:(NSNumber *)];
Sharing, Removing, and Deleting Goals
You can share common goals across different experiments in the same project, without having to recreate them. To add a goal that you already created, click Add a Saved Goal. A list of your saved goals appears. Hover over any of the goals in the list and choose Add to add it to the experiment.
You can remove a goal by clicking Remove when you hover over the goal on the Results page or in the Goals window. "Removing" a goal only removes the goal from one experiment. Delete removes the goal from ALL experiments and past data collected for that goal will no longer be visible. Edit lets you edit the selected goal.