Sự tích hợpTrình khách JavaScript của FintezaE-CommerceEvent types

Event Types

Eight types of E-Commerce events can be sent to Finteza:

All other events will not be included in E-Commerce reports on the Finteza side.


View Item #

The event shows that a product was viewed. The characteristics of the viewed item are specified in the event:

fz('ecommerce', {
  "event""View Item",
  "items": [
    {
      "id""P12345",
      "name""USB Charger",
      "brand""ChargeIt",
      "category""Accessories",
      "variant""Black",
      "quantity": 2,
      "currency""USD",
      "price": 2.00,
      "list_name""Search Results",
      "list_position": 1
    },
    {
      "id""P67890",
      "name""Flame challenge TShirt",
      "brand""MyBrand",
      "category""Apparel/T-Shirts",
      "variant""Red",
      "quantity": 1,
      "currency""USD",
      "price": 3.00,
      "list_name""Search Results",
      "list_position": 2
    }
  ]
});

As a result, two "View Item" events will be created in Finteza, one for each of the described items.

Add To Cart / Remove From Cart #

These events are used when products are added or removed from the cart. In addition to product descriptions, the event should contain the cart ID in the cart_id parameter (the ID should be generated by your website).

fz('ecommerce', {
  "event""Add To Cart",
  "cart_id""C89367",
  "items": [
    {
      "id""P12345",
      "name""USB Charger",
      "brand""ChargeIt",
      "category""Accessories",
      "variant""Black",
      "quantity": 2,
      "currency""USD",
      "price": 2.00,
      "list_name""Search Results",
      "list_position": 1
    },
    {
      "id""P67890",
      "name""Finteza TShirt",
      "brand""Finteza",
      "category""Apparel/T-Shirts",
      "variant""Red",
      "quantity": 1,
      "currency""USD",
      "price": 3.00,
      "list_name""Search Results",
      "list_position": 2
    }
  ]
});

As a result, two "Add To Cart" events will be created in Finteza, one for each of the described items. The specified cart ID will be added to each event.

Do not pass the list_name and list_position parameters for removing from cart event. They describe the list from which the item was added to the cart, so they have no meaning for a removal event.

View Cart #

The event is related to viewing a cart. The event contains information about the cart cost, as well as additional providers, if there are any: tax, discount, net profit. Additional parameters cab also be specified for individual products.

fz('ecommerce', {
  "event""View Cart",
  "cart_id""C89367",
  "cart_items": 2,
  "currency""USD",
  "value": 7.07,
  "tax_value": 0.7,
  "tax_name""Tax",
  "tax_type""Tax type",
  "discount_value": 1,
  "discount_name""Black Friday",
  "discount type""B112029",
  "discount type""B112029"
  "items": [
    {
      "id""P12345",
      "name""USB Charger",
      "brand""ChargeIt",
      "category""Accessories",
      "variant""Black",
      "quantity": 2,
      "currency""USD"
      "price": 2.00,
      "value": 4.24
    },
    {
      "id""P67890",
      "name""Finteza TShirt",
      "brand""Finteza",
      "category""Apparel/T-Shirts",
      "variant""Red",
      "quantity": 1,
      "currency""USD"
      "price": 3.00,
      "value": 2.83
    }
  ]
});

The following three events will be created in Finteza:

  • "View Cart" event for each product. The events will include cart_id.
  • The "View Cart" event for the cart. If cart_id is not specified, the event will not be generated.

Checkout Begin / Checkout Progress #

These are purchase beginning and continuing events – when the user has already added items to the cart and proceeds to checkout.

In addition to the parameters used in the "View Cart" stage, information about the purchase stage can be passed here. Information about discounts and used coupons can also be corrected here.

fz('ecommerce', {
  "event""Checkout Begin",
  "cart_id""C89367",
  "cart_items": 2,
  "currency""USD",
  "value": 7.07,
  "tax_value": 0.7,
  "tax_name""Tax",
  "tax_type""Tax type",
  "discount_value": 1,
  "discount_name""Black Friday",
  "discount type""B112029",
  "shipping_value": 0.3,
  "shipping_name""Shipping",
  "shipping_type""Shipping Type",
  "checkout_step": 1,
  "checkout_option" : "Shipping"
  "items": [
    {
      "id""P12345",
      "name""USB Chargers",
      "brand""ChargeIt",
      "category""Accessories",
      "variant""Black",
      "quantity": 2,
      "currency""USD"
      "price": 2.00,
      "value": 4.24,
      "tax_value": 0.4,
      "tax_name""Tax",
      "tax_type""Tax type",
      "shipping_value": 0.2,
      "shipping_name""Shipping",
      "shipping_type""Standard Post"
    },
    {
      "id""P67890",
      "name""Finteza TShirt",
      "brand""Finteza",
      "category""Apparel/T-Shirts",
      "variant""Red",
      "quantity": 1,
      "currency""USD"
      "price": 3.00,
      "value": 2.83,
      "tax_value": 0.3,
      "tax_name""Tax",
      "tax_type""Tax type",
      "discount_value": 0.6,
      "discount_name""Black Friday",
      "discount type""B112029"
    }
  ]
});

The following three events will be created in Finteza:

  • The "Checkout Begin" event for each item. The events will include cart_id, checkout_step and checkout_option from the cart description.
  • The "Checkout Begin" event for the cart. If cart_id is not specified, the event will not be generated.

Checkout Success #

