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
![1-download.png 144](https://files.readme.io/ebb6591-1-download.png)
- An alert box will notify you that the download is being processed. Closeout this message.!
![2-download-processing.png 599](https://files.readme.io/0e5755f-2-download-processing.png)
- 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.
![3-alert-center.png 344](https://files.readme.io/7dc9ca8-3-alert-center.png)
- 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.
![4-alert-center.png 1688](https://files.readme.io/9dd8997-4-alert-center.png)
- 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 9 months ago