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 messaging experience for your property.
Note: 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 are 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.
In this section, please find various Sourcepoint recommendations that your organization can leverage during implementation to increase the loading speed of your GDPR TCF message experience:
- Insert Sourcepoint message script in
- Do not load Sourcepoint message script in tag manager
- Leverage single server endpoint
- Preload Sourcepoint message script (
- Load Sourcepoint message script with
Insert Sourcepoint message script in
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 in 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.
Note: 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
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
Note: 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
Note: 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:
Preload Sourcepoint message script (
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">
Note: 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
<script src="https://cdn.privacy-mgmt.com/wrapperMessagingWithoutDetection.js" async></script>