First-party data collection

To properly configure TraceDock's First-party data collection, you have to configure:

Step 1: Cookie extention

Extend all first-party cookies by adding them in the platform.

All cookies of users using Safari's Intelligent Tracking Prevention (ITP) will be extended to the expiration date as
set by your cookie policy, or up to 180 days. This means that if a user consents to place cookies, they can return to the website for up to this period (or a maximum of 180 days) for TraceDock to recognize their visit.

In the platform you can select all the cookies you want to extend:

By default, the cookie _ga has been added to the implementation. This cookie contains the persistent clientID on
which Google Analytics runs.

You can add any cookie, as long as the value in the cookie is designed to contain a persistent id.

📘

What are cookies with Persistent IDs?

It is only useful to extend cookies containing Persistent IDs. These are cookies that have a client or user identifier that is used to track a user. It realizes this by sending over the value of this cookie with each pageview of event. With this technique the server knows which pageviews and events came from the same client and can attribute the events properly.

How to identify which cookies to extend

Determining which cookies to extend and protect against the consequences of ITP is important in deciding which cookies to add to the TraceDock configuration.

Checking which cookies to protect can be done in the Storage Tab of the Developer tools.

  1. Open up Safari developer tools as per this instruction.

  2. Navigate to the Storage tab (top menu) and open the Cookies tab (left menu).

  3. Within the Cookies overview of your domain you will find all cookies, theExpires column shows which date these cookies expire.

You will notice that the Expires date is set either 24 hours or 7 days depending on if the session is deemed commercial". More information on this topic can be found in the Deep Dive: How does TraceDock extend the cookie lifetime to 180 days?.

Which cookies you should not extend

Note that not all cookies should be extended. There are two examples:

  1. Cookies that are designed to only last 24 hours. For example the Google's _gid cookie contains data around page speed calculations. In order for Google to properly manage this service, you should not extend the lifetime of this cookie.
  2. Some cookies contain state information. Such as Criteo's cto_bundle is designed to contain session-specific state information. Extending this cookie will lead to reduced attribution by Criteo.

Are you unsure if the tool you are using contains a cookie worth extending? Contact our support team and they will help you out.


Step 2: Forward client-side events

Adding client side events can be done in the platform.

All configured client side events will be forwarded in case the user has tracking prevention that blocks Google Analytics from working. This can either be an ad blocker or a browser such as Firefox or Microsoft Edge.

Add your Google Analytics Property ID

First, add your Google Analytics Property ID. This ID can be found in the admin section of your Google Analytics
and starts with "UA-".

Adding Ecommerce events

TraceDock works with Enhanced Ecommerce through DataLayer out of the box.

To add a new event, click on the button “new event” and choose one of the pre-composed templates.
We advise to add the Impressions, Detail and Purchase.

If this is not the case for your website(s), reach out to our support team for help.
We can assist in implementing (nearly) all dataLayer events that are required to measure your conversion.

Adding a custom dataLayer event

You can also configure your own custom dataLayer event. Add a "new event" and choose Other dataLayer.

Conceptually, TraceDock listens to the window.dataLayer in a similar fashion as Google's TagManager. If an object fulfils certain conditions this information is mapped into a format that Google Analytics understands and forwarded if the user has employed tracking prevention.

The following steps can be done to implement client-side events:

  1. Copy an example Raw data event from the dataLayer. The dataLayer object is an array, consisting of multiple data layer events. Select the index which you are interested in using the javaScript code td.copyDataLayer(<idx>),
    and copy the code to the TraceDock portal.

  2. Determine the conditions. These are the triggers based on the object you just copied. Make sure they are generic and will fire correctly on each page with this event.

  3. Determine the outbound data to Google Analytics. Select a predefined (ecommerce) template, and map out all the fields to the specification set by Google Analytics. You can do this visually in the editor. Use the preview mode to verify if you are happy with your matched data.

To test if your new event is coming through: click on the three dots icon ••• to check if that event becomes visible in the Live events page of the TraceDock user portal.

📘

Tip: Alternative dataLayer name?

By default the dataLayer is attached to the window.dataLayer object. Some website have an alternative name, such as when they implemented Taelium. If this is the case for you, contact support and we can modify the name for your website.

Publishing changes

After you save a client-side event, you will notice that you can publish your changes. The TraceDock user portal keeps track of all updates that you perform. Only after you publish, the changes will be built into a new plugin for your website.