wix-window.trackingParameters

wix-window.trackingParameters

Objects used when calling the trackEvent() function.

Contents

AddPaymentInfoEvent An object used when sending an AddPaymentInfo track event.
AddProductImpressionEvent An object used when sending an AddProductImpression track event.
AddToCartEvent An object used when sending an AddToCart track event.
ClickProductEvent An object used when sending a ClickProduct track event.
CustomEvent An object used when sending a CustomEvent track event.
InitiateCheckoutEvent An object used when sending an InitiateCheckout track event.
PurchaseEvent An object used when sending a Purchase track event.
RemoveFromCartEvent An object used when sending a RemoveFromCart track event.
ViewContentEvent An object used when sending a ViewContent track event.
AddPaymentInfoEvent

AddPaymentInfoEvent

An object used when sending an AddPaymentInfo track event.

Type

Object

Properties

option String Describes option information on a checkout page, such as selected payment method.

Examples

Send an AddPaymentInfo trackEvent

aW1wb3J0IHdpeFdpbmRvdyBmcm9tICd3aXgtd2luZG93JzsKCndpeFdpbmRvdy50cmFja0V2ZW50KCJBZGRQYXltZW50SW5mbyIsIHsKICBvcHRpb246ICJWaXNhIgp9ICk7Cg==
import wixWindow from 'wix-window';

wixWindow.trackEvent("AddPaymentInfo", {
  option: "Visa"
} );

See Also

trackEvent( )

AddProductImpressionEvent

AddProductImpressionEvent

An object used when sending an AddProductImpression track event.

Type

Object

Properties

contents Object[ ] Product information.
contents[].id (optional) String Product ID.
contents[].sku (optional) String Stock keeping unit code.
contents[].name String Product name.
contents[].category (optional) String Category of the page or product.
contents[].price (optional) Number Product price.
contents[].currency (optional) String Currency code.
contents[].brand (optional) String Brand name of the product.
contents[].variant (optional) String Variant of the product.
contents[].list (optional) String List or collection the product is in.
contents[].position (optional) String Product's position in a list or collection.

Examples

Send an AddProductImpression trackEvent

aW1wb3J0IHdpeFdpbmRvdyBmcm9tICd3aXgtd2luZG93JzsKCndpeFdpbmRvdy50cmFja0V2ZW50KCJBZGRQcm9kdWN0SW1wcmVzc2lvbiIsIHsKICBjb250ZW50czogWyB7CiAgICBza3U6ICJQMTIzNDUiLAogICAgbmFtZTogIlJlYWxseSBGYXN0IFJ1bm5pbmcgU2hvZXMiLAogICAgY2F0ZWdvcnk6ICJBcHBhcmVsL1Nob2VzIiwKICAgIHByaWNlOiAxMDAsCiAgICBjdXJyZW5jeTogIlVTRCIsCiAgICBicmFuZDogIk5pa2UiLAogICAgdmFyaWFudDogIkJsYWNrIiwKICAgIGxpc3Q6ICJTZWFyY2ggUmVzdWx0cyIsCiAgICBwb3NpdGlvbjogMQogIH0sIHsKICAgIHNrdTogIlA2Nzg5MCIsCiAgICBuYW1lOiAiUnVubmluZyBTaGlydCIsCiAgICBjYXRlZ29yeTogIkFwcGFyZWwvU2hpcnRzIiwKICAgIHByaWNlOiA1MCwKICAgIGN1cnJlbmN5OiAiVVNEIiwKICAgIGJyYW5kOiAiTmlrZSIsCiAgICB2YXJpYW50OiAiQmx1ZSIsCiAgICBsaXN0OiAiU2VhcmNoIFJlc3VsdHMiLAogICAgcG9zaXRpb246IDIKICB9IF0KfSApOwo=
import wixWindow from 'wix-window';

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

See Also

trackEvent( )

AddToCartEvent

AddToCartEvent

An object used when sending an AddToCart track event.

Type

Object

Properties

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.

Examples

Send an AddToCart trackEvent

