Skip to content

Instantly share code, notes, and snippets.

@emmanueltissera
Created December 4, 2015 10:56
Show Gist options
  • Save emmanueltissera/f9997ba241f59efb6bb2 to your computer and use it in GitHub Desktop.
Save emmanueltissera/f9997ba241f59efb6bb2 to your computer and use it in GitHub Desktop.
Excluding internal traffic in Google Tag Manager (setting a cookie)
@{
Response.Cookies["ignorePageViews"].Value = "true";
Response.Cookies["ignorePageViews"].Expires = DateTime.Now.AddYears(10);
<i>Cookie set to ignore page views.</i>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment