Push Convert data to GA using Custom Dimensions or Custom Variables
If you want to push Convert data to legacy Google Analytics (Classic Analytics ga.js) using Custom Variables, you can do it like this:

Tips
Integrate Convert with legacy Classic Analytics ga.js: Use the Experiment Settings and enable the integration with GA by assigning a specific GA Custom Variable.
If you want to push Convert data to Google Analytics (Universal Analytics analytics.js or Global Site Tag gtag.js) using Custom Dimensions, you can do it like this:

Tips
Integrate Convert with GA (analytics.js or gtag.js): Use the Experiment Settings and enable the integration with GA by assigning a specific GA Custom Dimension.
Push Convert data to GA using GTM Data layer
If you want to push Convert data to Google Analytics (Universal Analytics analytics.js or Global Site Tag gtag.js) using the Google Tag Manager Data layer you can do it like this:

Tips
Use GTM datalayer to push Convert data to GA: Create a GTM tag and define the appropriate variables and dimensions to push Convert data to a specific GA Custom Dimension.
If you want to push Convert data to Google Analytics 4 using the Google Tag Manager Data layer you can do it like this:

Tips
Use GTM datalayer to push Convert data to GA4: Create a GTM tag and define the appropriate event parameters to push Convert data to a specific GA4 Custom Dimension.
Push Convert data to GA using Event Tracking
However, there might be a case where you do not want to touch your GA Custom Dimensions or Variables or the GTM Data Layer. In that scenario, you can use GA Event Tracking. Depending on the version of GA that you use, find some useful documentation here on the commands that you should use:
- Event Tracking in GA Legacy (ga.js): https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide
- Event Tracking in Universal Analytics (analytics.js): https://developers.google.com/analytics/devguides/collection/analyticsjs/events
- Event Tracking in GTAG (gtag.js): https://developers.google.com/analytics/devguides/collection/gtagjs/events
- Event Tracking in GA4: https://developers.google.com/analytics/devguides/collection/ga4/events
Then you can view Convert data inside GA through Events reports.
Below we describe how this is possible in Universal Analytics (universal.js), Global Site Tag (gtag.js) and in Google Analytics 4.
Event Tracking in Universal Analytics (universal.js)
Add Global Project Javascript
Go to your Convert Project Configuration and under Global Project Javascript add the code:
/* Push Convert data to GA (Universal Analytics) with Event Tracking */
setTimeout(function(){
if (ga){
var exp = convert.currentData.experiments;
var number_of_experiments = Object.keys(exp).length;
var loop_counter = 0;
var reporting_string = '';
for (var expID in exp){
reporting_string = reporting_string + 'e:' + expID + '=' + 'v:' + exp[expID].variation_id;
if (loop_counter < (number_of_experiments - 1)) {
reporting_string = reporting_string + '|';
}
loop_counter++
}
var trackername = window.ga.getAll()[0].get("name");
ga('create', trackername, 'auto');
ga(trackername+'.send', 'event' ,'Convert', reporting_string, true);
}
},1000);
/* End of code*/
- If you use ga.js, then you have to use _gaq.push.
- If you use analytics.js, you need to use ga('send'...) like in the code example above.
- If you use gtag.js you should use the syntax with gtag('event'...and add Action, Category, Label, Value)
- if you use GA4 you should use the new syntax with gtag('event'... and adding up to 4 parameters).
View Convert Data in GA
Once the experiment runs, you can go to Real Time> Events and see the Convert data:
Event Tracking in Global Site Tag (gtag.js)
Add Global Project Javascript
Go to your Convert Project Configuration and under Global Project Javascript add the code:
/* Push Convert data to GA (Global Site Tag) with Event Tracking */
setTimeout(function(){
if (gtag){
var exp = convert.currentData.experiments;
var number_of_experiments = Object.keys(exp).length;
var loop_counter = 0;
var reporting_string = '';
for (var expID in exp){
reporting_string = reporting_string + 'e:' + expID + '=' + 'v:' + exp[expID].variation_id;
if (loop_counter < (number_of_experiments - 1)) {
reporting_string = reporting_string + '|';
}
loop_counter++
}
gtag('event', 'Convert', {'event_category':reporting_string, 'event_label':'true'});
}
},1000);
/* End of code*/
- If you use ga.js, then you have to use _gaq.push.
- if you use GA4 you should use the new syntax with gtag('event'... and adding up to 4 parameters).
View Convert Data in GA
Once the experiment runs, you can go to Real Time> Events and see the Convert data:
Event Tracking in Google Analytics 4 (GA4)
Add Global Project Javascript
Go to your Convert Project Configuration and under Global Project Javascript add the code:
/* Push Convert data to GA4 with Event Tracking */
setTimeout(function(){
if (gtag){
var exp = convert.currentData.experiments;
var number_of_experiments = Object.keys(exp).length;
var loop_counter = 0;
var reporting_string = '';
for (var expID in exp){
reporting_string = reporting_string + 'e:' + expID + '=' + 'v:' + exp[expID].variation_id;
if (loop_counter < (number_of_experiments - 1)) {
reporting_string = reporting_string + '|';
}
loop_counter++
}
gtag('event', 'Convert', reporting_string);
}
},1000);
/* End of code*/
View Convert Data in GA
Once the experiment runs, you can go to Real Time> Events and see the Convert data.
Comments