aW1wb3J0IHdpeFdpbmRvdyBmcm9tICd3aXgtd2luZG93JzsKCndpeFdpbmRvdy50cmFja0V2ZW50KCJBZGRUb0NhcnQiLCB7CiAgaWQ6ICJQMTIzNDUiLAogIG5hbWU6ICJSZWFsbHkgRmFzdCBSdW5uaW5nIFNob2VzIiwKICBjYXRlZ29yeTogIkFwcGFyZWwvU2hvZXMiLAogIHByaWNlOiAxMjAuNSwKICBjdXJyZW5jeTogIlVTRCIsCiAgYnJhbmQ6ICJTYXVjb255IiwKICB2YXJpYW50OiAiU2lsdmVyIiwKICBwb3NpdGlvbjogMiwKICBxdWFudGl0eTogMQp9ICk7Cg==
import wixWindow from 'wix-window';

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

See Also

trackEvent( )

ClickProductEvent

ClickProductEvent

An object used when sending a ClickProduct track event.

Type

Object

Properties

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.

Examples

Send a ClickProduct trackEvent

aW1wb3J0IHdpeFdpbmRvdyBmcm9tICd3aXgtd2luZG93JzsKCndpeFdpbmRvdy50cmFja0V2ZW50KCJDbGlja1Byb2R1Y3QiLCB7CiAgaWQ6ICJQMTIzNDUiLAogIG5hbWU6ICJSZWFsbHkgRmFzdCBSdW5uaW5nIFNob2VzIiwKICBjYXRlZ29yeTogIkFwcGFyZWwvU2hvZXMiLAogIHByaWNlOiAxMjAsCiAgY3VycmVuY3k6ICJVU0QiLAogIGJyYW5kOiAiQWRpZGFzIiwKICB2YXJpYW50OiAiQmxhY2siLAogIHBvc2l0aW9uOiAxCn0gKTsK
import wixWindow from 'wix-window';

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

See Also

trackEvent( )

CustomEvent

CustomEvent

An object used when sending a CustomEvent track event.

Description

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

Type

Object

Properties

event String Product ID.

Examples

Send a CustomEvent trackEvent

aW1wb3J0IHdpeFdpbmRvdyBmcm9tICd3aXgtd2luZG93JzsKCndpeFdpbmRvdy50cmFja0V2ZW50KCJDdXN0b21FdmVudCIsIHsKICBldmVudDogIkZyZXF1ZW50U2hvcHBlciIsCiAgbnVtX3B1cmNoYXNlczogOCwKICBhdmVyYWdlX29yZGVyOiAyNDUuMjQsCiAgZmF2b3JpdGVfY2F0ZWdvcnk6ICJTcG9ydGluZyBHb29kcyIKfSApOwo=
import wixWindow from 'wix-window';

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

See Also

trackEvent( )

InitiateCheckoutEvent

InitiateCheckoutEvent

An object used when sending an InitiateCheckout track event.

Type

Object

Properties

contents Object[ ] Product information.
contents[].id (optional) String Product ID.
contents[].sku (optional) String Stock keeping unit code.
contents[].name String Product name.
contents[].category (optional) String Category of the page or product.
contents[].price (optional) Number Product price.
contents[].currency (optional) String Currency code.
contents[].brand (optional) String Brand name of the product.
contents[].variant (optional) String Variant of the product.
contents[].quantity (optional) Number Product quantity.

Examples

Send an InitiateCheckout trackEvent

aW1wb3J0IHdpeFdpbmRvdyBmcm9tICd3aXgtd2luZG93JzsKCndpeFdpbmRvdy50cmFja0V2ZW50KCJJbml0aWF0ZUNoZWNrb3V0IiwgewogIGNvbnRlbnRzOiBbIHsKICAgIHNrdTogIlAxMjM0NSIsCiAgICBuYW1lOiAiUmVhbGx5IEZhc3QgUnVubmluZyBTaG9lcyIsCiAgICBjYXRlZ29yeTogIkFwcGFyZWwvU2hvZXMiLAogICAgcHJpY2U6IDEwMCwKICAgIGN1cnJlbmN5OiAiVVNEIiwKICAgIGJyYW5kOiAiTmlrZSIsCiAgICB2YXJpYW50OiAiQmxhY2siLAogICAgcXVhbnRpdHk6IDIKICB9LCB7CiAgICBza3U6ICJQNjc4OTAiLAogICAgbmFtZTogIlJ1bm5pbmcgU2hpcnQiLAogICAgY2F0ZWdvcnk6ICJBcHBhcmVsL1NoaXJ0cyIsCiAgICBwcmljZTogNTAsCiAgICBjdXJyZW5jeTogIlVTRCIsCiAgICBicmFuZDogIk5pa2UiLAogICAgdmFyaWFudDogIkJsdWUiLAogICAgcXVhbnRpdHk6IDMKICB9IF0KfSApOwo=
import wixWindow from 'wix-window';

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

