Open viktorzimmermann opened 5 years ago
@viktorzimmermann sorry that this got lost... do you have an update on this from your side?
I'm at the exact same point, I can't make it work 🤯 Did you find a solution to this after all @viktorzimmermann ?
Unfortunately I still didn't find any solution. 🙄
At the same point now myself. Renders rack-tracker useless for me sadly.
sorry, sadly I can not really help here. Any ideas on how to fix this are welcome.
We released a hotwire/turbo related change, maybe you can check this out: https://github.com/railslove/rack-tracker/pull/160/files
It looks like GTM with turbolinks: true (#88) works only for pushing basic page view to the Data Layer:
handler :google_tag_manager, container: 'GTM-123456677', turbolinks: true
which will render in HEAD section:
Turbolinks will not duplicate this script tag on other page views because it's always exactly the same.
However, when user navigates to another controller (with Turbolinks) where I call something like this:
...I end up with two script tags in HEAD section:
This unfortunately creates duplicate pageviews in Analytics etc.
Am I doing something wrong or this is a real issue? Thanks! :)