CodeAPI

trackingParameters

Objects used when calling the trackEvent() function.

Table of Contents

OBJECTS

?
Objects used when setting, getting, or calling the properties and methods listed above.
AddPaymentInfoEventAn object used when sending an AddPaymentInfo track event.
AddProductImpressionEventAn object used when sending an AddProductImpression track event.
AddProductImpressionEventContentsAn object used when sending an AddProductImpression track event.
AddToCartEventAn object used when sending an AddToCart track event.
CheckoutStepEventAn object used when sending an CheckoutStep track event.
ClickProductEventAn object used when sending a ClickProduct track event.
CustomEventAn object used when sending a CustomEvent track event.
InitiateCheckoutEventAn object used when sending an InitiateCheckout track event.
InitiateCheckoutEventContentsAn object used when sending an InitiateCheckout track event.
PurchaseEventAn object used when sending a Purchase track event.
PurchaseEventContentsAn object used when sending an Purchase track event.
RemoveFromCartEventAn object used when sending a RemoveFromCart track event.
StartPaymentEventAn object used when sending an StartPayment track event.
ViewContentEventAn object used when sending a ViewContent track event.

AddPaymentInfoEvent

An object used when sending an AddPaymentInfo track event.

See Also

trackEvent( )

Syntax

type AddPaymentInfoEvent = {
  option: string
  origin: string
}
MEMBERS
?
The properties of an object.
option(Optional)
string
Describes option information on a checkout page, such as selected payment method.
origin(Optional)
string
Origin of the event.

Examples

Send an AddPaymentInfo trackEvent

import wixWindow from 'wix-window';

wixWindow.trackEvent("AddPaymentInfo", {
  "origin": "My Sportswear Store",
  "option": "Visa"
} );

AddProductImpressionEvent

An object used when sending an AddProductImpression track event.

See Also

trackEvent( )

Syntax

type AddProductImpressionEvent = {
  contents: Array<AddProductImpressionEventContents>
  origin: string
}

Examples

Send an AddProductImpression trackEvent

import wixWindow from 'wix-window';

wixWindow.trackEvent("AddProductImpression", {
  "origin": "My Sportswear Store",
  "contents": [ {
    "sku": "P12345",
    "name": "Really Fast Running Shoes",
    "category": "Apparel/Shoes",
    "price": 100,
    "currency": "USD",
    "brand": "SomeBrand",
    "variant": "Black",
    "list": "Search Results",
    "position": 1
  }, {
    "sku": "P67890",
    "name": "Running Shirt",
    "category": "Apparel/Shirts",
    "price": 50,
    "currency": "USD",
    "brand": "SomeBrand",
    "variant": "Blue",
    "list": "Search Results",
    "position": 2
  } ]
} );

AddProductImpressionEventContents

An object used when sending an AddProductImpression track event.

See Also

trackEvent( )

Syntax

type AddProductImpressionEventContents = {
  id: string
  sku: string
  name: string
  category: string
  price: number
  currency: string
  brand: string
  variant: string
  list: string
  position: string
}
MEMBERS
?
The properties of an object.
id(Optional)
string
Product ID.
sku(Optional)
string
Stock keeping unit code.
name
string
Product name.
category(Optional)
string
Category of the page or product.
price(Optional)
number
Product price.
currency(Optional)
string
Currency code.
brand(Optional)
string
Brand name of the product.
variant(Optional)
string
Variant of the product.
list(Optional)
string
List or collection the product is in.
position(Optional)
string
Product's position in a list or collection.

Examples

Send an AddProductImpression trackEvent

import wixWindow from 'wix-window';

wixWindow.trackEvent("AddProductImpression", {
  "origin": "My Sportswear Store",
  "contents": [ {
    "sku": "P12345",
    "name": "Really Fast Running Shoes",
    "category": "Apparel/Shoes",
    "price": 100,
    "currency": "USD",
    "brand": "SomeBrand",
    "variant": "Black",
    "list": "Search Results",
    "position": 1
  }, {
    "sku": "P67890",
    "name": "Running Shirt",
    "category": "Apparel/Shirts",
    "price": 50,
    "currency": "USD",
    "brand": "SomeBrand",
    "variant": "Blue",
    "list": "Search Results",
    "position": 2
  } ]
} );

