If you ever encounter an issue where your Dynamic Content or Recommendation Widget is not rendered on your page, here are some things that you need to check to find out why:
- If automatic insertion is used, confirm whether the selector that you chose is on the page. You can do so by searching the elements, or by typing the following in console:
document.querySelector("YOUR_SELECTOR") == nullIf the result is true, then the selector doesn't exist on the page and you need to choose a different selector.
- Avoid using nth-child based selectors.
- If the positioning is "replace", make sure that the selector is replaceable. For example, <img> element cannot be replaced.
- If the embed code is used, make sure that the embed code generated by DY is copied and pasted into your HTML source code.
- If all the above is checked and seems correct, the targeting conditions might not be met.
You can use the campaign preview mode to see details on the conditions that were not met and other insights.
- Check the advanced settings of the campaign to see whether there is a waiting setup.
- If you have a control group, check whether you got the control group by using: DYO.getUserObjectsAndVariations() in the console.
- Are you using react or other rendering methods on your site?
There may be a race condition where your CMS content is replacing Dynamic Yield's content after it was rendered.
Please sign in to leave a comment.