0% found this document useful (0 votes)
3 views1 page

JavaScript E-commerce Tracking Script

The document contains a JavaScript snippet designed to track various e-commerce events such as 'AddToCart', 'InitiateCheckout', 'AddPaymentInfo', and 'Purchase' using Facebook's tracking pixel. It retrieves product information like content ID and price, either from a specific HTML element or from meta data. Additionally, it includes a URL link to an external site.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

JavaScript E-commerce Tracking Script

The document contains a JavaScript snippet designed to track various e-commerce events such as 'AddToCart', 'InitiateCheckout', 'AddPaymentInfo', and 'Purchase' using Facebook's tracking pixel. It retrieves product information like content ID and price, either from a specific HTML element or from meta data. Additionally, it includes a URL link to an external site.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Script Aquecimento: javascript: (function () { var code = document.

getElementById("ProductJson-product-template");
var content_id = ""; var price = 17997; if (code == undefined) { content_id = meta["product"]["id"]; price =
meta["product"]["price"]; } else { content_id = [Link]([Link])["id"].toString(); } fbq('track', 'AddToCart',
{ content_type: 'product_group', content_ids: '[' + content_id + ']', value: price, num_items: 1, currency:
'BRL', }); fbq('track', 'InitiateCheckout', { content_type: 'product_group', content_ids: '[' + content_id + ']', value:
price, num_items: 1, currency: 'BRL', }); fbq('track', 'AddPaymentInfo', { content_type: 'product_group',
content_ids: '[' + content_id + ']', value: price, num_items: 1, currency: 'BRL', }); fbq('track', 'Purchase',
{ content_type: 'product_group', content_ids: '[' + content_id + ']', value: price, num_items: 1, currency:
'BRL', });})();

[Link]

You might also like