This article explains how to integrate Jixie tracker on the different web pages of an Ecommerce website. It applies to both desktop and mobile.
For applications, there are other options described in other articles:
using Appflyer
using Branch
using Adjust
using directly our API
- Introduction
- Options Parameters set in the option object jixie_o
- Shared parameter across pages: action
- Product parameters
- Which tracker for which type of page
- Special action: add to cart
- Special action: add a product/offer to the wish list
- Related articles
Introduction
Jixie tracker is some Javascript to integrate to pages. There are 2 parts:
A script sitting on Jixie servers, served using our regional CDN to allow caching at the closest to the user,
Some parameters to call the script to be set by the merchant.
In terms of performance, the call is asynchronous to minimize any impact on the user experience. If the script is called several times in a row (for example due to a wrong integration as it is not supposed to happen), we block the requests to 1 request maximum per page every second to preserve the user experience.
The script is compatible with GTM.
Example of script integration:
<script type="text/javascript">
window.jixie_o = {
accountid: "123456",
sha256mail: "ab54c9890w3hg543wert"
};
window.jixie_p = window.jixie_p || [];
window.jixie_p.push({
action: "purchase",
parameters: {
items:[{itemid:"54fg4", price:"23.21", currency:"USD",quantity:2}],
transactionid: "434jh323"
}
});
</script>
<script src="{script URL}"></script>
The {script URL} will be provided to you by your Jixie' representative.
Options Parameters set in the option object jixie_o
Parameter | Description |
|---|---|
accountid (mandatory) | The ID that has been provided by your account manager |
sha256mail (optional) | SHA256 encoded email following the normalization as explained on https://unifiedid.com/docs/getting-started/gs-normalization-encoding#email-address-normalization |
sha256phone (optional) | SHA256 encoded phone number following the normalization as explained on https://unifiedid.com/docs/getting-started/gs-normalization-encoding#phone-number-normalization |
partner_id (optional) | A partner ID (override partner_cookie if provided). You can provide us any partner ID that uniquely identify your users. |
partner_cookie (optional) | The cookie from which we retrieve the partner_id. If the partner ID is stored in a cookie you create, we can retrieve it directly. |
sha256mail_cookie (optional) | The cookie storing the hashed email. |
deviceid (optional) | The device ID of the user when known. |
The tracker is using a parameter to identify your website: it is the accountid.
When the user is logged you can send his encrypted email address: for example, instead of me@myemail.com we will ask for its SHA 256 encoding. This hashed email is used for multi-device tracking.
If the user is not registered, either don’t integrate the parameter, either let it empty.
We can also handle partner IDs that will be used to sync ID or to report based on those IDs instead of Jixie IDs. It is given either by filling the partner_id parameter, either by setting the name of the cookie to retrieve the ID from.
Shared parameter across pages: action
All pages include the parameter action. It simply describes on which page the user is, or which action he is performing. Additional parameters need to be provided depending on the action. The different potential actions are:
viewhome: used when the user visits a home pageviewitem: used when the user visits an article (or item, or product)viewlist: used when the user browse a list of items. For example the list of monitor products.viewsearch: used when the user make a search on the websiteviewcart: used when the user is on the basket pageaddcart: used when the user ads an item to his basketaddwishlist: used when the user adds an item in its favorites or wish listpurchase: used when the user make a purchaseinstall: used when the user installs an applicationsubscription: used when a user subscribes to an offerviewsection: used when the user visits a section (for publishers, it is sub home page, for example the news section of a website, for a e-commerce it can be a category page).visit: used when the user visits any other page (for publishers, it will be an article for example).startfunnel: used when the user starts a funnel (for example payment or subscription or lead acquisition)funnelcompleted: used when a user completed a funnel (for example payment or subscription or lead acquisition)
Product parameters
For several actions we need to receive the description of related items. The structure of the items is always the same. What changes is that the parameters can integrate a single item or several items depending on the case.
An item is defined with mandatory attributes, and optional ones. They are provided as JSON objects.
Attribute | Type | Description |
|---|---|---|
itemid (mandatory) | string | The ID of the product/offer that can be found in the products/offers feed shared with Jixie. |
price (mandatory) | float | The price is the item is local currency. |
currency (mandatory) | string | ISO 4217 code of the currency (for example IDR, USD, SGD, …) |
quantity (optional) | integer | The number of products (default 1) |
product_name (optional) | string | The product name. |
category (optional) | string | The category of the product. Can be literal or code of the category. |
availability (optional) | string | Value can be |
recurrence (optional) | string | For subscription, indicates the recurrence of the subscription. Acceptable values are |
Example of object:
{
"itemid":"123456",
"price":23.21,
"currency":"USD",
"quantity":1,
"product_name":"Our awesome product",
"category":"Electronics",
"availability":"instock"
}