Skip to content

Instantly share code, notes, and snippets.

@rogeruiz
Created March 28, 2012 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rogeruiz/2229735 to your computer and use it in GitHub Desktop.
Save rogeruiz/2229735 to your computer and use it in GitHub Desktop.
_getTrackingInfoPlease
_getPage: function(){
var self = this;
// let's store the current window location for later
var _currentLocation = this.url.matchPath.exec(this.url.current)[0],
_matchedLocation = ''; // need this for storage for later
// if (window.console) { console.log(FER.Config.gaq._trackPageview); }
// return void;
var _page = FER.Config.gaq._trackPageview,
_currentPage = []; // need this for storage later
for (_route in _page) { // alright, hold on tight & let's loop
_currentPage = _page[_route];
(function(_r){
if (_currentLocation === _currentPage[(_currentPage.length - 1)]){
_matchedLocation = _currentPage;
}
})(_currentPage);
} // loop is done
return _matchedLocation;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment