Documentation
APICreate a Ticket
  • 📔Documentation Guide
  • 📨Data & Engagement Platform
    • Data Model
      • Customer Data
      • Product Catalogue
      • Events
        • Onsite Events
        • Outbound Events
        • Transactions
    • App User Management
      • User Roles
      • App Users
    • Data Management
      • Data Management with API
      • Data Management with Data Feeds
        • Users
          • Import Users
          • Update or Delete a User Trait via File Upload
          • List of Standard User Traits/Attributes
        • Products
        • Events
          • Import Orders
          • Import Events
          • List of Events and Properties
      • Data Export
    • Web Tracking
      • Web Tracking v1 (Legacy)
        • Setup
        • Set up business Units
        • Tracking User Behavior
          • Identify Method
          • Page Method
          • Track Method
          • Opt-Out from Tracking
        • Testing & Debugging
      • Web Tracking v2
        • Setup using Google Tag Manager
        • Setup without a Tag Manager
        • Configuration & Config Commands
        • Tracking User Behavior
          • Identify Method
          • Update Method
          • Page Method
          • Track Method
          • Opt-Out from Tracking
        • Testing & Debugging
      • Migrate Tracking SDK v1 -> v2
      • Mobile Web Tracking
    • User Segmentation
      • Creating a Segment
      • Conditions
      • Combining Segments
    • Messages
      • Frequency Capping
      • Templates
        • Template Builder
      • Integrations
        • Channels
          • SMS
            • Twilio
              • Set up a Twilio Account
              • Set up Twilio Integration
              • Create a Campaign Message
            • Link Mobility
              • Set Up Link Mobility Account
              • Set up Link Mobility Integration
              • Create a Campaign Message
          • SFTP
            • Set up SFTP Integration
            • Create a Campaign Message
          • Direct Mail
            • Optilyz
              • Set up Optilyz Integration
              • Create a Campaign Message
          • Webhooks
            • Single Webhook
              • Set up Webhook Integration
              • Create a Campaign Message
              • Response Data and Custom Events
            • Batch Webhook
              • Set up Batch Webhook Integration
              • Create a Campaign Message
            • Zenloop via CrossEngage Webhook
              • Set up Zenloop Integration (via CrossEngage Webhook)
              • Set up Zenloop Survey
              • Create a Campaign Message
              • Set up Zenloop Survey via ESP
              • Obtain Response Data
            • Google Analytics via Webhook
          • Segment Transfer
            • Facebook
              • Set up Facebook Developer Account
            • Optimizely
              • Set up Optimizely Account
            • Google Analytics
              • Set up Google Analytics Integration
              • Create a Campaign with Google Analytics
              • Using the Google Analytics Integration
            • Airship
              • Set up an Airship Account
              • Set up an Airship Integration
              • Create a Campaign Message with Airship
          • Onsite Display
            • Trbo
              • Set up Trbo Integration
              • Create a Campaign Message in CrossEngage
              • Configure Campaign Message in Trbo
              • Obtain Response Data
          • Email
            • Mailjet
              • Set up Mailjet Integration
              • Obtain Response Data via Webhook
              • Create a Campaign Message
              • Personalize Preview Texts in Mailjet
            • Mandrill (by MailChimp)
              • Set up Mandrill Integration
              • Obtain Response Data via Webhook
              • Create a Campaign Messege
            • Inxmail
              • Set up Inxmail Integration
              • Create a Campaign Message
            • Sendgrid (by Twilio)
              • Set up SendGrid Integration
              • Obtain Response Data via Webhook
              • Create a Campaign Message
            • Mailgun
              • Set up Mailgun Integration
              • Obtain Response Data via Webhooks
              • Create a Campaign Message with Mailgun
            • Episerver (Optimizely)
              • Set up Episerver Integration
              • Create a Campaign Message with Episerver
          • Push Notifications
            • Airship
              • Set up an Airship Account
              • Set up an Airship Integration
              • Create a Campaign Message with Airship
        • Attachments
        • Delete an Integration
      • Personalization
        • Import Data
          • User Profile Data
          • Campaign Data
          • Cart Data
        • Formatting Functions
          • Date Formatting
          • Number Formatting
          • String Formatting
          • Hash Functions
        • General Helper Functions
          • Conditional Functions
          • Filtering Arrays
        • Product Helper Functions
          • Fetch from Product Feed
          • Fetch from Tracking Event
          • Fetch from User Journey
        • Misc. Helper Functions
          • Voucher Helper Function
            • Vouchers: Use Case
          • Event Helper Functions
          • Opt Out Helper Functions
        • Operators
      • Vouchers
        • Creating Vouchers
        • Using Vouchers
    • Campaign Management
      • Campaigns
        • Create an Audience Campaign
        • Create a Real-Time Campaign
        • Control Group
      • Stories
        • Building a Story
        • Use Case: Welcome Story
      • Segment Transfer
        • Create a Segment Transfer Campaign
    • Consent Management
      • Subscription/Consent Management
      • System Opt-Out/Opt-In
      • System Blacklist/Whitelist
    • Prediction Models
      • Create a new Model
      • Feature Engineering
      • SQL Filter
    • System Monitoring
      • Dashboard
        • Segment Tracker
      • Events Overview
      • Activity Log
      • Slack Notifications
        • Setting up Slack Notifications
    • Help & Support
      • System Status
      • Reach out to Customer Support
      • Suggest an Improvement
      • Privacy Policy
    • Glossary - Data & Engagement
  • 📈Predictions Platform
    • Data Model
      • Customer Data
      • Transactions
      • Activities
    • Overview
      • Data Tab
        • Data Tables in the Predictions Platform
      • Insights Tab
      • Model Builder Tab
        • Feature Engineering
        • Custom SQL Filter
        • Model Report
      • Prediction Tab
      • Selections Tab
    • Tutorials
      • Prepare and Validate Data
      • Analyze RFM Customers
      • Create a new Model
      • Predict Campaign Profit
    • Glossary - Predictions
