Permalink
Browse files

Tracker.path() by GA

  • Loading branch information...
1 parent f26b748 commit 9e20697041680e8629000680542cbc61426c0f7d @peter-leonov committed Oct 18, 2011
Showing with 18 additions and 0 deletions.
  1. +18 −0 src/modules/tracker-ga.js
View
18 src/modules/tracker-ga.js
@@ -27,6 +27,24 @@ var Me =
// to warn the developer
log('could not report an event')
}
+ },
+
+ path: function (path)
+ {
+ try // to track an event
+ {
+ // prepare types
+ path = String(path)
+
+ log('path' + ': ' + path)
+ GoogleAnalytics.push(['_trackPageview', path])
+ return true
+ }
+ catch (ex)
+ {
+ // to warn the developer
+ log('could not report a path')
+ }
}
}

0 comments on commit 9e20697

Please sign in to comment.