Tracking Online Customer Behaviour
About Shopify, Please refer below link for your reference:
Install Omnichat Pixel on ShopifyGet Started
Before you start, please follow the instructions to install Omnichat website chat plugin on your website first.
After that, please follow the steps below to get started with online customer behaviour tracking.
Set Up Sync Website Member Data
memberId
string
No
memberEmail
string
No
memberPhone
string
No
memberName
string
No
memberProfilePic
string
No
memberCustomAttributes
string
No
To save custom attributes, you must purchase the 'Pixel Custom Attributes' feature. Please note that a separate fee will be charged if you need our assistance with installation.
Paste the Javascript below before the </body> HTML tag on each page of your website:
<script type="text/javascript">
// OMNICHAT TRACKER V1.0
window.omnichatTracker = window.omnichatTracker || [];
window.omnichatTracker.push(['init', 'config', {
"memberId": "<LOGGED-IN-MEMBER-ID>",
"memberEmail": "<LOGGED-IN-MEMBER-EMAIL>",
"memberPhone": "<LOGGED-IN-MEMBER-PHONE-NUMBER>",
"memberName": "<LOGGED-IN-MEMBER-NAME>",
"memberProfilePic": "<LOGGED-IN-MEMBER-PROFILE-PICTURE-URL>",
"memberCustomAttributes": {
"<CUSTOM-ATTRIBUTES-KEY>": "<CUSTOM-ATTRIBUTES-VALUE>",
"<CUSTOM-ATTRIBUTES-KEY>": "<CUSTOM-ATTRIBUTES-VALUE>",
"ThirdPartyId": "xxxx-xxxx-xxxx-xxxx", //demo data
"TotalSpending": 900.00, //demo data
"RegisterDatetime": "2022-11-01T14:16:00" //demo data
}
}]);
</script>Once activated the customer behaviour tracking, you will be able to get detailed information of online customers, such as name, member ID, phone number, email address, and these will be shown in your admin panel. This can facilitate you to identify your online customers easily.
Replace <LOGGED-IN-MEMBER-ID> as member ID of a logged in user. If the user is a visitor or no relevant information provided, leave it blank.
Replace <LOGGED-IN-MEMBER-EMAIL> as email address of a logged in user. If the user is a a visitor or no relevant information provided, leave it blank.
Replace <LOGGED-IN-MEMBER-PHONE-NUMBER> as a phone number of a logged in user. (Phone numbers must start with an international country calling code e.g. 852, 886. Otherwise the phone numbers might not able to be successfully bound to member information). If the user is a a visitor or no relevant information provided, leave it blank. Website Binding via Pixel When a website member's data synced through Pixel includes a phone number from Hong Kong (HK), Macau (MO), Singapore (SG), Malaysia (MY), or Indonesia (ID), Omnichat will automatically create or update the corresponding WhatsApp contact and bind it to that browser.
Replace <LOGGED-IN-MEMBER-NAME> as the name of a logged in user. If the user is a visitor or no relevant information provided, leave it blank.
Replace <LOGGED-IN-MEMBER-PROFILE-PICTURE> as the profile picture of a logged in user. If the user is a a visitor or no relevant information provided, leave it blank.
Replace <CUSTOM-ATTRIBUTES-KEY> as the name of the custom attribute (e.g. MembershipLevel, Birthday, Gender). This key will be the label displayed in your admin panel.
Replace <CUSTOM-ATTRIBUTES-VALUE> as the specific value of the custom attribute for a logged in user. If the user is a visitor or no relevant information provided, leave it blank. It is recommended to store fewer than 5 custom attributes, and each attribute length must not exceed 60 characters. If the total length of the API request exceeds the URL limit, the saving process will fail. Please test before production use to ensure successful storage.
Before saving custom attributes, corresponding keys must first be created in the Omnichat console. If a key does not exist when data is received, the system will automatically ignore that attribute.
When sending custom attributes, the attribute values must adhere to the following format specifications:
Text: No specific format restrictions.
Number: Use numeric formats (Integer/Float); strings are not allowed.
Boolean: Use
true/false.Datetime: Use an ISO8601 formatted date-time string (e.g.,
2022-11-01T14:16:00).Date: Use a string in
YYYY-MM-DDformat.
Set Up E-commerce Tracking
Introduction
Leveraging on our Javascript plugin, you will be able to collect e-commerce data of your customers as well as visitors. All data collected can be viewed in the report session or do better targeting for message broadcast in Omnichat admin panel.
Product Data
It refers to product-related events such as adding to cart and checkout etc. It contains the following values:
id
string
Yes
SKU
name
string
Yes
Product name
brand
string
No
Product brand
category
string
No
Product category
variant
string
No
Product variation
quantity
integer
No
Product quantity
price
number
No
Product price
Order Data
It refers to the information about an order that has taken place. It contains the following values:
transaction_id
string
Yes
Transaction ID
amount
number
Yes
Order amount
currency
string
No
Checkout currencyM
Track Product Details Views
After clicking a product listing, a user may view the product details page. To track product details views, send a view_item event with product details:
Track the behaviour of "Add to Shopping Cart"
To track the behaviour of "Add to Shopping Cart", send an add_to_cart event with the product information:
Track the behaviour of "Remove from Shopping Cart"
To track the behaviour of "Remove from a Shopping Cart", send an remove_from_cart event with the product information:
Track Checkouts
To track checkouts, send a checkout event with the checkout items:
Track Purchases
To track transactions, send a purchase event with the items in the transaction:
Last updated