Skip to main content

Add Siteimprove Event Tracking in Google Tag Manager (GTM)

By Aleksandra Nowak

You can add Siteimprove Event Tracking using Google Tag Manager (GTM) by following few simple steps:

1. Ensure that Siteimprove script is on all your pages (without it tracking will not work)

2. Go to your GTM and add new Custom HTML tag

3. Add trigger 'All pages', so that the code you write will be available on all your pages with GTM script

4. In Custom HTML tag ensure that you chose 'Tag firing options': 'Unlimited'

5. Create your tracking Javascript code

a) Enclose it in <script type="text/javascript"> ... </script> tags

b) You might want to create a function that will be run on pageload:

(function(){ ...  })()

c) If you can use jQuery, use on() function to write your event tracking - you can find more details on http://api.jquery.com/on/

d) Send daya to Siteimprove using

_sz.push(['event', 'Some category', 'Some Action', 'Some label']);

where:

'Some category' - here put text in quotation marks, it can be any category descriptive to you. We usually use categories like 'Button', 'Accordion', 'Video'

'Some Action' - here put text in quotation marks, it can be any action descriptive to you. We usually use actions like 'Click', 'Open', 'Play'

'Some Label' - here put text in quotation marks. We usually use text in elements that are clicked by user - if it is video, then video title, if it is link, then text in this link, etc.

Was this article helpful?
0 out of 0 found this helpful