Adding event triggers for Google Analytics
You can add attributes to an Element and trigger events within Google Analytics.
Google Analytics must be set-up correctly on your website for Event attributes to work. You need the Google Analytics module installed on your website and setup with your UA code.
If you enable Google Analytics via Google Tag Manager, then events added with the Acquia Cohesion analytics tab will not work.
Accessing the analytics form
- Navigate to a page or template with the Layout canvas
- Double click on an Element to edit its settings
- Click on the ... ellipsis tab (shown in blue) and click on Analytics in the menu (shown in pink).
Add event attributes for Google Analytics
To add Event attributes and trigger them within Google Analytics:
- Within the Event attributes area select the action that will trigger the event in Google Analytics in the Trigger drop-down
- On click triggers the event if the user clicks on the Element. The Element does not have to be a link for this to work.
- On hover triggers the event if the user hovers over the Element. The Element does not have to be a link for this to work.
- On view triggers the event when the Element enters the browser viewport.
- Enter the attributes you want to send to Google Analytics in the Category, Action, Label and Value fields
Note that the Category and Action fields are required.
- Repeat steps 1 and 2 for multiple event triggers. To set multiple triggers click Add event attributes.
- Click Apply.
For more information on Google Analytics triggers and events, see the Google documentation.