Last active
December 20, 2015 00:19
-
-
Save daveyoon/6041038 to your computer and use it in GitHub Desktop.
Installing google universal analytics into a backbone application
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
initialize: -> | |
@bind 'all', @track_pageview | |
track_pageview: -> | |
url = Backbone.history.getFragment() | |
ga('send', 'pageview', "/#{url}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment