Segment

Customer Recognition Tag

The 'Why'

One of FullContact's powerful services is the ability to recognize anonymous web traffic, providing a PersonID for recognized web visitors that stays the same, regardless of device or browser. This PersonID is often a good unified customer ID to use within CDPs such as Segment. PersonID can then be used for segmentation, attribution, and customer journey analysis, all within the CDP.

If you are already using Segment, there's a quick way to start bringing PersonIDs inside the platform.

First Steps

If you are integrating FullContact's Customer Recognition Tag with the Segment tag, make sure you have followed the below steps before getting started:

1.) Made an account with FullContact, and been enabled to create a Customer Recognition code snippet (that includes a unique API key):

ex: 7W1fw6wYJa5tzdP2iB0po6UM5PznZDld

2.) Have an existing Segment tag in your tag manager of choice (ex: Google Tag Manager)

📘

Implementations Vary!

If your Segment tag integration has been customized or modified from the standard implementation, names and variables may be different. Make sure to double-check the variables and tag names your implementation is using before using the below code.

Modifying the HTML

If all the above steps have been taken, find the Segment 'analytics.track' event (or add it, if missing) and modify it's HTML. Replace the analytics.track event with the below code:

function getCookie(name) {
  const value = `; ${document.cookie}`;
  const parts = value.split(`; ${name}=`);
  if (parts.length === 2) return parts.pop().split(';').shift();
}

getCookie("fc_pid")

analytics.track("fc_pid": getCookie("fc_pid")})

🚧

Edit it!

Make sure you modify the above code if you have changed either the cookie name or storage location from the default "Cookie storage" and "fc_pid" names provided in the FullContact Platform.

Publish and enjoy

When you save and publish the new code, you are all setup. PersonID for recognized customers will begin to funnel into the Segment platform for anonymous visitors.

FAQs

Q1. I am not seeing PersonID - what's wrong?

Answer: While a PersonID is not given for every website visitor, you should start to see around 30%+ of traffic identified. If no PersonIDs are appearing at all, make sure you have your FullContact Customer Recognition Tag working correctly, placing a cookie named "fc_pid" into the browser.