See Also

trackEvent( )

PurchaseEvent

PurchaseEvent

An object used when sending a Purchase track event.

Type

Object

Properties

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 Object[ ] Product information.
contents[].id (optional) String Product ID.
contents[].name String Product name.
contents[].category (optional) String Category of the page or product.
contents[].price (optional) Number Product price.
contents[].currency (optional) String Currency code.
contents[].brand (optional) String Brand name of the product.
contents[].variant (optional) String Variant of the product.
contents[].quantity (optional) Number Product quantity.

Examples

Send a Purchase trackEvent

aW1wb3J0IHdpeFdpbmRvdyBmcm9tICd3aXgtd2luZG93JzsKCndpeFdpbmRvdy50cmFja0V2ZW50KCJQdXJjaGFzZSIsIHsKICBpZDogIlQxMjM0NSIsCiAgYWZmaWxpYXRpb246ICJNeSBTdG9yZSIsCiAgcmV2ZW51ZTogMjIuMTYsCiAgdGF4OiAyLjg1LAogIHNoaXBwaW5nOiA1LjM0LAogIGNvdXBvbjogIlNVTU1FUjIwMTgiLAogIGNvbnRlbnRzOiBbIHsKICAgIGlkOiAiQUJDMTIzIiwKICAgIHF1YW50aXR5OiAyLAogICAgcHJpY2U6IDEuOTksCiAgICBjdXJyZW5jeTogIlVTRCIKICB9LCB7CiAgICBpZDogIlhZWjc4OSIsCiAgICBxdWFudGl0eTogMSwKICAgIHByaWNlOiA5Ljk5LAogICAgY3VycmVuY3k6ICJVU0QiCiAgfSBdCn0gKTsK
import wixWindow from 'wix-window';

wixWindow.trackEvent("Purchase", {
  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"
  } ]
} );

See Also

trackEvent( )

RemoveFromCartEvent

RemoveFromCartEvent

An object used when sending a RemoveFromCart track event.

Type

Object

Properties

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.

Examples

Send a RemoveFromCart trackEvent

aW1wb3J0IHdpeFdpbmRvdyBmcm9tICd3aXgtd2luZG93JzsKCndpeFdpbmRvdy50cmFja0V2ZW50KCJSZW1vdmVGcm9tQ2FydCIsIHsKICBpZDogIlAxMjM0NiIsCiAgbmFtZTogIlJlYWxseSBGYXN0IFJ1bm5pbmcgU2hvZXMiLAogIHByaWNlOiAxMjUuOTUsCiAgY3VycmVuY3k6ICJVU0QiLAogIGNhdGVnb3J5OiAiQXBwYXJlbC9TaG9lcyIsCiAgYnJhbmQ6ICJBZGlkYXMiLAogIHZhcmlhbnQ6ICJCbGFjayIsCiAgcG9zaXRpb246IDEsCiAgcXVhbnRpdHk6IDEKfSApOwo=
import wixWindow from 'wix-window';

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

See Also

trackEvent( )

ViewContentEvent

ViewContentEvent

An object used when sending a ViewContent track event.

Type

Object

Properties

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.

Examples

Send a ViewContent trackEvent

aW1wb3J0IHdpeFdpbmRvdyBmcm9tICd3aXgtd2luZG93JzsKCndpeFdpbmRvdy50cmFja0V2ZW50KCJWaWV3Q29udGVudCIsIHsKICBpZDogIlAxMjM0NSIsCiAgbmFtZTogIlJlYWxseSBGYXN0IFJ1bm5pbmcgU2hvZXMiLAogIGNhdGVnb3J5OiAiQXBwYXJlbC9TaG9lcyIsCiAgcHJpY2U6IDEyMCwKICBjdXJyZW5jeTogIlVTRCIsCiAgYnJhbmQ6ICJBZGlkYXMiLAogIHZhcmlhbnQ6ICJCbGFjayIsCiAgcG9zaXRpb246IDEKfSApOwo=
import wixWindow from 'wix-window';

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

See Also

trackEvent( )