Order Tracking Tag
Overview
This Tag is used to track e-commerce orders, in order to feed both Popsell’s affiliation and conversational programs.
Please refer to Sales tracking and attribution rules to learn about the tracking process.
This tag should be inserted on checkout and order confirmation pages.
Checkout Page
The checkout page is the page which displays the cart or the order summary, just before proceeding with the payment.
Make sure the tag is on a page where the order cannot be updated anymore by an AJAX script (e.g. quantities, promo code), otherwise the data sent by the tag will be wrong.
Installing the tag on the checkout page is optional, but highly recommended. The purpose of the checkout tag is to enable the recovering of orders that could have been missed on the order confirmation page, for example if the user closes bis browser immediately after the payment, thus preventing the confirmation tag to run.
As far as possible, the email address of the customer should be filled to enable a later recovery.
Order payment confirmation page
The order confirmation page is displayed after the payment has been processed. This tag returns the order information and payment confirmation. Only paid orders will enable rewards and challenges to be triggered.
A known issue is that the customer may close is browser before the confirmation page is displayed or fully loaded. This will prevent the order information to be tracked. That is why it is important to setup the Checkout Tag, and an offline process to recover the missed orders.
Tag
<popsell-tracking></popsell-tracking>
Attributes
attribute | description | mandatory |
---|---|---|
cart_id | Identifier of current cart or session | checkout, confirmation |
order_id | Unique order identifier | confirmation |
order_status |
| confirmation |
total_amount | Total order amount paid or to be paid | confirmation |
total_ws | The total amount of the order, including taxes and without shipping costs. This amount is the one used for gamification and reward calculations. It is recommended with taxes and without shipping costs, but another amount can be passed as a parameter if you prefer a different basis of calculation. If set to 0, it will be automatically set as the sum of the order detail prices. | confirmation |
products | A JSON formatted list containing the product ID, name, unit price and quantity (for each product of the order).
CODE
| No. Default : [] |
firstname | Client first name | Do not fill if data privacy policies do not allow transfer to Popsell. |
lastname | Client last name | Do not fill if data privacy policies do not allow transfer to Popsell. |
Client email | Do not fill if data privacy policies do not allow transfer to Popsell. | |
optin | Accepted for Brand communications
CODE
| No. Default : 0 |
Parameters
URL parameters to activate the tracking (GET method).
These parameters are only use on the landing/redirection page.
name | format | data |
---|---|---|
popsell_session_shop | idPopliste_source_tagVersion_cookieDate_confirmationMessage_alias_id-affiliate | tracking datas |
popsell_redirect | URL | URL to redirect after data backup |
Popsell_shop_session
name | description | Default value |
---|---|---|
id_popliste | Unique popliste identifier | Last active popliste id |
source | Origin of the poplist share | DEFAULT |
tagVersion | Popsell tag version (210 or 300) | |
cookieDate | Cookie expiration date | 0 |
confirmationMessage | 0 | |
alias | Brand alias | |
id-affiliate | Popsell unique identifier of the user who initiated the order |
Integration
Landing / redirection page
<popsell-tracking></popsell-tracking>
Checkout page
<popsell-tracking
cart_id=""
total_amount=""
products="[]"
firstname=""
lastname=""
email=""></popsell-tracking>
Order payment confirmation page
<popsell-tracking
cart_id=""
order_id=""
order_status=""
total_amount=""
total_ws=""
products="[]"
firstname=""
lastname=""
email=""
optin=""></popsell-tracking>