Created
May 27, 2011 16:41
-
-
Save googleanalyticsresoneo/995643 to your computer and use it in GitHub Desktop.
Ignorer des referrals sur la base d'une regexp
This file contains 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
/* http://www.roirevolution.com/blog/2011/01/google_analytics_subdomain_tracking.php */ | |
/* Ignorer les possibles affluents sur des domaines matchant une regex */ | |
try{ | |
if ( /vols\d{0,2}\.thomascook\.fr|www\.thomascook\.fr|booking\.thomascook\.fr|enwi\.norrisdata\.net|ypsilon\.net/.exec(document.referrer) ) { _gaq.push(['_addIgnoredRef', document.referrer.split('/')[2].split('.')[1]]); } } catch(e){} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment