JS tracker
Overview
Loymax SmartCom JS tracker is a small piece of JavaScript code, installed on the user's website similar to Google Analytics tracker. The tracker registers customer's visit to the website and links this visit to the customer's profile on the Platform.
Based on data from the tracker, the Platform builds a map of customer interests with respect to products and product categories, and allows implementation of abandoned cart returns and other web triggers.
Features
The tracker captures the following web events:
Website visit (start of the new session);
Product preview;
View product category;
View section (string name of the section is fixed; for example, action_xxx, application_partnership);
Authorization/customer registration;
Abandoned cart processing;
De-anonymizing
The Platform stores a 60-day history of anonymous visits. This means that if an unidentified visitor has performed actions on the website (such as being interested in certain products) and then within 60 days has logged in or registered on the website, that visitor's actions will be "filed" in the corresponding customer profile on the Platform.
If a customer was never authorized on the website or placed orders on the website, he/she can still be automatically identified if he/she clicks on the link from the Platform newsletters at least once.
It is recommended to conduct mailings at least 2-3 times per month, "marking" customers to effectively collect data on their behavior on your website.
Setting up the tracker
Tracking code
Set the tracking code loading on all pages of your website.
where
(int) SHOP_ID
is your numeric identifier on the Platform. To get it, write a request to our technical support team.(string) ESRC_ID
is the event source identifier which corresponds with sources specified in the settings, for example: online store/mobile app.
The ESRC_ID parameter can be empty. If it is not specified, the event source ID will be the one specified by default in the settings.
Example:
It is desirable to place a tracker code as close as possible to the beginning of the page after the code of the main Google Analytics counter.
Loading the tracking code must be done BEFORE the calls described in the following paragraphs.
Authorization and registration
Add a tracking code call to authorization and registration events
where (string) USER_ID
the unique identifier of customer in your information systems.
Example:
As USER_ID use the code that is passed through the integration as the primary key in the Platform.
View section
Add a tracking code call on the section view event:
where (string) PAGE_NAME
page ID, which you can later use when setting up the Customer visited section trigger.
Example:
View product category
Add tracking code call on the product category view event
where (string) CATEGORY_ID
is a product category identifier in your information system.
Example:
This code is usually located on the product list page of a product category.
Use that category code as the CATEGORY_ID, which is passed to the Platform through the integration.
Product preview
Add a tracking code call on the product preview event:
where:
(string) CATEGORY_ID
product category identifier in your information systems.(string) PRODUCT_ID
product identifier in your information systems.
Example:
This code is usually located on the product card page.
As CATEGORY_ID and PRODUCT_ID use those category and product codes that are passed to the Platform through the integration.
Adding product to cart
Add tracking code call on the event of adding a product to cart:
where:
(string) CATEGORY_ID
is a product category identifier in your information systems.(string) PRODUCT_ID
is a product identifier in your information systems.
Example:
Removing product from cart
Add a tracking code call on the event of removing product from cart:
where: (string) PRODUCT_ID
is a product identifier in your information systems.
Example:
Cart cleanup
Add a tracking code call on cart cleaning up event:
The method has no parameters.
Example:
Checkout completion
Add tracking code call to checkout completion event:
where: (string) ORDER_ID
order identifier in your information systems.
Example:
This code is usually located on the "Thank you, your order has been successfully completed" page.
As ORDER_ID use the order identifier that is passed to the Platform through the integration.
Registering arbitrary event
The tracker can register arbitrary user-defined events, such as news subscription, event recording, or product availability subscription. To register an event, add a call to the event registration code:
where: (string) EVENT_NAME
is event name, which you can later use when configuring the Platform trigger.
Example:
Last updated