Powered by GitBook
On this page
  • Overview
  • Implementation
  • Identify users with an id
  • Identifying a user using email
  • Use cases
  1. Data & Engagement Platform
  2. Web Tracking
  3. Web Tracking v1 (Legacy)
  4. Tracking User Behavior

Identify Method

Overview

The identify method is used to identify, create and update users in CrossEngage. This means that anytime you can relate user's actions or attributes to a recognizable user ID, you should consider triggering identify e.g. when a user logs in, updates their profile or signs up for a newsletter.

The identify method is also used as a means to update users in the CrossEngage platform in real time and can be executed with every trait.

You do not need to call identify for anonymous visitors of your website as CrossEngage automatically assigns them an anonymous xngGlobalUserId.

Personal information can be sent via web tracking but we recommend to transmit sensitive information (like address, telephone etc) per API or upload via feed.

The identify method has the following structure:

analytics.identify([externalId],[attributes]);

Method Parameters

Value

Type

Description

externalId

string

The ID of the user you are identifying. Mandatory unless noUserId is present within the attributes object.

attributes

object

Object that contains information about the user you are creating or updating, see examples below. The key noUserId is mandatory if externalId is not included when calling the function.

Implementation

id and email (and also businessUnit) needs to be available in your data layer before you fire the request to us. If not, this might cause issues with data and will lead to incorrect mapping.

This section goes through the methods that can be used for user identification in cases where an id is known and when it is not.

Identify users with an id

var externalId = '12345abcd';
var attributes = { 
    "name": "John Doe", 
    "email":"john@xng.com", 
    "plan": "tier3", 
    "logins": 10, 
    "street": "6th St", 
    "city": "Berlin", 
    "state": "Berlin", 
    "postalCode": "10557", 
    "country": "Germany" 
}; 
analytics.identify(externalId, attributes);
  1. Copy the snippet.

  2. Create a custom HTML tag on your tag manager and paste the snippet between <script></script> HTML tags.

  3. Set up a trigger which fires upon the form's submission

Using the function that listens for the form's submission, call the identify function with the traits shared with you.

Identifying a user using email

For cases when you may not have access to the externalId, CrossEngage allows you to identify users using email.

var attributes = { 
    "name": "John Doe", 
    "email": "john@xng.com", 
    "plan": "tier3", 
    "logins": 10
}; 

analytics.identify(attributes);

Please note that CrossEngage automatically fills the businessUnit property with an empty string when it is not provided. This will prevent the duplication of profiles with the same email address which do not have a business unit.

Use cases

A user enters their email to sign up for a newsletter and submits the form

The identify call should create the user based on their email without the externalId field. Consider also sending the subscription status as an optional trait.

var attributes = {
    "email": "john@xng.com",
    "noUserId": "true",
    "subscriptionStatus": "true"
}
analytics.identify(attributes);

A user logs in using their username and password

Upon successful login, call the identify function with a setup as per below:

var externalId = "211519787" 
var attributes = {
    "name": "John Doe",
    "logins": 10
}
analytics.identify(externalId, attributes);

A user signs up using their personal information

Upon successful registration, call the identify function with the newly created externalId and any newly gathered information:

var externalId = "211519787" 
var attributes = {
    "name": "John Doe",
    "plan": "tier3", 
}
analytics.identify(externalId, attributes);

You should consider sending all of the information that the user provided in their registration form so the user is set up on the CrossEngage platform in real time.

Never send any user passwords or tokens through CrossEngage web tracking functions.

A user changes their address information

Upon form submission, call the identify function with the new address values:

var externalId = "211519787" 
var attributes = {
    "address": "Bertha-Benz-Strasse 5",
    "postCode": "10557", 
    "city": "Berlin",
    "country": "Germany"
}
analytics.identify(externalId, attributes);

This ensures that this user's data is updated on the CrossEngage platform in real time. For example, after an update is made, direct mail campaigns can immediately have access to the most recent address information.

PreviousTracking User BehaviorNextPage Method

Last updated 2 years ago

📨