Skip to main content

FAQ

Get answers to the most common questions surrounding Rokt API and SDK integrations.

SDKs#

What is the preparative iframe, and why should I implement it?#

Adding the preparative iframe as part of your implementation helps improve load speeds and improve performance. Learn more

My site is built as a single page application (SPA). How do I integrate with Rokt?#

Our integration process for SPAs differs slightly from our traditional implementation. View the instructions.

My site has a Content Security Policy (CSP). What domains should I allow so that the Rokt Web SDK can successfully initiate?#

You need to add https://apps.rokt.com on both frame-src and script-src. Learn more

What cookies will the Web SDK set on my site?#

You can refer to the Rokt Cookie Policy for full details.

I am using Google Tag Manager (GTM). Can I integrate the Rokt Web SDK using GTM?#

Yes, however we strongly recommend doing a direct integration to achieve optimal performance. If you wish to proceed with GTM, you can view the instructions here.

Also, make sure you set up Rokt to listen to an event rather than on a timer interval in GTM.

How do I test my integration?#

View our instructions for testing here.

Why is apps.rokt.com being cancelled?#

Check that a script tag with src="https://apps.rokt.com(...)" is present on the page. If that script was removed, it could cause the browser to mark the request as cancelled.

Additionally, make sure you are not running a JavaScript solution that verifies all script tags added to the DOM (e.g., Jscrambler). If you are using that type of tool, you then need to ensure our script is added to your allow list. Lastly, check that https://apps.rokt.com is allowed for both frame-src and script-src.

What is the file size of Rokt's script?#

Rokt loads multiple scripts as we iFrame our solution to ensure high security when implemented on your site. The values below lists down the compressed and uncompressed values for each script that will run on your site - compressed value is what the user browser downloads (when visiting your site):

Name of the script / Size uncompressed / Compressed

APIs#

Why do I keep getting a 402 error when calling the Event API?#

You may be using an invalid authentication code. Check that your App ID and App Secret are valid. See instructions for authentication here. If you don’t have a Rokt account, contact your account manager.

Support#

If you have any questions, reach out to support@rokt.com. We'll be happy to assist you.

Was this article helpful?