lfischer

Wehkamp - Deduplication for sub domain

Aug 21st, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2.     var date = new Date(); //current date to create the cookie
  3.     var expires; //expire date of the cookie
  4.     var value; //cookie's value
  5.     var url = {{Page URL}}; //current page URL
  6.     date.setTime(date.getTime() + (7 * 24 * 60 * 60 * 1000));
  7.     expires = date.toUTCString();
  8.     value = url.search("utm_source=criteo") != -
  9.         1 ? "criteo" : "other";
  10.     document.cookie = "__utmz=" + value + "; expires=" +
  11.         expires + "; domain=.wehkamp.nl; path=/";
  12. </script>
Advertisement
Add Comment
Please, Sign In to add comment