Intercom logo

Intercom

Attribution data for Intercom

Know what brought the visitor into the conversation.

Your website

Script installed

SourceTag

Captures attribution

JS API

Reads cookie data

Intercom

Data arrives tagged

The problem

Intercom logs the conversation. It has no record of the ad or search that got the visitor to your site in the first place.

How to set it up

SourceTag exposes the attribution data through a small JavaScript API (window.__sourcetag). Read it and set custom attributes on the Intercom conversation.

1

Install SourceTag

Add the script tag to your site.

2

Read the API and set attributes

Call the JS API for first and last click data, then write it to Intercom custom attributes.

3

Check a conversation

Open a conversation record and confirm the attributes are there.

Using the JavaScript API

Chat tools don't use traditional forms, so SourceTag takes a different approach here. Instead of hidden fields, you read attribution data from the JavaScript API and pass it into Intercom's contact properties.

const fc = window.__sourcetag?.getFC();
const lc = window.__sourcetag?.getLC();
// Returns: channel, source, campaign, term, ...

The API gives you the same data that hidden fields capture. See the full JS API reference →

Frequently asked questions

Related integrations

Start with one form.

The trial is 14 days and doesn't need a card.