Website Visitor Identification

Contents

  1. Overview
  2. Getting Started
  3. Identifying Site Visitors
    1. Deploying Our Tag
    2. Example Usage
  4. Consuming Identification Notification

Overview

By placing our tag on your website, Traverse is able to identify your anonymous visitors and notify you of their activity on your site.

Getting Started

To get started with Traverse Website Visitor Identification:

  1. Deploy our tag.
  2. Call our tag.
  3. Consume notifications.

Identifying Site Visitors

Identify anonymous site visitors by deploying our tag and including users in your visitor identification campaign.

Parameter Description Required
advertiserId Your provided 36-character client ID (includes hyphens). Yes
campaignId Your provided 36-character campaign ID (includes hyphens). Yes
advertiserProperties A JSON object of additional properties No

Deploying our tag

Load our tag from the following URL:

https://static.traversedlp.com/v1/retargeting.js

For example:

<script src="https://static.traversedlp.com/v1/retargeting.js" type="text/javascript"></script>

This instantiates a TraverseRetargeting singleton. After initializing it, you can include a user in a campaign.

Initialization

Before using the TraverseRetargeting singleton, it must be initialized with your advertiser ID:

TraverseRetargeting.init({
  advertiserId: "YOUR-ADVERTISER-ID-HERE"
});

Inclusion

To include a user in a campaign, use the include method:

TraverseRetargeting.include({
  campaignId: "YOUR-CAMPAIGN-ID-HERE"
});

Inclusion With Advertiser Properties

Advanced users may use the advertiserProperties property to pass additional data back to themselves. This is useful if you wish to retain information about the anonymous user, such as their landing page or the products they have browsed.

TraverseRetargeting.include({
  campaignId: "YOUR-CAMPAIGN-ID-HERE",
  advertiserProperties: {
    impressionId: "5d2f8eb0-4757-48e7-9ea7-525850c22344",
    foo: "bar"
  }
});

Exclusion

To exclude a user in a campaign, use the exclude method:

TraverseRetargeting.exclude({
  campaignId: "YOUR-CAMPAIGN-ID-HERE"
});

Example Usage

Example Basic Integration

Most clients wish to identify everyone who visits their website. To do this, place the following code on every page of your site with your advertiser and campaign ID substituted in.

<script src="https://static.traversedlp.com/v1/retargeting.js" type="text/javascript"></script>
<script type="text/javascript">
TraverseRetargeting.init({
  advertiserId: "YOUR-ADVERTISER-ID-HERE"
});
TraverseRetargeting.include({
  campaignId: "YOUR-CAMPAIGN-ID-HERE"
});
</script>

Example Integration With Advertiser Properties

Calling our tag with advertiser properties, such as current page and your internal session ID may be done like so:

<script src="https://static.traversedlp.com/v1/retargeting.js" type="text/javascript"></script>
<script type="text/javascript">
TraverseRetargeting.init({
  advertiserId: "YOUR-ADVERTISER-ID-HERE"
});
TraverseRetargeting.include({
  campaignId: "YOUR-CAMPAIGN-ID-HERE",
  advertiserProperties: {
    pageUrl: window.location.href // this is one way to get the page URL
    sessionId: "6264c90f" // any other information can also be passed
  }
});
</script>

Consuming Identification Notifications

We will send you a notification containing information pertaining to the anonymous user you included once we have identified them.

Real-time campaign-request listener

To receive campaign requests in real-time, create an HTTPS listener and let us know the URL.

We will POST JSON objects with the following properties to the URL:

Property Description
campaignId Campaign ID
emailMd5Lower MD5 hash of trimmed, lowercased email address
emailSha1Lower SHA1 hash of trimmed, lowercased email address
listIds Any ids of lists in the Traverse Platform that the user is on
advertiserProperties The advertiserProperties that were defined with the inclusion

For example:

{
  "campaignId": "6a11644c-690d-4bf3-bb19-4c3efba5a5a5",
  "emailMd5Lower": "1105677c8d9decfa1e36a73ff5fb5531",
  "emailSha1Lower": "ba9d46a037766855efca2730031bfc5db095c654",
  "listIds": ["772823bd-b7be-4d23-bd78-96a577d02765"],
  "advertiserProperties": {
    "url": "www.example.com/my-current-page",
    "sessionId": "6264c90f",
    "foo": "bar"
  }
}

Note: If the listener does not promptly reply with an HTTP 2xx status code we may resubmit the request later.