I’m trying to set up tag manager so that in addition to a tag for Matomo Analytics of pageviews, I can record clicks on arbitrary bits of UI.
So as I understand it, if I want to record events on a modal box’s closing “X” button, I need to:
- Create an “All Elements Click” trigger, where “Click Element” “Matches CSS Selector”: “.modal__close”
- Create a tag for Matomo Analytics of Events in which I define modal-closing-specific event category/name/value etc.
In step 1 I called my All Elements Click trigger “Modal closed” and I basically want this name to be the “Event name” I use in my tag setup for step 2.
This way I’d only need to set up one Matomo Analytics Event tag, and I could specify multiple triggers - one for each bit of UI I want to track - which each get to trigger it.
I can’t work out how (or if it’s even intended) to use the name of the trigger to populate the event. The option isn’t there to choose from.
Without being able to do this, it looks to me like I’d have to configure a pair (a Trigger and a new Matomo Analytics Events Tag) for every single custom event I want to record. e.g
new Trigger: Modal open
new Tag: Matomo Analytics Events tag - category “Modal” acton: “open”
Trigger: Modal close
Tag: Matomo Analytics Events tag - category “Modal” acton: “close”
Trigger: Menu open
Tag: Matomo Analytics Events tag - category “Menu” acton: “open”
Trigger: Menu close
Tag: Matomo Analytics Events tag - category “Menu” acton: “close”
I’ve got about 30 UI sections I want to track like this and it seems so avoidable repetitive I’m sure I’m doing something wrong?
Any help would be appreciated