5cmida
Last Updated: February 25, 2016
·
2.56K
· samccone
41041169880bec75fbe51de48443cefb

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])
Say Thanks
Respond

1 Response
Add your response

12173
Cf8a610127d1108dfe67f673320b5fe5

Tell us something we didn't already know why don't you...

over 1 year ago ·