Live Preview is a way to review any changes on your production site that apply to your OneTrust script before publishing the production script. For example, if you're updating an existing template to use a new feature or adding a new geolocation rule and want to test it, you can leverage Live Preview to initiate the preview or share links to the test script before deploying.
To create and view a live preview
When making configuration changes, before publishing to production, you can initiate a live preview, publish your test script and initiate a live preview for each of your geolocation rules associated with the domain.
Note
The production script has to be published and on the domain for the live preview function to work. Production scripts can only be published within 30 minutes of publishing test scripts.
Autoblocking is not available through live preview mode.
-
On the menu, select under the Integration section. The Scripts screen appears.
-
Select a domain from the list.
-
Go to the Test Scripts tab.
-
Click the Live Preview button. The Live Preview modal appears.
Note
You can also access the Live Preview modal for a production script. Click the Publish Production button, select a script version, review your choices, and click the Publish Test and Preview button.
-
Select a geolocation rule from the selection menu.
-
If you have already published your test script through the publish panel, select Start Preview. If you have not yet published after making configuration changes, select Publish Test & Preview. The live preview will be initiated for the geolocation rule selected in the modal. Your domain will be opened in a new tab with the following query parameters:
-
otreset
: Remove all the cookies dropped by the script and reload the page.
Note
otreset
flag will be changed to false in the URL to avoid the infinite loop before reload.
This query parameter can be leveraged in the live preview or with the production script loading.
-
otpreview
: This is the query parameter that initiates the live preview while the production script is deployed on the site. It will load test script and the otpreview cookie will be dropped.
Note
You will need to clear cookies to re-load the production behavior. If you initiated the preview from Cookie Consent, the Stop Preview button will handle this for you.
-
otgeo
: Load the input geolocation rule.
Note
This query parameter can be leveraged in the live preview or with the production script loading.
You can input country code and state code, or global
for a global rule.
If the location code doesn't match the configuration, the global rule will be loaded.
After initiating a preview, you will have the option to select other geolocation segments to preview.
-
Click the Copy Link button to share a link to each preview with other users.
Note
The preview mode will last for 24 hours once accessed if the otpreview cookie is not cleared.
-
When finished, click the Stop Preview button. The button will close any preview tabs initiated from . Upon re-opening the domain, the real time testing interface will no longer display.
Once you have reviewed changes through the live preview and tested all necessary functionalities, you can publish your production script.
To view a live preview for a banner template
-
On the menu, select under the Setup section. The Templates list screen appears.
-
Select a template from the list. The Template Details screen appears.
-
Click the Live Preview button. The Live Preview modal appears.
-
Refer to steps 5-8 in To create and view a live preview.
To view a live preview for a geolocation rule group
-
On the menu, select under the Setup section. The Geolocation Rule Groups list screen appears.
-
Select a template from the list. The Geolocation Rule Group Details screen appears.
-
Click the Live Preview button. The Live Preview modal appears.
-
Refer to steps 5-8 in To create and view a live preview.