Google Analytics

Google Analytics is a freemium web analytics service offered by Google that tracks and reports website traffic, currently as a platform inside the Google Marketing Platform brand. Apptimize integrates with Google Analytics by automatically importing the following for iOS and Android:

  • Events

Currently, we do not automatically import user ID’s or properties. You are also able to use the Apptimize TestInfo API and our participation callbacks to forward your experiment data to Google Analytics. Please see our data export guidelines for more information on how to set this up.

Note that we now also support automatic importing of Firebase Events and User properties.

Automatic Event Importing

Apptimize detects Google Analytics Events and automatically imports them for use as Goals within your Apptimize Experiments. Apptimize does not support event properties so please note that your events will only be imported with their names.

In order for the import to take place, you will first need to trigger your events in a live experiment. We recommend running an A/A test in your app so that you can successfully have all existing events triggered, without affecting your end-users. Once experiment results are posted from your A/A test, you will see your Google Analytics Events listed as selectable goals for use in your future experiments.

Google Analytics Events that have been automatically imported from Google Analytics will appear with the prefix “ga:” in your Goals like so:


Managing User IDs and Properties

Apptimize does not currently automatically import your Google Analytics User ID or properties; however, we recommend installing the latest version of the Appitmize SDK and using our User Identification methods where you set your Google Analytics User ID to ensure variant consistency.

If there are any user profiles or properties you wish to use for targeting in Apptimize, please set these up as Custom Attributes.

Exporting Experiment Data

Apptimize maintains a TestInfo API which can be used to manually export Apptimize experiment results data to Google Analytics. Here are links to the documentation of this API:

Calling TestInfo will return a map of the following info for all actively running tests:

  • Experiment Name

  • Variant Name

  • Experiment ID

  • Variant ID

  • Enrollment in Experiment Date

  • Start Experiment Date

  • User has Participated since Enrollment

This data provides comprehensive detail around the user’s experiment participation, and can be parsed and/or passed along to Google Analytics or any other third party as you please.

As an example, your output might look like:

testinfo: {
 "New Experiment" = "Variant \"original\" (157581) of test \"New Experiment\" (11452),
 enrolled since 2015-06-06 01:15:56 +0000 (started on 2015-06-06 00:47:15 +0000)";

For additional details and sample implementation, please see our Data Export documentation page.