AddToCartEvent

An object used when sending an AddToCart track event.

See Also

trackEvent( )

Syntax

type AddToCartEvent = {
  id: string
  sku: string
  name: string
  price: number
  currency: string
  category: string
  brand: string
  variant: string
  position: string
  quantity: number
  origin: string
}
MEMBERS
?
The properties of an object.
id(Optional)
string
Product ID.
sku(Optional)
string
Stock keeping unit code.
name
string
Product name.
price(Optional)
number
Product price.
currency(Optional)
string
Currency code.
category(Optional)
string
Category of the page or product.
brand(Optional)
string
Brand name of the product.
variant(Optional)
string
Variant of the product.
position(Optional)
string
Product's position in a list or collection.
quantity(Optional)
number
Product quantity.
origin(Optional)
string
Origin of the event.

Examples

Send an AddToCart trackEvent

import wixWindow from 'wix-window';

wixWindow.trackEvent("AddToCart", {
  "origin": "My Sportswear Store",
  "id": "P12345",
  "name": "Really Fast Running Shoes",
  "category": "Apparel/Shoes",
  "price": 120.5,
  "currency": "USD",
  "brand": "SomeBrand",
  "variant": "Silver",
  "position": 2,
  "quantity": 1
} );

CheckoutStepEvent

An object used when sending an CheckoutStep track event.

See Also

trackEvent( )

Syntax

type CheckoutStepEvent = {
  origin: string
  step: string
  action: string
  option: string
}
MEMBERS
?
The properties of an object.
origin(Optional)
string
Origin of the event.
step(Optional)
string

Checkout step number. Be sure to report consistent step values. For example, use 3 when this step follows StartPayment and AddPaymentInfo events.

action(Optional)
string
Action the visitor has taken, such as "Select shipping".
option(Optional)
string
Describes option information on a checkout page, such as selected payment method.

Examples

Send an CheckoutStep trackEvent

import wixWindow from 'wix-window';

wixWindow.trackEvent("CheckoutStep", {
  "origin": "My Sportswear Store",
  "step": "3",
  "action": "Select Shipping",
  "option": "Fast Checkout"
} );

ClickProductEvent

An object used when sending a ClickProduct track event.

See Also

trackEvent( )

Syntax

type ClickProductEvent = {
  id: string
  sku: string
  name: string
  price: number
  currency: string
  category: string
  brand: string
  variant: string
  list: string
  position: string
  origin: string
}
MEMBERS
?
The properties of an object.
id(Optional)
string
Product ID.
sku(Optional)
string
Stock keeping unit code.
name
string
Product name.
price(Optional)
number
Product price.
currency(Optional)
string
Currency code.
category(Optional)
string
Category of the page or product.
brand(Optional)
string
Brand name of the product.
variant(Optional)
string
Variant of the product.
list(Optional)
string
List or collection the product is in.
position(Optional)
string
Product's position in a list or collection.
origin(Optional)
string
Origin of the event.

Examples

Send a ClickProduct trackEvent

import wixWindow from 'wix-window';

wixWindow.trackEvent("ClickProduct", {
  "origin": "My Sportswear Store",
  "id": "P12345",
  "name": "Really Fast Running Shoes",
  "category": "Apparel/Shoes",
  "price": 120,
  "currency": "USD",
  "brand": "SomeBrand",
  "variant": "Black",
  "position": 1
} );

CustomEvent

An object used when sending a CustomEvent track event.

Description

The object contains one required property, event, and any number of custom properties.

When sending a custom event to Google Analytics, include following parameters:

  • eventCategory: string: object that was interacted with
  • eventAction: string: type of interaction
  • eventLabel (optional): string: event category
  • eventValue (optional): integer: numeric value associated with the event

See Also

trackEvent( )

Syntax

type CustomEvent = {
  event: string
}
MEMBERS
?
The properties of an object.
event
string
Product ID.

Examples

Send a CustomEvent trackEvent

import wixWindow from 'wix-window';

