menu
Menu
Mobify DevCenter
search_icon_focus

Types

progressive-web-sdk/dist/analytics-integrations/types

Analytics Types and Schemas

PAGEVIEW

Analytics type ‘pageview’. Uses schema: page.

Import
import { PAGEVIEW } from 'progressive-web-sdk/dist/analytics-integrations/types

OFFLINE

Analytics type ‘offline’. Uses schema: offline.

Import
import { OFFLINE } from 'progressive-web-sdk/dist/analytics-integrations/types

UIINTERACTION

Analytics type ‘uiInteraction’. Uses schema: uiInteraction.

Import
import { UIINTERACTION } from 'progressive-web-sdk/dist/analytics-integrations/types

PERFORMANCE

Analytics type ‘performance’. Uses schema: performance.

Import
import { PERFORMANCE } from 'progressive-web-sdk/dist/analytics-integrations/types

ADDTOCART

Analytics event type ‘addToCart’. Uses schema shoppingList.

Import
import { ADDTOCART } from 'progressive-web-sdk/dist/analytics-integrations/types

REMOVEFROMCART

Analytics type ‘removeFromCart’. Uses schema shoppingList.

Import
import { REMOVEFROMCART } from 'progressive-web-sdk/dist/analytics-integrations/types

ADDTOWISHLIST

Analytics type ‘addToWishlist’. Uses schema shoppingList.

Import
import { ADDTOWISHLIST } from 'progressive-web-sdk/dist/analytics-integrations/types

REMOVEFROMWISHLIST

Analytics type ‘removeFromWishlist’. Uses schema shoppingList.

Import
import { REMOVEFROMWISHLIST } from 'progressive-web-sdk/dist/analytics-integrations/types

PURCHASE

Analytics type ‘purchase’. Uses schema purchase.

Import
import { PURCHASE } from 'progressive-web-sdk/dist/analytics-integrations/types

PRODUCTIMPRESSION

Analytics type ‘productImpression’. Uses schema product.

Import
import { PRODUCTIMPRESSION } from 'progressive-web-sdk/dist/analytics-integrations/types

APPLEPAYOPTIONDISPLAYED

Analytics type ‘applePayOptionDisplayed’. No schema.

Import
import { APPLEPAYOPTIONDISPLAYED } from 'progressive-web-sdk/dist/analytics-integrations/types

APPLEPAYBUTTONDISPLAYED

Analytics type ‘applePayButtonDisplayed’. No schema.

Import
import { APPLEPAYBUTTONDISPLAYED } from 'progressive-web-sdk/dist/analytics-integrations/types

APPLEPAYBUTTONCLICKED

Analytics type ‘applePayButtonClicked’. No schema.

Import
import { APPLEPAYBUTTONCLICKED } from 'progressive-web-sdk/dist/analytics-integrations/types

LOCALE

Analytics type ‘locale’. Uses schema locale.

Import
import { LOCALE } from 'progressive-web-sdk/dist/analytics-integrations/types

ERROR

Analytics type ‘error’. Uses schema: error.

Import
import { ERROR } from 'progressive-web-sdk/dist/analytics-integrations/types

page

Page schema

PropertyTypeDescription
.templateNameString(required) the template name that was used to render the page, eg. product-details-page
.locationStringthe value of window.location, if available.
.pathStringthe path segment of the current URL, if available.
.titleStringthe title of the rendered page.

offline

Offline schema

PropertyTypeDescription
.startTimeNumberthe time your site went offline.

uiInteraction

UI Interaction schema

PropertyTypeDescription
.subjectString(required) the subject responsible for triggering the UI Interaction eg. user, app.
.actionString(required) the UI action eg. Focus, Change, Open, Click, Blur, Close, Display, Receive, Swipe.
.objectString(required) the DOM element name eg. Button, Element, Input, Modal.
.nameStringthe name given by the attribute data-analytics-name.
.contentStringthe DOM element value, or the content given by the attribute data-analytics-content

performance

Performance schema

PropertyTypeDescription
.bundleString(required) the bundle type eg. production, development.
.timing_startNumber(required) time of hard navigation. {@link https://developer.mozilla.org/en-US/docs/Web/API/PerformanceTiming/navigationStart}
.app_startNumber(required) the time to load the sandy tracking pixel.
.full_page_loadNumber(required) the time to load the page.
.first_paintNumber(required) first paint. {@link https://developer.mozilla.org/en-US/docs/Web/API/PerformancePaintTiming}
.first_contentful_paintNumber(required) first contentful paint. {@link https://developer.mozilla.org/en-US/docs/Web/API/PerformancePaintTiming}
.time_to_interactiveNumber(required) time to interactive. {@link https://github.com/GoogleChromeLabs/tti-polyfill#usage}
.is_first_loadBoolean(required) true if this is an initial load, false if it is a subsequent load.

product

Product schema

PropertyTypeDescription
.idString(required) product id.
.nameString(required) product name.
.categoryStringproduct category.
.brandStringproduct brand.
.variantStringproduct variant.
.listStringthe name of the list the user encountered the product (i.e. search, bestseller)
.positionNumberthe position of the product in the list it was encountered in.
.priceNumberprice of product.
.quantityNumberquantity of product selected.
.couponStringcoupon used on product.
.stockNumbernumber of product in stock.
.sizeStringproduct size.
.colorStringproduct color.

shoppingList

Shopping list schema

PropertyTypeDescription
.typeString(required) type of shopping list (i.e. cart, wishlist)
.countNumber(required) total number of cart line items.
.subtotalNumbertotal price of all cart line items before shipping and taxes.
.productObjectcart line item added to shopping list (see type: product).

transaction

Transaction schema

PropertyTypeDescription
.idString(required) transaction id.
.affiliationStringcheckout method (i.e. Web, Paypal, Apple Pay, Google Store)
.revenueNumber(required) grand total of purchase including shipping and taxes.
.taxNumbertax on purchase.
.shippingNumbershipping charge on purchase.
.listStringpurchase attribution - what affected this purchase? (i.e. Web push)
.stepNumbera number representing a step in the checkout process.
.optionObjectAdditional options

purchase

Purchase schema

PropertyTypeDescription
.transactionObject(required) transaction of purchase (see type: transaction)
.productsArray(required) products in purchase (see type: product).

error

Error schema

PropertyTypeDescription
.nameString(required) The name of component the error originated from.
.contentStringError content i.e. the form field that has an error, error stack track,

locale

This represents the locale of your site

PropertyTypeDescription
.localeStringlocale ISO code.