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
647 stars 121 forks source link

Allow to use custom pageview url script for GoogleAnalytics tracker. #119

Closed Haerezis closed 6 years ago

Haerezis commented 6 years ago

Hi, we use your gem in our project and we need to track (with google analytics) the hash part of the url in the pageview event. We found a solution in this stackoverflow thread : https://stackoverflow.com/a/4813223 . I have simply added the option to the Google Analytics tracker for a custom pageview url script (which default to the old and normal url script).

I'm at your disposal if you need anything.

DonSchado commented 6 years ago

Hey @Haerezis thanks for your pull request! 💚 Could you add a simple spec around this? That would be awesome

Haerezis commented 6 years ago

I've added the spec as requested. Sorry for not doing it directly, I just forgot :/

bumi commented 6 years ago

nice! looks good to me and I think a good addition. thanks @Haerezis

(note: I am not too familiar with the google analytics API)

DonSchado commented 6 years ago

Thanks! :)