Best Practices: Improve GDPR TCF v2 Message Loading (Legacy)

The faster your organization collects end-user consent, the faster you can action upon their preferences and potentially deliver customized ads. In this article, we have aggregated some implementation best practices to improve the loading speed of your GDPR TCF v2 messaging experience for your property.

There are a multitude of factors and nuances that can limit your adoption of recommendations suggested in this article. Results may vary and we strongly urge your organization to thoroughly test your property's performance when using improvements suggested in this article.

Please contact your Sourcepoint representative for customized recommendations and solutions tailored for your organization.

The recommendations made in this article is intended to raise the connection priority given to the Sourcepoint messaging connection and remove any potential blockers that might keep the connection from being made.

Connections made by a browser are given priority based on certain heuristics. With some simple optimizations, your organization can raise the priority of your messaging connection and improve how fast your message experience loads.

Additionally, browsers limit the number of overall connections it can make at any given time and implicitly throttles connections. Optimizations suggested in this article are intended to address potential blockers to the Sourcepoint script.

Recommended Optimizations

In this section, please find various Sourcepoint recommendations that your organization can leverage during implementation to increase the loading speed of your GDPR TCF v2 message experience:

  • Insert Sourcepoint Message Script in <head> Tags

  • Do Not Load Sourcepoint Message Script in Tag Manager

  • Leverage Single Server Endpoint

  • Preload Sourcepoint Message Script (preconnect or dns-prefetch)

  • Load Sourcepoint Message Script with async

Insert Sourcepoint Message Script in <head> Tags

Inserting the Sourcepoint messaging script into the <head> tags on a page ensures that our network connection receives a high priority.

Do Not Load Sourcepoint Message Script through Tag Manager

If possible, do not load the Sourcepoint messaging script through a tag manager (e.g. Tealium or Google Tag Manager) since doing so entails loading the tag manager before the network request for the Sourcepoint messaging script can start.

If the Sourcepoint messaging script has to load through a tag manager, ensure that the tag manager loads with a high priority and that the Sourcepoint messaging script is the first script to load.

Additionally, we also recommend that you do not load the message script through a 3rd-party script (e.g. your domain defines and loads the message script in file.js).

If the Sourcepoint message scipt has to load through a 3rd-party script then it is very important to prioritize this script.

Leverage Single Server Endpoint

As of July 13, 2020, utilizing https://cdn.privacy-mgmt.com or a CNAMED 1st party subdomain for the baseEndpoint in the client configuration code snippet is the default method for new implementations.

Upgrade your property's implementation to utilize Sourcepoint's single server endpoint https://cdn.privacy-mgmt.com or a CNAMED 1st party subdomain for the baseEndpoint in the client configuration code and snippet in order to leverage the following advantages:

  • Reduced DNS lookups

  • Reduced connections

  • Performing SSL handshaking with edge servers

If your organization has edited the baseEndpoint with a CNAME DNS Record you will also need to edit the URL for this code snippet to reflect the edit. Please follow the following format if necessary:

  • https://client.domain.com/wrapperMessagingWithoutDetection.js

Preload Sourcepoint Message Script (preconnect or dns-prefetch)

Preload is an aggressive method (when combined with inserting the Sourcepoint in <head> tags) by which you can force a high prioritization for the Sourcepoint messaging script connection.

<link rel="preload" as="script" crossorigin="crossorigin" href="https://cdn.privacy-mgmt.com/wrapperMessagingWithoutDetection.js">

Please be aware that attempts to preload too many connections on your property can nullify this strategy for the Sourcepoint messaging script. Click here for more information on preload.

Alternative methods to optimize your implementation that are less aggressive as preload are as follows:

//preconnect - establishes connection to server but does not preload the script. Saves overhead of SSL handshaking later.
<link rel="preconnect" href="https://cdn.privacy-mgmt.com/wrapperMessagingWithoutDetection.js">
////dns-prefetch - performs a DNS lookup
<link rel="dns-prefetch" href="https://cdn.privacy-mgmt.com/wrapperMessagingWithoutDetection.js">

Load Sourcepoint Message Script with async

<script src="https://cdn.privacy-mgmt.com/wrapperMessagingWithoutDetection.js" async></script>