How does TrueVault JS impact my website loading time?
The TrueVault script should be added to the <head>
element of your business's website. It must be the first functional script since it determines the users consent settings before any other scripts are run on your site.
Being the first functional script the load time is very important to TrueVault and we optimize it to be as fast as possible. There are 2 paths the script takes when loading.
First page load (~75ms):
- Download
polaris.js
from the CDN - Determine users location by making a request to https://location.truevaultcdn.com. This uses a AWS Lambda and CloudFront headers to determine the location of the user.
- Initialize local cookies to store user opt outs.
- Perform Third-Party opt-out where applicable such as Google Analytics.
- Show or hide relevant links based.
Subsequent page loads (~10-20ms)
- Load
polaris.js
from the local cache. - Load local cookies to determine user opt outs.
- Perform Third-Party opt-out where applicable such as Google Analytics.
- Show or hide relevant links based.
If you have other questions please reach out to help@truevault.com and our engineering team will be happy to provide more insights.