Dynamic products id
-
Hi folks! I`m instructed to add a tag for Criteo Marketing on a woo site, but I need to a “dynamic id” for the products, since I cant just add a tag for each product when there are several thousand of them. Anybody knows how to create a dynamic id that fills in the correct product id?
Here is the tag;
<!– Criteo 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 || [];
var deviceType = /iPad/.test(navigator.userAgent) ? “t” : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? “m” : “d”;
window.criteo_q.push(
{ event: “setAccount”, account: xxxxx }, // You should never update this line
{ event: “setEmail”, email: “##MD5 hashed Email Address of user##” }, // Can be an empty string
{ event: “setSiteType”, type: deviceType },
{
event: “viewItem”,
item: “##Product ID 1##”
}
);
</script>
<!– END Criteo Product Tag –>The page I need help with: [log in to see the link]
The topic ‘Dynamic products id’ is closed to new replies.