Content Tracking Click on class

(emabu) #1

I am trying to set up a tracking event when ever a user clicks on a link on my most-read-articles-module on my homepage, but seemingly I made a mistake. I set up an event tracking type with a trigger that should fire whenever someone clicks (click element) on the css class of the module (most-read-articles), but it does not seem to work. Am I using the wrong approach here?
Thanks for the help!

(Dave Cranwell) #2

Have you created a tag which has that new trigger named as one of its firing scenarios?

When you created a Tag there is a field labeled “Execute this tag when any of these triggers are triggered.”. The trigger you’ve just created needs to be listed as one of the triggers for the tag.

As I understand it, you need to create both a trigger and a tag for every event you want to track.

In the non-tag-manager version of Matomo you’d have fired a trackEvent call, which you’d have to manually bind to the triggering element (with javascript’s addEventListener or similar). In Tag Manager you have to perform that bind by creating a Trigger and create a new Tag to replicate the previous call to trackEvent.

It’s quite tedious.

(emabu) #3

Yep, I did how you have described it.
I created an event tag with a trigger that should fire when “click on class” contains “most-read-articles”, but it does not.