Follow

Sharing data with Google Classic Analytics

About this page

This page is about how to share Experiment results with Google Classic Analytics.

Sharing data with Google Classic Analytics

To share information with Google Classic Analytics, prepare these steps:

  • Set up Google Classic Analytics
  • Set up Kaizen Platform
  • Edit the HTML

Set up Google Classic Analytics

First, create a new Custom Variable in your Google Classic Analytics-account. From the left side menu, select Audience,Custom and Custom Variables to do this. You will get an Custom Variable Key. Input that Key into our Custom variable key number-field.

Set up Kaizen Platform

Select Edit Experiment and next the More Options-tab.

Look for the 3rd Party Integrations, which includes a section on Google Classic Analytics. Tick the box to link. Input your Google Classic Cutsom Variable into the Custom variable key number-field. Click Save when completed.

When using a modified tracking code and name, please enter that name in the Custom tracker-field.

In this example the Custom tracker-name is tracker2.

var _gaq = _gaq || [];
_gaq.push(['tracker2._setAccount', 'UA-XXXXX']);
_gaq.push(['tracker2._setDomainName', 'foo.com']);
_gaq.push(['tracker2._trackPageview']);

To implement this function, add the Google Classic Analytics JavaScript snippet to the page HTML.

Edit the HTML

To start sharing Experiment data, the following JavaScript snippet needs to be input in the page HTML:

try { kzs("activateGoogleAnalytics"); } catch(e) {}

Where to position the snippet:

  • After the Kaizen Platform JavaScript snippet
  • After var _gaq = _gaq || [];
  • Before _gaq.push(['_setAccount', 'UA-XXXXXX']);

HTML example:

<script data-kz-key="XXXXXXXXX"
  data-kz-namespace="kzs"
  src="https://cdn.kaizenplatform.net/s/7e/ZZZZZZZ.js"></script>
<script type="text/javascript">
  var _gaq = _gaq || [];
  try { kzs("activateGoogleAnalytics"); } catch(e) {}
  _gaq.push(["_setAccount", "UA-XXXXXX-Z"]);
  _gaq.push(["_trackPageview"]);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? '//ssl' : '//www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>

Example of Experiment data send to Google Classic Analytics:

  • Visitors come to the Experiment URL
  • The Experiment ID for this test is 100134
  • The Variation ID for the applied Variation is 102256
  • The Custom Dimension for this Experiment is Exp_100134_Variation_102256

Where to find the details:

  • The name and ID of the original design in the list of Variations, is Original design with the value -1
  • The Experiment ID is stated before the Experiment name, at the top of the page once an Experiment is selected

  • The design Variation ID is stated at the top of each thumbnail, on the Report and Variations-tbs.

  • The Custom Dimension is set only on the testing page.
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.