This events means successful purchase completion. In addition to information from the previous event, it is possible to specify here the payment ID (transaction_id) and store data (affiliate). The following can be additionally specified:

  • Buyer's name (buyer) and seller's name (seller). Top sellers and buyers reports are useful if many third-party sellers operate on your site.
  • Payment system fees for the transaction (transaction_fee).
  • Net sales income, net commissions, taxes and fees (profit).

fz('ecommerce', {
  "event""Checkout Success",
  "transaction_id""CH38027",
  "affiliation""Online store",
  "buyer""john_smith",
  "seller""Europe Shop",
  "cart_id""C89367",
  "cart_items": 2,
  "currency""USD",
  "value": 7.07,
  "profit": 2,
  "transaction_fee": 0.07,
  "tax_value": 0.7,
  "tax_name""Tax",
  "tax_type""VAT",
  "discount_value": 1,
  "discount_name""Black Friday",
  "discount type""B112029",
  "shipping_value": 0.3,
  "shipping_name""Shipping",
  "shipping_type""Standard Post",
  "checkout_step": 1,
  "checkout_option" : "Shipping",
  "items": [
    {
      "id""P12345",
      "name""USB Charger",
      "brand""ChargeIt",
      "category""Accessories",
      "variant""Black",
      "quantity": 2,
      "currency""USD"
      "price": 2.00,
      "value": 4.24,
      "profit": 1.6,
      "transaction_fee": 0.04,
      "tax_value": 0.4,
      "tax_name""Tax",
      "tax_type""VAT",
      "discount_value": 0.4,
      "discount_name""Black Friday",
      "discount type""B112029",
      "shipping_value": 0.2,
      "shipping_name""Shipping",
      "shipping_type""Standard Post",
    },
    {
      "id""P67890",
      "name""Finteza TShirt",
      "brand""Finteza",
      "category""T-Shirts",
      "variant""Red",
      "quantity": 1,
      "currency""USD"
      "price": 3.00,
      "value": 2.83,
      "profit": 0.4,
      "transaction_fee": 0.03,
      "tax_value": 0.3,
      "tax_name""Tax",
      "tax_type""VAT",
      "discount_value": 0.6,
      "discount_name""Black Friday",
      "discount type""B112029"
      "shipping_value": 0.1,
      "shipping_name""Shipping",
      "shipping_type""Standard Post",
    }
  ]
});

The following three events will be created in Finteza:

  • The "Checkout Success" event for each item. The events will include transaction_id, affiliation, cart_id, checkout_step and checkout_option from the cart description.
  • The "Checkout Success" event for the cart. If cart_id is not specified, the event will not be generated.

Checkout Failed #

This event reflects a failed attempt to make a payment for an order. Unlike the previous event, this event does not contain transaction_id but contains an error description in the detail parameter.

fz('ecommerce', {
  "event""Checkout Failed",
  "detail""WebMoney Payment Error",
  "cart_id""C89367",
  "cart_items": 2,
  "currency""USD",
  "value": 7.07,
  "checkout_step": 1,
  "checkout_option" : "Shipping",
  "items": [
    {
      "id""P12345",
      "name""USB Charger",
      "brand""ChargeIt",
      "category""Accessories",
      "variant""Black",
      "quantity": 2,
      "currency""USD"
      "price": 2.00,
      "value": 4.24,
    },
    {
      "id""P67890",
      "name""Finteza TShirt",
      "brand""Finteza",
      "category""Apparel/T-Shirts",
      "variant""Red",
      "quantity": 1,
      "currency""USD"
      "price": 3.00,
      "value": 2.83,
    }
  ]
});

The following three events will be created in Finteza:

  • The "Checkout Failed" event for each item. The events will include detail, cart_id, checkout_step and checkout_option, from the cart description.
  • The "Checkout Failed" event for the cart. If cart_id is not specified, the event will not be generated.

Refund #

The event reflects product refunds. The event contains payment identifier transaction_id to link to the the original payment, and the description of the refund reason in the detail parameter.

fz('ecommerce', {
  "event""Refund",
  "transaction_id""P7788112313",
  "detail""Broken",
  "cart_id""C89367",
  "cart_items": 2,
  "currency""USD",
  "value": 7.07,
  "items": [
    {
      "id""P12345",
      "name""USB Charger",
      "brand""ChargeIt",
      "category""Accessories",
      "variant""Black",
      "quantity": 2,
      "currency""USD"
      "price": 2.00,
      "value": 4.24,
    },
    {
      "id""P67890",
      "name""Finteza TShirt",
      "brand""Finteza",
      "category""Apparel/T-Shirts",
      "variant""Red",
      "quantity": 1,
      "currency""USD"
      "price": 3.00,
      "value": 2.83,
    }
  ]
});

The following three events will be created in Finteza:

  • The "Refund" event for each item. The events will include transaction_id, detail and cart_id from the cart description.
  • The "Refund" event for the cart. If cart_id is not specified, the event will not be generated.

Increase your website revenue using:

Sign up to now and get a 30-day free access.

Bằng cách đăng ký, bạn đồng ý với Các điều khoản hợp đồng dịch vụ
Xin chúc mừng! Tài khoản của bạn đã được tạo
  • Truy cập
    finteza.com
  • Tạo
    tài khoản
  • Xác nhận
    email
  • Cài đặt

Chúng tôi đã gửi một email tới địa chỉ {email}. Vui lòng tìm nó và kích hoạt tài khoản của bạn.

Sau đó, bạn chỉ cần đăng nhập và cài đặt mã theo dõi cho trang của mình. Việc đó rất dễ dàng: