Follow

Tracking Pixel - Google Analytics

 

Sumo supports all forms of Tracking Pixels, and a popular one is Google Analytics. Watch "Real Time" tracking events and view Google Analytic reports of your Sumo Pro Apps in action!

Google Analytics Official Documentation

This document assumes you already have a Google Analytics account with your website setup. If not, you should get started :) https://www.google.com/analytics/

For an in depth understanding of Google Analytics please review them here:

Universal Analytics - ANALYTICS.JS:

GA.JS (Legacy):

Creating Your Google Analytics Event Code

Here is the Base code you can start with, which we've taken from Tracking Site Activity, with the method changed to reflect Event tracking:

analytics.js Method:

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-58864127-2', 'auto');
ga('send', 'event', 'category', 'action', 'label');
</script>

ga.js Method (legacy):

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXXX-Y']);
_gaq.push(['_trackEvent', 'Category', 'Action', 'Label', 'Value']);

(function() {
   var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
   ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
   var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>

UA-XXXXXXX-Y must be replaced with the Property ID for the Google Analytics Property you wish to track. You can find it by logging into Google Analytics > Admin > Property Settings

You must set your own Tracking information:

_gaq.push(['_trackEvent', 'Category', 'Action', 'Label', 'Value']);

Tracking Example - analytics.js: ga('send', 'event', 'category', 'action', 'label');

Tracking Example - ga.js (legacy): _gaq.push(['_trackEvent', 'Sumo', 'Popup', 'List Builder']);

For Category we selected Sumo. for Action we selected Popup because that is the event. For Label we're using List Builder because that is the App. Value is not necessary, this example does not make use of it.

You can use any combination of Category, Action, and Label. As long as you have the Category and Action your tracking event is ready.

Conversion Example - analytics.js: ga('send', 'event', 'category', 'action', 'label');

Conversion Example - ga.js (legacy): _gaq.push(['_trackEvent', 'Sumo', 'Conversion', 'List Builder']);

Here we replace the Action from Popup to Conversion as the action is the confirmation of the subscription and not just the activation of the popup, which is tracked in the previous example.

** For Conversion Pixel, you only need to call the single _trackEvent line within your script:

analytics.js:

<script>
ga('send', 'event', 'category', 'action', 'label');
</script>

ga.js (legacy):

<script type="text/javascript">
_gaq.push(['_trackEvent', 'Category', 'Action', 'Label', 'Value']);
</script>

Implementing Your Google Analytics Event Code

While our example is List Builder 2, Sumo supports Tracking in the following Apps:

  • List Builder 3
  • List Builder 2
  • Scroll Box
  • Smart Bar
  • Contact Form

In your Sumo Home click on any of the corresponding Apps. Click on the "Tracking Pixel" tab. Paste your Tracking and Conversion Pixels. Don't forget to Save :)

List Builder 3 Click/Subscribe Pixels

In List Builder 3, you'll find Conversion Pixels split into two categories: Subscribe Pixels and Click Pixels.

Subscribe Pixels - This is where you'll put your Conversion Pixel code if you want it to fire when the user has made an email submission on your popup. It won't fire if your popup has a Call to Action button that the visitor clicked on.

Click Pixels - This is where you'll put your Conversion Pixel code if you want it to fire when the user has clicked on a Call to Action button in your popup. If you have multiple Call to Action buttons, it will only fire on the first one clicked.

Monitoring and viewing your Google Analytics

Now that your event codes are in place you can verify your tracking and conversion pixels are working. Go back to your Google Analytics Page(link: https://www.google.com/analytics/web/) and access the Property that is assigned to your pixels.

For Real Time tracking click on Real-Time > Events

Now load up your site in a Google Chrome Incognito Window or a Privacy Mode window in your preferred browser and fire your Popup and watch your Real Time Data roll in.


In a few moments you will be able to also view all this data in your reports. Click on Behavior > Events > Overview


Here you can see Your Event data by Category, Action, and Label. You can also take a look at the other tabs to see awesome information your Tracking Pixels are generating.

Was this article helpful?
1 out of 2 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.