wixWindow.trackEvent("CustomEvent", {
  event: "FrequentShopper",
  "num_purchases": 8,
  "average_order": 245.24,
  "favorite_category": "Sporting Goods"
} );

InitiateCheckoutEvent

An object used when sending an InitiateCheckout track event.

See Also

trackEvent( )

Syntax

type InitiateCheckoutEvent = {
  contents: Array<InitiateCheckoutEventContents>
  origin: string
}

Examples

Send an InitiateCheckout trackEvent

import wixWindow from 'wix-window';

wixWindow.trackEvent("InitiateCheckout", {
  "origin": "My Sportswear Store",
  "contents": [ {
    "sku": "P12345",
    "name": "Really Fast Running Shoes",
    "category": "Apparel/Shoes",
    "price": 100,
    "currency": "USD",
    "brand": "SomeBrand",
    "variant": "Black",
    "quantity": 2
  }, {
    "sku": "P67890",
    "name": "Running Shirt",
    "category": "Apparel/Shirts",
    "price": 50,
    "currency": "USD",
    "brand": "SomeBrand",
    "variant": "Blue",
    "quantity": 3
  } ]
} );

InitiateCheckoutEventContents

An object used when sending an InitiateCheckout track event.

See Also

trackEvent( )

Syntax

type InitiateCheckoutEventContents = {
  id: string
  sku: string
  name: string
  category: string
  price: number
  currency: string
  brand: string
  variant: string
  quantity: number
}
MEMBERS
?
The properties of an object.
id(Optional)
string
Product ID.
sku(Optional)
string
Stock keeping unit code.
name
string
Product name.
category(Optional)
string
Category of the page or product.
price(Optional)
number
Product price.
currency(Optional)
string
Currency code.
brand(Optional)
string
Brand name of the product.
variant(Optional)
string
Variant of the product.
quantity(Optional)
number
Product quantity.

Examples

Send an InitiateCheckout trackEvent

import wixWindow from 'wix-window';

wixWindow.trackEvent("InitiateCheckout", {
  "origin": "My Sportswear Store",
  "contents": [ {
    "sku": "P12345",
    "name": "Really Fast Running Shoes",
    "category": "Apparel/Shoes",
    "price": 100,
    "currency": "USD",
    "brand": "SomeBrand",
    "variant": "Black",
    "quantity": 2
  }, {
    "sku": "P67890",
    "name": "Running Shirt",
    "category": "Apparel/Shirts",
    "price": 50,
    "currency": "USD",
    "brand": "SomeBrand",
    "variant": "Blue",
    "quantity": 3
  } ]
} );

PurchaseEvent

An object used when sending a Purchase track event.

See Also

trackEvent( )

Syntax

type PurchaseEvent = {
  id: string
  affiliation: string
  revenue: number
  tax: number
  shipping: number
  coupon: string
  contents: Array<PurchaseEventContents>
  origin: string
}
MEMBERS
?
The properties of an object.
id(Optional)
string
Product ID.
affiliation(Optional)
string
Name of the store where the event occurred.
revenue(Optional)
number
Total amount of the purchase including shipping, taxes, etc.
tax(Optional)
number
Total tax charge.
shipping(Optional)
number
Total shipping charge.
coupon(Optional)
string
Coupon code applied to the transaction.
contents
Product information.
origin(Optional)
string
Origin of the event.

Examples

Send a Purchase trackEvent

import wixWindow from 'wix-window';

wixWindow.trackEvent("Purchase", {
  "origin": "My Sportswear Store",
  "id": "T12345",
  "affiliation": "My Store",
  "revenue": 22.16,
  "tax": 2.85,
  "shipping": 5.34,
  "coupon": "SUMMER2018",
  "contents": [ {
    "id": "ABC123",
    "quantity": 2,
    "price": 1.99,
    "currency": "USD"
  }, {
    "id": "XYZ789",
    "quantity": 1,
    "price": 9.99,
    "currency": "USD"
  } ]
} );

PurchaseEventContents

An object used when sending an Purchase track event.

See Also

trackEvent( )

Syntax

