Tracking code

Website session tracking allows you to:

  • Track both anonymous and known activity on your website and store, and

  • Display capture widgets to visitors.

If you have configured any of the following data sources through the Data sources page:

or via the Getting started route, then by default, Autopilot session tracking functionality is configured automatically.
Therefore, you do not need to configure the tracking code below for these data sources.

Configure the tracking code in your data source

By default a website session tracking code is created for all Autopilot accounts. This can be found by navigating under Customer Data to Data Sources.

You can find installation instructions by clicking on the website session tracking data source. There is an option to copy the code or email the instructions to a developer. If you’re using one of the data sources listed above, the tracking code will automatically be installed (e.g. into your theme.liquid file for Shopify) and will work automatically. No additional setup is required.

The website session tracking works similar to Google Analytics. We recommend adding this code using Google Tag Manager (GTM) or in the <head> …​ </head> section of the HTML on your website.

User session association

User sessions are identified using activities that help with identification, for example:

  • Email clicks;

  • Capture forms;

  • Starting a checkout in Shopify; and

  • Session association in the tracking code.

To associate a known user session by email address replace the default:

ap3c.track({v: 0});

with the following to your tracking code:

ap3c.track({"v":0,"email":"user@emaildomain.com","first":"John","last":"Apple"});

To associate a known user session by external ID replace the default ap3c.track({v: 0}); with the following in your tracking code:

ap3c.track({"v":0,"ei":"ID4674","first":"John","last":"Apple"});

Activities created from the website session tracking code

There are two activities that come from the website session tracking:

  • Website session; and

  • User session.

A website session is activity for both anonymous and known sessions. It can be used to report on all website sessions. Each session is limited to 50 pages per session and has a minimum time out of 15 minutes, and a maximum 12 hour session time out. We automatically suppress the website session activity in people and organization contact profiles, so you will only see user sessions since they are associated. Website session activities can be used in reports and for filtering people based on activity in your customer data platform (CDP).

A user session is activity of known sessions. It is a duplicate of a website session activity but associated with a known user in your database. It has the same limitations of 50 pages per session and has a minimum time out of 15 minutes, and a maximum 12 hour session time out.

Both website session and user session activities will appear after a minimum time out of 15 minutes. The session must conclude and timeout before the activity will be generated.