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
  • Web Data Collection
  • 0 Getting Started Web Data Collection

In this section:

  • Web Extend - Overview
  • Data collection JavaScript API reference
  • About the Web Extend tracking code
  • Identifying users with Web Extend
  • Web Extend Data Collection - FAQ
  • in Emarsys42

    Expand all

    Data collection JavaScript API reference

    Updated: December 20, 2018 10:09

    The Emarsys JavaScript API (also sometimes referred to as Web Extend) is a data collection system that captures the activity and behavior of website visitors. This information is used to enrich your Emarsys contact database with web behavior fields, and to generate personalized product recommendations for the Predict solutions.

    Ready to jump in? Find our Javascipt API reference on the Emarsys Developer Hub.

    How this works with other Emarsys products

    The Emarsys JavaScript API may be used for both data collection and for obtaining Predict product recommendations. In addition, Discovery is also enabled using this API. API features which are related to other Emarsys products than (such as Predict and Discovery) are marked as such in the Command Reference.

    Prerequisites

    In order to use the JavaScript API, you have to load the scarab-v2.js JavaScript source to your page. The code snippet you need to insert into your websites HTML is available in your Emarsys Marketing Platform account. To display it, go to Admin > Data Sources and click Show tracking code in the Web Behavior box. The code you will see in the modal window already contains your Merchant ID, so all you need to do is paste it into your websites HTML.

    Make sure to add our tracking code to all pages on your website, immediately before the </head> element. As the scarab-v2.js file is loaded asynchronously, it does not block the rendering of the page or the execution of other JavaScript code.

    If you have already implemented the tracking code in your website, you can still display it at any time on the Data Sources page. To do so, find the Account Details box on the bottom right-hand side, and click Tracking code next to your Merchant ID.

    Command Reference

    You can find all information on implementing the Javascript API on your site on the Emarsys Developer Hub.

    Web Extend supports the following commands:

    • availabilityZone (Predict command)
    • cart
    • category
    • displayCurrency (Discovery command)
    • exclude (Predict command)
    • go
    • include (Predict command)
    • language (Predict and Discovery command)
    • purchase
    • recommend (Predict command)
    • SC Object
    • searchTerm
    • setCustomerId
    • setEmail
    • tag
    • testMode
    • view
    Was this article helpful?

    Have more questions? Submit a request
    Return to top

    You may also be interested in:

    Related articles

    • Google Tag Manager and data collection
    • Implementing the Web Extend data collection scripts
    • Preparing your product data file
    • Uploading your sales data
    • Mobile data collection
    Copyright © 2019 Emarsys eMarketing Systems. All rights reserved
    Legal Notice Privacy Policy Master Services Agreement Anti-spam Policy
    test new search