type PurchaseEventContents = {
  id: string
  name: string
  category: string
  price: number
  currency: string
  brand: string
  variant: string
  quantity: number
}
MEMBERS
?
The properties of an object.
id(Optional)
string
Product ID.
name
string
Product name.
category(Optional)
string
Category of the page or product.
price(Optional)
number
Product price.
currency(Optional)
string
Currency code.
brand(Optional)
string
Brand name of the product.
variant(Optional)
string
Variant of the product.
quantity(Optional)
number
Product quantity.

Examples

Send a Purchase trackEvent

import wixWindow from 'wix-window';

wixWindow.trackEvent("Purchase", {
  "origin": "My Sportswear Store",
  "id": "T12345",
  "affiliation": "My Store",
  "revenue": 22.16,
  "tax": 2.85,
  "shipping": 5.34,
  "coupon": "SUMMER2018",
  "contents": [ {
    "id": "ABC123",
    "quantity": 2,
    "price": 1.99,
    "currency": "USD"
  }, {
    "id": "XYZ789",
    "quantity": 1,
    "price": 9.99,
    "currency": "USD"
  } ]
} );

RemoveFromCartEvent

An object used when sending a RemoveFromCart track event.

See Also

trackEvent( )

Syntax

type RemoveFromCartEvent = {
  id: string
  name: string
  price: number
  currency: string
  category: string
  brand: string
  variant: string
  position: string
  quantity: number
  origin: string
}
MEMBERS
?
The properties of an object.
id(Optional)
string
Product ID.
name
string
Product name.
price(Optional)
number
Product price.
currency(Optional)
string
Currency code.
category(Optional)
string
Category of the page or product.
brand(Optional)
string
Brand name of the product.
variant(Optional)
string
Variant of the product.
position(Optional)
string
Product's position in a list or collection.
quantity(Optional)
number
Product quantity.
origin(Optional)
string
Origin of the event.

Examples

Send a RemoveFromCart trackEvent

import wixWindow from 'wix-window';

wixWindow.trackEvent("RemoveFromCart", {
  "origin": "My Sportswear Store",
  "id": "P12346",
  "name": "Really Fast Running Shoes",
  "price": 125.95,
  "currency": "USD",
  "category": "Apparel/Shoes",
  "brand": "SomeBrand",
  "variant": "Black",
  "position": 1,
  "quantity": 1
} );

StartPaymentEvent

An object used when sending an StartPayment track event.

See Also

trackEvent( )

Syntax

type StartPaymentEvent = {
  origin: string
  option: string
}
MEMBERS
?
The properties of an object.
origin(Optional)
string
Origin of the event.
option(Optional)
string
Describes option information on a checkout page, such as selected payment method.

Examples

Send a StartPayment trackEvent

import wixWindow from 'wix-window';

wixWindow.trackEvent("StartPayment", {
  "origin": "My Sportswear Store",
  "option": "CreditCardCompany"
} );

ViewContentEvent

An object used when sending a ViewContent track event.

See Also

trackEvent( )

Syntax

type ViewContentEvent = {
  id: string
  sku: string
  name: string
  price: number
  currency: string
  category: string
  brand: string
  variant: string
  list: string
  position: string
  origin: string
}
MEMBERS
?
The properties of an object.
id(Optional)
string
Product ID.
sku(Optional)
string
Stock keeping unit code.
name
string
Product name.
price(Optional)
number
Product price.
currency(Optional)
string
Currency code.
category(Optional)
string
Category of the page or product.
brand(Optional)
string
Brand name of the product.
variant(Optional)
string
Variant of the product.
list(Optional)
string
List or collection the product is in.
position(Optional)
string
Product's position in a list or collection.
origin(Optional)
string
Origin of the event.

Examples

Send a ViewContent trackEvent

import wixWindow from 'wix-window';

wixWindow.trackEvent("ViewContent", {
  "origin": "My Sportswear Store",
  "id": "P12345",
  "name": "Really Fast Running Shoes",
  "category": "Apparel/Shoes",
  "price": 120,
  "currency": "USD",
  "brand": "SomeBrand",
  "variant": "Black",
  "position": 1
} );