The eventType field accepts the event types delineated below. An eventObject object literal must also be passed to the track command if the eventType has any required properties.

Page View

You need to call page_view for this event to be tracked. No parameters should be passed for this event.

sd.track('page_view');

Enable auto page_view tracking for non-Single-page apps

To enable auto-tracking of page view events on page load on a non-Single-page app, please set behaviors.trackPageViewOnLoad to true when you add simon.js to your site, like...

<script>
    var _sd = _sd || {};
    ...
    _sd.debug = true;
    _sd.behaviors = {
        trackPageViewOnLoad: true
    };
    (function(s,i,m){
        ...
    })('sd','LOCATION_OF_SIMON_JS','script');
</script>

Once enabled, Simon Signal will automatically send page_view events when the tag loads as a part of a page load. If you call page_view and your site is not a single-page app, it will result in duplicate events. If you are unsure about whether you need to call page_view, you can check the browser console network tab to see if the event is being sent.


Product View

This is an example of a Product View event:

sd.track('product_view', {
  productId: '632910392',
  variant: '808950810',
  productImageUrl:'https://cdn.simondata.com/files/808950810.jpg',
  productUrl:'https://www.simondata.com/apparel/t-shirts/808950810',
  brand: 'Acme',
  category: 'Apparel/Men/T-Shirts',
  color: 'Black',
  productName: 'Nyan Cat T-Shirt',
  price: 24.95,
  properties: {
    desc: 'Slim cut t-shirt with a cat on it'
  }
});

Product impressions are measured using the track command with the product_view event type. Details about the product are added in an eventObject.

ValueTypeRequiredDescription
productIdStringYesThe product ID or SKU (e.g. 632910392).
variantStringNoThe variant of the product (e.g. 808950810).
productImageUrlStringNoThe encoded URL for an image of the product (starts with http or https).
productUrlStringNoThe encoded URL for the product page (starts with http or https).
brandStringNoThe brand to which the product belongs (e.g. Acme).
categoryStringNoThe category to which the product belongs (e.g. Apparel). Use / as a delimiter to specify up to 5-levels of hierarchy (e.g. Apparel/Men/T-Shirts).
colorStringNoThe color of the product (e.g. Black).
productNameStringNoThe name of the product (e.g. Nyan Cat T-Shirt).
sizeStringNoThe size of the product (e.g. Medium).
styleStringNoThe style of the product (e.g. Slim Cut).
priceNumberNoThe price of a product (e.g. 24.95).
propertiesObjectNoAn object of extra arguments (e.g. { desc: 'Slim cut t-shirt with a cat on it' }).

Favorite

This is an example of a Favorite event:

sd.track('favorite', {
  productId: '632910392',
  variant: '808950810',
  productImageUrl:'https://cdn.simondata.com/files/808950810.jpg',
  productUrl:'https://www.simondata.com/apparel/t-shirts/808950810',
  brand: 'Acme',
  category: 'Apparel/Men/T-Shirts',
  color: 'Black',
  productName: 'Nyan Cat T-Shirt',
  price: 24.95,
  properties: {
    desc: 'Slim cut t-shirt with a cat on it'
  }
});

Favorites are measured using the track command with the favorite event type. Details about the product are added in an eventObject.

ValueTypeRequiredDescription
productIdStringYesThe product ID or SKU (e.g. 632910392).
variantStringNoThe variant of the product (e.g. 808950810).
productImageUrlStringNoThe encoded URL for an image of the product (starts with http or https).
productUrlStringNoThe encoded URL for the product page (starts with http or https).
brandStringNoThe brand to which the product belongs (e.g. Acme).
categoryStringNoThe category to which the product belongs (e.g. Apparel). Use / as a delimiter to specify up to 5-levels of hierarchy (e.g. Apparel/Men/T-Shirts).
colorStringNoThe color of the product (e.g. Black).
productNameStringNoThe name of the product (e.g. Nyan Cat T-Shirt).
sizeStringNoThe size of the product (e.g. Medium).
styleStringNoThe style of the product (e.g. Slim Cut).
priceNumberNoThe price of a product (e.g. 24.95).
propertiesObjectNoAn object of extra arguments (e.g. { desc: 'Slim cut t-shirt with a cat on it' }).

Waitlist

This is an example of a Waitlist event:

sd.track('waitlist', {
  productId: '632910392',
  variant: '808950810',
  quantity: 1,
  productImageUrl:'https://cdn.simondata.com/files/808950810.jpg',
  productUrl:'https://www.simondata.com/apparel/t-shirts/808950810',
  brand: 'Acme',
  category: 'Apparel/Men/T-Shirts',
  color: 'Black',
  productName: 'Nyan Cat T-Shirt',
  price: 24.95,
  properties: {
    desc: 'Slim cut t-shirt with a cat on it'
  }
});

A waitlist event should be called when a contact chooses to be added to a waitlist for a product that is out of stock. This is a track event with the waitlist event type. Details about the product are added in an eventObject.

ValueTypeRequiredDescription
productIdStringYesThe product ID or SKU (e.g. 632910392).
variantStringNoThe variant of the product (e.g. 808950810).
quantityNumberNoThe quantity of the product added to the waitlist (e.g. 1).
productImageUrlStringNoThe encoded URL for an image of the product (starts with http or https).
productUrlStringNoThe encoded URL for the product page (starts with http or https).
brandStringNoThe brand to which the product belongs (e.g. Acme).
categoryStringNoThe category to which the product belongs (e.g. Apparel). Use / as a delimiter to specify up to 5-levels of hierarchy (e.g. Apparel/Men/T-Shirts).
colorStringNoThe color of the product (e.g. Black).
productNameStringNoThe name of the product (e.g. Nyan Cat T-Shirt).
sizeStringNoThe size of the product (e.g. Medium).
styleStringNoThe style of the product (e.g. Slim Cut).
priceNumberNoThe price of a product (e.g. 24.95).
propertiesObjectNoAn object of extra arguments (e.g. { desc: 'Slim cut t-shirt with a cat on it' }).

Custom

This is an example of a Custom event:

sd.track('custom', {
  eventName: 'event_abc',
  properties: {
    property: 'value'
  }
});

custom type is used to track events that do not map to one of the pre-defined event types. This is a track event with the custom event type. Details are added in added in an eventObject.

ValueTypeRequiredDescription
eventNameStringYesThe custom event type name
propertiesObjectNoAn object of extra arguments