The Web Extend data collection scripts track visitor interactions on your website and process this information to serve validated data to various Emarsys applications, such as Smart Insight, Predict, Interactions or the Automation Center.
This page describes the steps required to implement these scripts.
Emarsys is committed to helping you maintain a clean and compliant database, by enabling you to adhere to any data protection regulations. To learn more about how Web Extend relates to GDPR, please see:
Before you start
- The Web Extend scripts are executed asynchronously and have no effect on your website’s speed and performance.
- The Web Extend scripts manage user data in anonymous or pseudonymized form; only after the data has been imported into the Emarsys database is the web behavior associated with actual contacts.
- You don’t just want to collect data on all your current web pages, you also want to do so on all the new pages you add to your website in the future. These include new product pages and the landing pages you create for marketing campaigns. So make sure that you also add the relevant commands to the templates you use for creating different page types.
- If you maintain a dedicated mobile version of your website or have a mobile app, make sure to add the Web Extend data collection scripts to these as well.
In order to use Web Channel, you only need to perform steps 1 and 2.
First, you need to create a basis for data collection: you have to be able to track what users do on your website and you need to identify your customers, too.
Step 1. Add tracking code to your website
For the technical details, see: tracking code (Web Extend).
Step 2. User identification
For the technical details, see: user identification (Web Extend).
Prerequisites for the e-commerce commands
- You have selected a base currency for your account.
- You have uploaded your product data file.
- Before implementing the Web Extend scripts, discuss your data collection and contact identification policy with Emarsys Support.
The e-commerce commands
These scripts ensure that the right data makes its way from your website to the right places in your database, so that it can be used for reporting, recommendation, prediction, lifecycle management and many other functions.
Add the following commands to ALL pages on your website:
The following commands should only be included on specific pages on your website:
Use these JSFiddle examples below to see these commands in action. Use the Live Events viewer in the Web Behavior box on the Predict Data Sources page to check if your implementation works.
JSFiddle working code example for product pages:
JSFiddle working code example for category pages:
JSFiddle working code example for the order confirmation page:
And you're done
Once you have completed the above steps and successfully validated your integration, data collection and the enrichment of contact data through the behavior fields is continuous.
Please remember to check back on your integration’s health by visiting the Predict Data Sources page every once in a while, and at least after each change of the website front end (to ensure other updates to the pages have not corrupted the data collection scripts).