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.

Value

Type

Required

Description

productId

String

Yes

The product ID or SKU (e.g. 632910392).

variant

String

No

The variant of the product (e.g. 808950810).

productImageUrl

String

No

The encoded URL for an image of the product (starts with http or https).

productUrl

String

No

The encoded URL for the product page (starts with http or https).

brand

String

No

The brand to which the product belongs (e.g. Acme).

category

String

No

The 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).

color

String

No

The color of the product (e.g. Black).

productName

String

No

The name of the product (e.g. Nyan Cat T-Shirt).

size

String

No

The size of the product (e.g. Medium).

style

String

No

The style of the product (e.g. Slim Cut).

price

Number

No

The price of a product (e.g. 24.95).

properties

Object

No

An 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.

Value

Type

Required

Description

productId

String

Yes

The product ID or SKU (e.g. 632910392).

variant

String

No

The variant of the product (e.g. 808950810).

productImageUrl

String

No

The encoded URL for an image of the product (starts with http or https).

productUrl

String

No

The encoded URL for the product page (starts with http or https).

brand

String

No

The brand to which the product belongs (e.g. Acme).

category

String

No

The 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).

color

String

No

The color of the product (e.g. Black).

productName

String

No

The name of the product (e.g. Nyan Cat T-Shirt).

size

String

No

The size of the product (e.g. Medium).

style

String

No

The style of the product (e.g. Slim Cut).

price

Number

No

The price of a product (e.g. 24.95).

properties

Object

No

An 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.

Value

Type

Required

Description

productId

String

Yes

The product ID or SKU (e.g. 632910392).

variant

String

No

The variant of the product (e.g. 808950810).

quantity

Number

No

The quantity of the product added to the waitlist (e.g. 1).

productImageUrl

String

No

The encoded URL for an image of the product (starts with http or https).

productUrl

String

No

The encoded URL for the product page (starts with http or https).

brand

String

No

The brand to which the product belongs (e.g. Acme).

category

String

No

The 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).

color

String

No

The color of the product (e.g. Black).

productName

String

No

The name of the product (e.g. Nyan Cat T-Shirt).

size

String

No

The size of the product (e.g. Medium).

style

String

No

The style of the product (e.g. Slim Cut).

price

Number

No

The price of a product (e.g. 24.95).

properties

Object

No

An 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.

Value

Type

Required

Description

eventName

String

Yes

The custom event type name

properties

Object

No

An object of extra arguments