Tracking page views with Google Analytics and Backbone
Single page apps are make it tricky to track page views with google analytics.
Here is a simple way to do just that with Marionette, Backbone, and Backbone.RouteFilter
class window.Router extends Backbone.Marionette.AppRouter
....
after: ->
_gaq?.push(['_trackPageview', Backbone.history.fragment])
Written by Sam Saccone
Related protips
1 Response
Tell us something we didn't already know why don't you...
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Coffeescript
Authors
iam4x
94.17K
ericdfields
63.02K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#