Dynamic Yield client-side templates enable you to fully control API campaigns from Experience OS, taking full advantage of our recommendation engines and maintaining the API's customization capabilities and flexibility, while minimizing adaptation effort from campaign to campaign.
This framework is designed to be agile and sustainable, fully owned and managed by marketers, using minimal developer resources. Changes to API campaigns can be fully performed in Experience OS, with no added deployment needed.
How it works
In addition to the Variables and JSON tabs that control the variations' content in your API campaigns, you now also have HTML, CSS, and JS tabs available that enable you to edit the frontend code that renders the variation and applies the content’s logic.
The flow
- The user’s browser requests your site.
- Your server calls Dynamic Yield to receive personalizations in the requested variations' format (Choose call).
- The Dynamic Yield decision and recommendation engine returns the variations with the addition of the template object holding the template's token and file mapping (Choose response).
- The site server fetches the template files from our CDN using the template token and the section ID.
- The server then populates the variable’s placeholders with that content, and injects the client-side code into the site.
Using the client-side API template
Client-side templates for API campaigns work through 3 tabs in your variation setup: HTML, JS, and CSS. These tabs are the same as those in our script-based campaigns, so to learn more about them, see the Template variables section of the Creating Templates article. Note that unlike the script-based tabs, you can’t use the script libraries.
There is an automatic sync between the client-side code tabs and the JSON tab
Use the client-side code tabs to create the structure and content you want for your campaign. Everything you edit in the code tabs appears in the JSON tab:
You can click a variable to see its source. This is very important, because if you want to remove from the JSON anything defined in the code tabs, you must do it from the relevant tab first, and then adjust the JSON accordingly. Recommendation tag support As the core capability of this framework is based on Experience API in API recommendations campaigns, we enable serving a single variation and therefore accept a single loop #${recommendations} within the HTML tab. |
Use our rich library of out-of-the-box templates
Dynamic Yield offers well over 100 templates that you can use in both Custom Code and Recommendation API campaigns. These templates provide everything you need, end-to-end, for a wide variety of campaigns. Which you can still customize to your needs. Our library is built upon best practice principles and provides lots of innovative ideas for web personalization.
To learn more about the technical implementation of this feature, see our Developer Docs.