Module: types

Members

(inner, constant) ADDTOCART

Analytics event type 'addToCart'. Uses schema shoppingList.

(inner, constant) ADDTOWISHLIST

Analytics type 'addToWishlist'. Uses schema shoppingList.

(inner, constant) APPLEPAYBUTTONCLICKED

Analytics type 'applePayButtonClicked'. No schema.

(inner, constant) APPLEPAYBUTTONDISPLAYED

Analytics type 'applePayButtonDisplayed'. No schema.

(inner, constant) APPLEPAYOPTIONDISPLAYED

Analytics type 'applePayOptionDisplayed'. No schema.

(inner, constant) ERROR

This represents a pageview on your site. Analytics type 'error'. Uses schema: error.

(inner, constant) LOCALE

Analytics type 'locale'. Uses schema locale.

(inner, constant) OFFLINE

Analytics type 'offline'. Uses schema: offline.

(inner, constant) PAGEVIEW

Analytics type 'pageview'. Uses schema: pageview.

(inner, constant) PERFORMANCE

Analytics type 'performance'. Uses schema: performance.

(inner, constant) PRODUCTIMPRESSION

Analytics type 'productImpression'. Uses schema product.

(inner, constant) PURCHASE

Analytics type 'purchase'. Uses schema purchase.

(inner, constant) REMOVEFROMCART

Analytics type 'removeFromCart'. Uses schema shoppingList.

(inner, constant) REMOVEFROMWISHLIST

Analytics type 'removeFromWishlist'. Uses schema shoppingList.

(inner, constant) UIINTERACTION

Analytics type 'uiInteraction'. Uses schema: uiInteraction.

Type Definitions

error

Error schema

Type:
  • Object
Properties:
Name Type Description
name String

(required) The name of component the error originated from.

content String

Error content i.e. the form field that has an error, error stack track,

locale

This represents the locale of your site

Type:
  • Object
Properties:
Name Type Description
locale String

locale ISO code.

offline

Offline schema

Type:
  • Object
Properties:
Name Type Description
startTime Number

the time your site went offline.

page

Page schema

Type:
  • Object
Properties:
Name Type Description
templateName String

(required) the template name that was used to render the page, eg. product-details-page

location String

the value of window.location, if available.

path String

the path segment of the current URL, if available.

title String

the title of the rendered page.

performance

Performace schema

Type:
  • Object
Properties:
Name Type Description
bundle String

(required) the bundle type eg. production, development.

page_start Number

(required) the time when the page is navigated to before it is done loading.

timing_start Number

(required) time of hard navigation. https://developer.mozilla.org/en-US/docs/Web/API/PerformanceTiming/navigationStart

mobify_start Number

(required) the time when the mobify tag loaded.

app_start Number

(required) the time to load the sandy tracking pixel.

page_paint Number

(required) the time to start loading the page.

full_page_load Number

(required) the time to finish loading the page.

first_paint Number

(required) first paint. https://developer.mozilla.org/en-US/docs/Web/API/PerformancePaintTiming

first_contentful_paint Number

(required) first contentful paint. https://developer.mozilla.org/en-US/docs/Web/API/PerformancePaintTiming

time_to_interactive Number

(required) time to interactive. https://github.com/GoogleChromeLabs/tti-polyfill#usage

product

Product schema

Type:
  • Object
Properties:
Name Type Description
id String

(required) product id.

name String

(required) product name.

category String

product category.

brand String

product brand.

variant String

product variant.

list String

the name of the list the user encountered the product (i.e. search, bestseller)

position Number

the position of the product in the list it was encountered in.

price Number

price of product.

quantity Number

quantity of product selected.

coupon String

coupon used on product.

stock Number

number of product in stock.

size String

product size.

color String

product color.

purchase

Purchase schema

Type:
  • Object
Properties:
Name Type Description
transaction Object

(required) transaction of purchase (see type: transaction)

products Array

(required) products in purchase (see type: product).

shoppingList

Shopping list schema

Type:
  • Object
Properties:
Name Type Description
type String

(required) type of shopping list (i.e. cart, wishlist)

count Number

(required) total number of cart line items.

subtotal Number

total price of all cart line items before shipping and taxes.

product Object

cart line item added to shopping list (see type: product).

transaction

Transaction schema

Type:
  • Object
Properties:
Name Type Description
id String

(required) transaction id.

affiliation String

checkout method (i.e. Web, Paypal, Apple Pay, Google Store)

revenue Number

(required) grand total of purchase including shipping and taxes.

tax Number

tax on purchase.

shipping Number

shipping charge on purchase.

list String

purchase attribution - what affected this purchase? (i.e. Web push)

step Number

a number representing a step in the checkout process.

option Object

Additional options

uiInteraction

UI Interaction schema

Type:
  • Object
Properties:
Name Type Description
subject String

(required) the subject responsible for triggering the UI Interaction eg. user, app.

action String

(required) the UI action eg. Focus, Change, Open, Click, Blur, Close, Display, Receive, Swipe.

object String

(required) the DOM element name eg. Button, Element, Input, Modal.

name String

the name given by the attribute data-analytics-name.

content String

the DOM element value, or the content given by the attribute data-analytics-content