Priority: Must have
Affects Version/s: None
Fix Version/s: None
Epic Name:Implement new standard events on clicks
P4 site:All sites
Last year we started implementing a few click events on Planet 4 elements for design iteration and testing. We selected a few websites and implemented the click events via Google Tag Manager, most often based on elements IDs or classes.
We now need to implement these events on all Planet 4 websites. We should use a different methodology to be more accurate on the tracking and make the implementation easier (on all P4-NRO’s Google Tag Manager containers).
We should implement dataLayer events on the elements/blocks that are already partially tracked (Navigation, Call to Actions, Columns Blocks) and on those required by the Design Team (Search Page).
As suggested by Pieter Vincent and Sagar Deshmukh, we can work with data-* attributes instead of dataLayer events. This should facilitate the implementation while also allowing some more flexibility when setting up the events tags in Google Tag Manager.
The idea is to implement a set of new data attributes with standard values. These will be used later to trigger events and define its category, action and label.
- Example: See image attached for using GTM's dataLayer variable to extract data attributes (gtm.element.dataset.target)**
- Review existing event standards and find the best implementation methodology: --
- Create development tasks for implementing dataLayer on the different elements/blocks:
- Implement the new changes on “P4 - GPI” Google Tag Manager container as a pilot
- Update Global Property documentation and the standards used
- Implement changes on all P4-NRO’s Google Tag Manager containers (create a new workspace and ask NRO’s to review/publish).
- Create an internal dashboard to monitor the event’s standards