Tracking Clicks on ContentAi bar within Google Analytics | Community
Skip to main content
Level 2
August 10, 2018
Question

Tracking Clicks on ContentAi bar within Google Analytics

  • August 10, 2018
  • 2 replies
  • 3233 views

Hello,

I am working on tracking clicks on our ContentAi bar in Google Analytics using Google Tag Manager. We are using the standard ContentAi bar, so I set up the trigger as a click on "all elements" with the filter of class = instightera-bar-content. When testing I can not make this fire correctly. We have many different pieces of content that will be served through ContentAi, so I want to use just this one tag and not a "click URL" trigger for each individual link. Has anyone experienced this problem before or have any suggestions for how to troubleshoot it?

Thank you,

Adam

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Yanir_Calisar2
Level 2
August 11, 2018

Hi @Adam Wingate​,

A long time ago I published this post: http://developers.marketo.com/blog/send-rtp-recommendation-engine-clicks-to-google-analytics/

Since you're using GTM this method of sending events to GA won't work, but what you'll need to do is to create a data layer instead with the event attributes and then use it in GTM to trigger the event.

Something like:

window.dataLayer = window.dataLayer || [];

window.dataLayer.push({

'assetName': 'some name',

'assetURL': 'someurl.com/abc'

});

arw90Author
Level 2
August 13, 2018

Hi Yanir,

Great thank you for getting back to me. This will be helpful in building our tracking.