Logo Help Portal
  • Getting Started

    Introduction

    • Onboarding overview
    • Project Initiation
    • Email compliance
    • Account Administration

    Data

    • Data exchange
    • Data onboarding
    • Web data collection

    Channels

    • Email onboarding
    • Smart Insight
    • Predict
  • Training
    • Online Self Learning
    • Onboarding Videos
    • Instructor Led Training
    • Webinars
    • Seminars
  • User Guides

    Strategy

    • Personalization
    • Automation
    • Data Monitoring

    Channels

    • Email
    • Mobile Apps
    • Web
    • Ads

    Add-ons

    • Smart Insight
    • Predict
    • Incentive Recommendation
    • AIM
  • News & Support

    News

    • What’s New in the Emarsys Platform
    • Pilot features
    • Articles on Data Protection and GDPR
    • Release notes - archive

    Support

    • Help and Support at Emarsys
    • Managing your user profile
  • |
  • Developers
  • System Status
Need help? Submit a request
English Deutsch Español Français Русский Türkçe 简体中文
Sign in
  • Getting Started
  • Data Onboarding
  • 0 Getting Started Data Onboarding

In this section:

  • Data onboarding - Overview
  • Uploading your product data
  • Implementing the Web Extend data collection scripts
  • Google Tag Manager and data collection
  • Mobile data collection
  • Uploading your contact data
  • Uploading your sales data
  • Relational data onboarding
  • in Emarsys42

    Expand all

    Implementing the Web Extend data collection scripts

    Updated: October 22, 2018 08:38

    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 or the Automation Center.

    This page describes the steps required to implement these scripts.

    Contents:

    • Data protection
    • Before you start
    • Implementation steps
      • Step 1. Add tracking code to your website
      • Step 2. User identification
      • Step 3. Implementing the e-commerce JavaScript commands
    • And you're done

    Data protection

    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: 

    • GDPR and Web Extend - all you need to know.

    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.

    Implementation steps

    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

    This code makes it possible for you track the behavior of your visitors on your website using our JavaScript API commands, and it is also the basis of cross-device user identification and campaign tracking. Its implementation is a prerequisite of using those Emarsys products, such as Web Channel or Predict, that rely on the Web Extend data collection scripts.

    For the technical details, see: tracking code (Web Extend).

    Step 2. User identification

    By default, Emarsys uses cookies to keep track of website visitors. However, in order to match visitors with contacts in your contact database we have to explicitly identify known visitors, such as logged-in users or otherwise anonymous visitors who enter their email address on your website. This is the basis of cross-device user identification.

    For the technical details, see: user identification (Web Extend).

    Step 3. Implementing the e-commerce JavaScript commands

    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 command to ALL pages on your website:

    • cart - Reports the cart content of your visitors.

    The following commands should only be included on specific pages on your website:

    • view - Reports the ID of the product being viewed on your product page.
    • category - Reports the category path being visited.
    • purchase - Reports the orders placed. This is the basis of all revenue statistics in Emarsys.

    Make sure that the JavaScript API commands are never cached. In most template-based webshop engines, caching is set on specific paths – always make sure that the templates in which you implement these API commands are never in a cached path, as this will cause the API to report erroneous data.

    Use these JSFiddle examples below to see these commands in action. Use the Live Events viewer in the Web Behavior box on the 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 Data Sources page every once in a while, and at least after each change of the website frontend (to ensure other updates to the pages have not corrupted the data collection scripts).

    Was this article helpful?

    Have more questions? Submit a request
    Return to top

    You may also be interested in:

    Related articles

    • Data collection JavaScript API reference
    • Identifying users with Web Extend
    • Data onboarding - Overview
    • Preparing your product data file
    • About the Web Extend tracking code
    Copyright © 2019 Emarsys eMarketing Systems. All rights reserved
    Legal Notice Privacy Policy Master Services Agreement Anti-spam Policy
    test new search