jkrall / analytical

Gem for managing multiple analytics services in your rails app.
MIT License
381 stars 93 forks source link

Update Google Analytics Tracking Code #75

Closed Epiju closed 10 years ago

Epiju commented 10 years ago

Hi!

I'm using analytical in my application but I have to update the google analytics tracking code (https://support.google.com/analytics/answer/2444872?hl=en&utm_id=ad). How can I do that?

Thanks!

sfsekaran commented 10 years ago

Have you tried overriding the google analytics embed code with your custom variation?

pejmanjohn commented 10 years ago

I'm facing the same issue. How does one override the embed code?

The update is changing this line: ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';

To this: ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';