Downloading Scripts Locally
You can download the OneTrust script and call the otSDKStub.js file from your storage location instead of the OneTrust CDN.
After successfully publishing your script, in the Scripts menu, select the Download button in the Test Scripts or Production Scripts tabs. Once the zip file is downloaded, store the full directory in a location of your choice and call the otSDKStub.js in the header of your domain the same way you would if you copied the script from the Admin UI.
Note
You must preserve the hierarchy of files that are provided in the zip file so that otSDKStub.js knows how to find them. More on that here: How the OneTrust Banner is loaded
Step-by-Step Instructions
- In the Scripts menu, select the Download button in the Test Scripts or Production Scripts tabs
- An alert box will notify you that the download is being processed. Closeout this message.!
- You can view the download by selecting the alert icon in the top-right of the Admin UI. Select "View in Alert Center" to check on the progress of your download.
- In the Alert Center, if your download is still processing, it will have an Open status. Once the download is done processing it will move to a Complete status.
- After you save the downloaded script folder to a location of your choice. Call the otSDKStub.js
//Call the otSDKStub.js with the file path of where you stored it
<script src="https://YOUR_STORAGE_PATH_HERE/oneTrust_production/scripttemplates/otSDKStub.js" type="text/javascript" charset="UTF-8"
data-domain-script="YOUR_DOMAIN_ID_HERE">
</script>
Updated about 1 year ago