Need Help?

Intro

To track events JavaScript snippet needs to be added to all of your pages.

You can send the following recommended cart and custom events via snippet:

📘

Info

Ensure the contact is identified before sending events by invoking the identifyContact function. Additional details
are available in this section. Without
identification, events will not be transmitted to Omnisend.

$pageViewed event

$pageViewed event is used
for Live View Website
Tracking
.
To track page views, use JavaScript code line:

omnisend.push(["track", "$pageViewed"]);

Note 1: this code line is added to the default snippet code, so don't duplicate it.

Note 2: to use this functionality please use the newest JavaScript snippet code.

"viewed product" event

Fire viewed product event when a user views a product. This event is used for:

Example of viewed product event code:

<script type="text/javascript">
    omnisend.push([
      "track",
      "viewed product",
      {
        eventVersion: "v4",
        eventID: "f1eeb5bd-736c-42c7-9cfe-6990f7f59b40",
        origin: "api",
        properties: {
            product: {
                id: 'prod666',
                currency: 'USD',
                price: 66.66,
                oldPrice: 69.99,
                title: 'Container',
                description: 'Amazing container',
                imageUrl: 'http://www.example.com/images/products/prod-666.png',
                url: 'http://www.example.com/products/prod-666',
                status: 'inStock',
                categories: [
                    {
                        id: 'first',
                        title: 'containers'
                    }
                ]
            }
        }
      }
    ]);
</script>

Properties

PropertyTypeMandatoryDescription
eventVersionstringYesEvent version. Always pass "v4"
originstringNoWhich integration sends event. For custom store send "api"
eventIDstringNoEvent id (UUID v4). Use it for event deduplication
properties.product.idstringYesProduct ID in shop
properties.product.currencystring(3)NoCurrency ISO 4217 code
properties.product.pricefloatNo
properties.product.oldPricefloatNo
properties.product.titlestringNo
properties.product.descriptionstringNoProduct description. We'll strip it to 30 words.
properties.product.imageUrlstringNoLink to product's image
properties.product.urlstringNoLink to product's page
properties.product.statusstringNoStatus. Example: "inStock", "outOfStock", "notAvailable"
properties.product.categoriesarrayNo
properties.product.categories.[n].idstringNo
properties.product.categories.[n].titlestringNo

Note: to use this functionality please use the newest JavaScript snippet code.