railslove / rack-tracker

Tracking made easy: Don’t fool around with adding tracking and analytics partials to your app and concentrate on the things that matter.
https://www.railslove.com/open-source
MIT License
648 stars 121 forks source link

Same property ID tracked twice #69

Closed papeng closed 7 years ago

papeng commented 8 years ago

Hi there In one of our projects I replaced the traditional google-analytics tracking-snippet with the rack-racker gem:

Like in the ReadMe, I added this:

config.middleware.use(Rack::Tracker) do
    handler :google_analytics, tracker: ENV['GOOGLE_ANALYTICS_ID'], anonymize_ip: true, advertising: true
end

to my production.rb

To get it working with Turbolinks, I also had to add the position: :body option.

Now, when I check the page with the Google Tag Assistant Add-On for Chrome, it complains about the property being tracked twice:

screen shot 2016-04-06 at 17 19 09 (The more pages you visit, the more duplicated properties are shown in the addon)

Is it really an issue or something, which can be ignored? Thanks in advance

bumi commented 7 years ago

Thanks for reporting the issue and sorry for the late reply. rack tracker actually supports turbolinks so that should not be an issue and the page view should only be tracked once. I can not reproduce this issue right now. Can you please check again if you still have this issue and if so open this issue again? thanks.