I have a requirement in my project. I need to fetch a specific offer at runtime and apply it on the DOM. Below is the description
1: User launch the website.
2: Clicks on a button. This button will open a popup.
3: Content of this popup is fetched via an AJAX call.
4: Once the Dynamically fetched content is pasted in the popup, an Adobe target offer should be fetched and applied.
I am able to fetch all the offers using 'adobe.target.getOffer' as described in the Documentation( https://marketing.adobe.com/resources/help/en_US/target/ov2/r_target-atjs-getoffer.html). It returns an Array of offers. Now I have 2 questions here
1: How to identify a specific offer from it?
2: How to fetch only the required offer from target and apply it.
Thanks in advance!
Thanks for your question!
One cannot fetch a specific Offer; rather, the Offer that has to be served depends on the request parameters, profile data, geo location, etc., and from the the Offer that is served is determined dynamically based on the data. Target does not function like a CDN or CMS where one caches their content and then fetches it to apply it to specific DOM elements. So, if you want a specific offer, you should make sure to create an Activity with specific rules that would return that Offer.
Hope this was helpful!
Please tell me how did you add multiple offers?