Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Parse the URL and gives the value for a given key
- function getParameterByName(name) {
- name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
- var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
- results = regex.exec(location.search);
- return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
- }
- // Pass the value to the tag (example for a product tag)
- <script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
- <script type="text/javascript">
- window.criteo_q = window.criteo_q || [];
- window.criteo_q.push(
- { event: "setAccount", account: 50545 },
- { event: "setSiteType", type: "d" },
- { event: "viewItem", item: "abc123456", utmmedium: getParameterByName("utm_medium") }
- );
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement