Partners may integrate with the Rokt Web SDK in order to render placements and offers natively on their sites either as an overlay, or as an embedded placement.
Ensure that you populate the code with relevant data attributes to maximize the value Rokt can provide. For this scenario, raw email is highly recommended at a minimum, but to get the most out of Rokt optimization algorithms we suggest passing all core and transactional/vertical attributes.
We recommend using the preparative iframe to preload Rokt assets on an earlier page in your transaction flow, as this will improve the Placements load time on the page(s) where they are rendered.
See Attributes for more details on Rokt attributes.
See Rokt.setAttributes for more details on setting attributes.
Render a Placement Embedded into your Page
Embedded Placements involve rendering a placement within the content of your page, rather than as an overlay. The Web SDK will need to know where on the page to render the Embedded Placement. There are two options available to achieve this:
- Place a new div element on your page in the location you wish to render the placement, for example:
- Use an existing element on your page to which the Rokt placement can be appended to.