On a typical e-commerce web page there is a long list of third-party technology services that are all competing to make network traffic calls, meaning that it can take time to get through the queue of requests. This increased competition between services can put strain on your page where load speed is critical to your customer’s experience.
In order to deliver the maximum value while incorporating best in class security and isolation, the Rokt Web SDK has been designed to make multiple requests between the server and browser. These series of requests, when combined with the requests made by other 3rd party services, can impact page load times in certain circumstances.
We understand that page load speed is vitally important, and the time it takes from when your page starts loading until the Rokt offer is shown has a direct impact on placement drop rates (missed transactions), impressions, engagement rates and therefore value driven by Rokt.
Providing a Better Customer Experience by using the Rokt Preparative Iframe
To combat this problem and provide a better customer experience, we’ve created a simple, easy to integrate add-on to the Web SDK integration. This solution consists of a secure, easy to implement, and flexible preparative iframe that can be implemented on an earlier page in your transaction flow.
To implement this solution simply place the following code on any page in your transaction journey before the page where you display Rokt placements.
<iframe aria-hidden="true" src="https://apps.rokt.com/wsdk/preload/index.html" sandbox="allow-scripts allow-same-origin" style="border: 0px; width: 100%; display: none;"></iframe>
You can place the preparative iframe in a tag manager or low down in the body of the page. We recommend placing it on a page that customers spend more time on (like a shipping details page) to ensure the iframe can execute fully in the background before customers move on to the next page.
Note: for best performance, please ensure that you update to the latest version of the Rokt Object before implementing the Preparative Iframe.
How it Works
The iframe downloads the majority of the Web SDK’s files and stores them in the browser’s cache to easily retrieve on a later page when it’s time to show the placement. Since all the iframe is doing is downloading the resources to be used later on, nothing is run on your page and it requires no interaction with personal customer data. Once your customer lands on the page where the Rokt placement is shown, all that is left to do is select, retrieve, and render the offers and placements.
By downloading the SDK in sections, we reduce the required network bandwidth required on time-sensitive pages. Using the preparative iframe solution will shorten the placement load time resulting in an improved experience for customers and better performance outcomes for both Rokt and you.
There are no security risks associated with integrating the iframe on an earlier page in the transaction flow (e.g. a payments page or shipping details page). The preparatory iframe is completely separated from, and has no access to, your page. Iframes are special html elements that the browser engine enforces certain rules against. Functionally, iframes allow us to sandbox our logic, restricting our capabilities to only be able to execute functionality within the iframe container - such as caching and contacting our API.
If code within an iframe requires additional privileges, such as access to Personally Identifiable Information (PII) on the parent page, the application inside the iframe can only gain access to this information by sending a message to the host page asking for it, with cooperative logic on the host page listening for these messages and responding at its discretion. Because there is no additional code on the host page cooperating with the iframe, nothing can respond, so the iframe cannot gain access to any information from the host page.
This isolation ensures that, if the Rokt code inside the iframe is somehow compromised, it does not have access to anything on the host page, and your customers’ data remains secure. Additionally, as the preparatory iframe doesn’t run any selection or targeting processes, no customer data is requested by Rokt at this stage.