Integrate Kameleoon with Google Universal Analytics

Written by Julie Trenque

Updated on 01/04/2024

5 min

Advanced

Manage your integrations

Analytics

Automation

CDP

CMP

CMS/CRM

Data Warehouses

Developers

Was this content useful?

Universal Analytics has been Google Analytics (GA)’s data collection system since 2013. One big difference with the old version of Google Analytics is the replacement of custom variables by custom dimensions.

User benefits

Kameleoon has a major new enhancement to its integration with Google Analytics (GA):  a two-way read and write integration capability that uses the GA segment bridge.

The enhanced GA integration lets users send data to GA for analytics and retrieve data back into Kameleoon to create highly personalized campaigns and customer journeys, as well as trigger custom offers using your Google Analytics segments.

You can:

  • Personalize your homepage and/or landing pages based on the keyword the visitor searched for on Google.
  • Create automatic pop-ups and/or send emails to customers that have started, but not yet completed a purchase.
  • Incentivize users to subscribe, sign in, or create an account based on their login status. 
  • Cross-sell and upsell products and services based on various account types.

Enable Google Universal Analytics integration on Kameleoon

On the Integrations page

To use Google Universal Analytics, you must activate it on the Integrations page.

Log in to your Kameleoon App, click on Admin and then Integrations in the sidebar.

For more information on this page, see our article about it.

By default, the tool is not installed. This is signaled by this icon:

By clicking on Install the tool, you will be able to select the projects on which you want to activate it, so that information can be correctly reported to Google Universal Analytics.

Then you need to specify a tracking method.

  • UA Dimension is the recommended method. The transmission between Google Universal Analytics and Kameleoon is optimized: when needed, the custom dimension value will be sent with an event call. The Google Universal Analytics limit is 20 active custom dimensions for free accounts, and 200 for Google 360.
  • You can select the Event method if the maximum number of active custom dimensions (UA Dimensions) has been reached. However, the analysis is less straightforward with this method.

If you need to, you can also enter the UA Tracking ID you want Kameleoon to use. This option is useful in case more than one Google Universal Analytics account is configured on the same page (if not, leave the field empty).

You will find this Id in the source code of your website or in your Google Universal Analytics account (Admin > Property settings > Tracking Id).

You can choose to delay event calls in order to reduce the risk of data discrepancies between Kameleoon and Google Universal Analytics. To know more please read this documentation

You can also choose to use GA360.

Once you have configured the tool, click on Validate in the bottom-right corner: the configuration panel closes. You will then see an ON toggle to the right of the tool’s logo, as well as the number of projects the tool is configured on.

Additional configuration steps are required on both tools before running an experiment on Kameleoon and retrieving the data in Google Universal Analytics.

Please note that if you need to slightly change the behavior of our native bridge, you can create a custom analytics bridge and use our Universal Analytics sample code you can take from our Github repository.

Create a custom dimension

If you have chosen the UA Dimension transmission method, you must create this custom dimension in your Google Universal Analytics account.

Click on the ADMIN tab in the left sidebar.

Click on Custom definitions, then Custom dimensions.

Add a new custom dimension by clicking on the red button.

You have to use one custom dimension for each live experiment, otherwise your experiment names and variations will overwrite each other and your results will not be relevant.

Name your new custom dimension so you can easily identify it later on. Select the Session scope. The custom dimension box needs to be Active. Click on Create.

You will find it in the table listing all the custom dimensions created.

Using the index assigned to it by GA, you can link it with a Kameleoon experiment when configuring in your Kameleoon App.

Activate Google Universal Analytics on an experiment

In the Graphic editor

Once Google Universal Analytics is activated on the Integrations page and a custom dimension has been created, you can select it as a reporting tool at the Integrations step of the finalization panel.

Select the index of the custom dimension you created for your test in Google Universal Analytics.

This procedure must be followed for each new test with which you want to associate Google Universal Analytics.

On the Personalization creation page

In the same way as A/B testing, you can select Google Universal Analytics from the reporting tools for a personalization.

Select the custom dimension you created for your personalization in Google Universal Analytics.

On the results page

It’s also possible to select Google Universal Analytics from the reporting tools on the results page of an experiment or a personalization.

Select the custom dimension you created for your experiment in Google Universal Analytics.

On a feature flag

Learn how to manage third-party analytics integrations

Goal definition

If you want to compare data between Kameleoon and Google Universal Analytics goals, you must ensure that the configuration of the goal is the same between both platforms.

During your test, Google Universal Analytics will natively register all data about the visits on your site. It will also register all conversions made by a visitor (e-commerce transaction, clicks, etc.)

To see which variation had the best conversion rate, you must define segments based on the variation and experiment names or create a custom report.

Create a new goal

To do this, log in to your Google Universal Analytics account and select the ADMIN tab in the left-hand sidebar.

Once you have selected the property and the view, click on the Goals button.

Click on the NEW GOAL button to create a new goal for your experiment.

Goal setup

You need to create a Custom goal.

Click Continue.

Goal description

Then, define the type of goal. Several choices are available:

  • Destination: the display of pages or screens will be considered a conversion. Indicate the screen or the URL in the Destination field. It can be “equal to…”, “Begins with…” or a regular expression.
  • Duration: time spent on the page will be considered a conversion. The fields hours, minutes and seconds indicate the minimum duration for the time spent on the page to be a conversion. When a visitor exceed this duration, a conversion is generated.
  • Pages/Screen per session: the user’s interactions will be considered a conversion. To use this type of goal, you must configure at least one event.
  • Event: the number of pages or screens per session will be considered a conversion. When a user exceed the number you defined, a conversion is generated.

Click on Continue to define your goal details.

Goal details

Fill in the fields according to the chosen type of goal.

Click on Save to add your goal.

The goal is then added to the list and you can edit it or stop it from recording data.

You can create up to 20 goals per view.

Retrieve in Google Universal Analytics click tracking goals created in Kameleoon

The click tracking goals created in Kameleoon can be sent to external tracking tools, including Google Universal Analytics.

Go to the advanced settings of your click tracking goal and activate the option.

Define segments

A segment is a subset of your Google Analytics data.

Creating segments is the best way to analyze the results of your Kameleoon experiments in GA.

It’s preferable to create segments rather than custom reports.

It’s necessary to create a segment for each variation of your test, including the reference.

To set up a new segment, go to the ADMIN menu, click on Segments in the third column and then on the NEW SEGMENT red button.

Depending on the option chosen when integrating GA into Kameleoon, you can create a GA segment:

  • based on a custom dimension (UA Dimension);
  • or based on an event.

Name your segment. Include the word Kameleoon to make it easier to find it later, as well as the experiment name – variation name.

In the left-hand sidebar menu, click on Conditions.

If you have chosen the “UA Dimension” option

In the first dropdown, unroll the Custom Dimensions tab and select the previously created custom dimension you want to link your segment to.

Leave “contains” in the second dropdown.

In the field on the right, the autocomplete will allow you to find the custom dimension created and which contains the word “reference” or “variation x”.

Then click on Save to validate the creation of the segment.

If you have chosen the “Event” option

In the first dropdown, unroll the Event tab and select the event you want to link your segment to.

Leave “contains” in the second dropdown.

In the field on the right, the autocomplete allows you to find the event.

Then click on Save to validate the creation of the segment.

How to use a segment

You will then find it in the list of your segments and you can use it to filter data in GA visualization tools.

Once a segment is selected, it is used in all dataviz tools.

One by one, add the segments created from the variations of an experiment and compare the data collected.

  • In this article :