All threads / How to use Google Analytics gtag.js with Turbolinks & Webpacker Discussion

Ask A Question

Notifications

You’re not receiving notifications from this thread.

How to use Google Analytics gtag.js with Turbolinks & Webpacker Discussion

Are you using GA for the public parts of GoRails or are you also using it for the authenticated parts of GoRails too?

Reply

Thank you for yet another amazing and informative tutorial!
I found that in Rails 6.1.3 with Turbo (rather than Turbolinks), I needed to replace "page_location: event.data.url" with "page_location: event.detail.url". (data -> detail).

Reply
Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 48,387+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2021 GoRails, LLC. All rights reserved.