Narvar runs delivery tracking pages that can enhance your e-commerce website. Because this tracking page is in a different domain than the rest of your pages, our script doesn't run on these pages unless you set up the integration described in this article. The integration enables you to insert Dynamic Yield experiences by adding an iframe to your Narvar pages.
Setting up the Integration
- Adapt the following code that will be added to each iframe, replacing REPLACE_WITH_SECTION_ID with your Dynamic Yield section ID. In this example, a recommendation is added but you can also add a different campaign type using the appropriate API.
- In Narvar, add an iframe to any relevant pages.
- Paste the code in the iframe in one line.
- Add a div to the iframe with a unique ID.
- In Narvar, configure the URL of the pages to contain the product SKUs in a parameter called "skus".
- Get a preview link for the Narvar page without publishing it.
- In Dynamic Yield, modify any campaigns that target all pages on your site to not include the URLs of the Narvar pages using the URL does not contain option.
- Create the Dynamic Yield campaign that will be added to the iframe. Set the insertion method to Automatic, select Replace and specify the unique ID you defined in the div above.
- Configure all other campaign settings and variations as desired.
- For any links included in the campaign, anchors tags should have the html attribute target=“_blank”, so they will open outside of the iframe.
- In the Advanced Settings of the experience (the gear icon next to the Primary Metric dropdown), set the attribution window to end after 1 day.
- Save and Publish the Dynamic Yield campaign.
- Use the preview link from Narvar to test and update the campaign before it is made public.
- In Narvar, publish the page.
Notes and Limitations
- Viewing the Narvar page will count as a cart pageview.
- All other Dynamic Yield campaigns that target all pages must exclude Narvar pages using the "URL does not contain" option.
- The iframe is a fixed height of 300px, but Narvar will sometimes increase it to 600px depending on the screen size. We typically ask them to keep in 300px for all devices. Given this limitation, we recommend keeping your campaign designs simple.