The Dynamic Yield “classic” implementation uses a script on your website, which you then use to personalize campaigns created in our platform console. However, these days, there is a clear shift towards using server-side architecture and employing APIs to maintain more granular control. Dynamic Yield provides a full solution for these needs, whether you prefer to work with both script and APIs in tandem, or you prefer an API-only implementation.
What are Experience APIs?
Experience APIs are a set of endpoints that you can call from your site's code. Our APIs enable the same personalization and data collection capabilities that our website script provides, but they need to be called from your codebase so that Dynamic Yield knows to return the relevant data. When you receive the data, it's up to you to do something with it in your site's code.
Benefits of using Experience APIs
Experience APIs offer various benefits:
For marketers, Experience APIs:
- Provide a flawless experience on the website, without flickering.
- Provide your users the same digital experience over different channels (say, web and mobile).
- Don’t expose your campaigns to the browser, avoiding exposure of internal strategies.
- Help protect user privacy and comply with regulations.
For developers, Experience APIs:
- Help handle page load performance issues.
- Enable you to progress to better frameworks, and use of SPA, WPA, and so on.
- Provide full control over the technology stack.
What are the Prerequisites?
See the article Check Your Readiness for full information about what you need to do and know before you can embark upon your journey with Experience APIs. Two items to consider immediately are:
- Make sure you are able to modify your source code (that is, you have a developer available).
- Confirm that you are in an area served by one of our data centers (in the United States and the European Union). If you aren’t sure, discuss this with your Customer Success Manager.
Experience API implementations
The following are the options for working with Experience APIs:
- Script-based site personalization and APIs together: You can use Experience APIs for select campaigns, in addition to those managed through a Dynamic Yield script on your website.
- Only APIs: No script is implemented on your website. All aspects of your campaigns are managed by you via API. Learn more about the implementation options for working with APIs only (no script).
- Mobile: Experience APIs enable you to serve content on both web and mobile apps from the same site.
Important note: Regardless of the implementation method, a campaign cannot be transitioned from one method to another without losing data.
Using both site personalization and Experience APIs
Whether you are new to Dynamic Yield or you are already using our script on your site, you can get the best of both worlds by combining API campaigns and those you create in the platform console. For example, if you're used to client-side testing and personalization tools and you want to minimize time to value while keeping your future options open, you can get started quickly with the web script, and then gradually implement API-based campaigns. Use cases for which API campaigns are especially recommended include:
- You want to run performance-sensitive campaigns (for example, content above the fold).
- You have campaigns with sensitive data that you do not want to be exposed in the browser.
- You plan to run a large number of tests concurrently.
This mode involves managing all your campaigns via API, with no Dynamic Yield script implemented on your site. Your server and client apps interact with our API gateway, securely: Passing the details of the current page, while asking for relevant campaign variations and recommendations to serve site visitors; and at the same time, reporting user interactions with your site (pageviews and events).
This mode is recommended only if you have the developer resources to support an API implementation, and if you are particularly concerned about page load time and potential conflicts with your SPA framework.
Working with APIs only can be done by two implementation methods: When you create a new Site entity in the Dynamic Yield console, you must select the implementation (Website, Mobile APP, or API). If your use of Dynamic Yield is on a website, we recommend that you select this option, even if you do not implement our script on the site. There are some capabilities that can only be used on this implementation, for example, triggered emails (currently in early access, contact your Customer Success Manager for more information). Note that if you begin with the API implementation, you can't later switch to the website implementation.
Experience APIs enable you to serve content on both web and mobile apps from the same site, and also to create a unified customer profile across both devices by implementing identification events with matching values.
All your data and assets, such as your recommendation strategies, are centrally stored in a single site on Dynamic Yield. Your users can be referenced by a single user ID, instead of managing different user IDs on each platform. This lets you build a more comprehensive user profile, which in turn improves our recommendation strategies and provides users with a cohesive browsing experience.