Skip to content

Instantly share code, notes, and snippets.

@emmanueltissera
Created December 4, 2015 10:56
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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