-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Look to implement page on-event tracking for google analytics to provide customer insights for Clima sub-pages #151
Comments
There a couple of ways to do this, but based on my research so far we may need to create additional GTMs and have the js called for certain functions.e.g when user clicks on tab. Some initial research so far - https://community.plotly.com/t/using-google-analytics-with-dash-app/62347 |
I've managed to get tracking on each of the clima subpages on my test clima by using Google tag manager. For each GTM tag, there is an 'on-click' trigger which matches the html click text for each tab. Example below. Each trigger is assigned to a specific GA4 GTM event tag. As users view each tab, each tag is fired and reported back into GA4 dashboards. See below. |
Hey @FedericoTartarini, please see above for what I've implemented in my non-prod clima. I am able to gather tracking of each clima tabs/pages using triggers and mapping them to GTM events. Let me know if you think/want this implemented in production Clima. |
It looks great, you can show me this during our next meeting |
Hey @FedericoTartarini, I think I found a more elegant way of doing this with GTM with pulling from the datalayer directly. I created a trigger to track click and fire when the class = "jsx-4020002479". Note - my original plan was to match using CCS selector but I've tried many ways to match the code including Regex and it just wont fire. Instead of an individual GTM tag per tab (in red below), we create one and configure the event parameters to return the click value from the datalayer {{Click Text}} This means if you were to add new tabs to Clima, you wouldn't need to setup a new tag (assuming the trigger conditions the same). Below are the event counts pushed into GA4. There only cons I do not like with the above is: |
@FedericoTartarini It would be valuable to get this up and running asap. I'll look into this. |
@t-kramer to implement this properly we need to change the code of clima and make sure that when a person clicks on a tab then the URL changes. To do so you will need to follow this guide https://dash.plotly.com/urls |
Is your feature request related to a problem? Please describe.
No relation to a problem, feature enhancement to allow greater user insights into clima pages used.
Describe the solution you'd like
When Clima sub-page is loaded, create event to google analytics
The text was updated successfully, but these errors were encountered: