How to: enable javascript snippet

Before you can send events using the JavaScript snippet.

Then, to track viewed product events, call the omnisend.push function:

<script type="text/javascript"> omnisend.push(["track", "$productViewed",{ $productID:"prod666", $variantID: "prod666_1", $currency: "USD", $price: 6666, //price in cents (integer) $oldPrice: 6999, //old price in cents (integer) $title:"Container", $description:"", $imageUrl: "http://www.example.com/images/products/prod-666.png", $productUrl:"http://www.example.com/products/prod-666", $vendor: "vendor" }]); </script>

These are mandatory fields:

  • $productID
  • $title
  • $currency
  • $price
  • $imageURL
  • $productURL

By sending viewed product events, you empower merchants to utilize the "Product Abandonment" automation, segment their customers, and apply various marketing strategies effectively.


Did this page help you?