getOffers with execute on a non-SPA | Community
Skip to main content
New Member
November 16, 2023
Solved

getOffers with execute on a non-SPA

  • November 16, 2023
  • 1 reply
  • 802 views

Hello,

 

I'm implementing Adobe Target with at.js 2.x on a non-SPA (Single Page Application) website.

Despite reading through the documentation, it's not entirely clear whether calling applyOffers is mandatory for impression logging after getOffers has been called with the execute option.

There's nothing special about my set-up, I followed all the best practices recommended by Adobe.

Has anyone encountered a similar situation or can provide insights on the necessity and impact of applyOffers in this context?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by alexbishop

Ah ok, makes sense - you can just call getOffers and it will increment track the impression/visitor. The applyOffers function is just there to help out with rendering the offer

1 reply

alexbishop
Adobe Employee
Adobe Employee
November 21, 2023

If you're implementing at.js 2.x on a non-SPA page then you shouldn't need to do anything other than load the at.js library (i.e., you shouldn't need getOffers/applyOffers). The call to Target on Page Load is executed automatically by the library (unless you update the targetGlobalSettings object to disable this). What's the use case for using applyOffers? Or is it due to lack of clarity with the documentation?

New Member
November 22, 2023

Thank you for your response.

I am currently delivering a JSON offer to the front-end. This JSON is used to configure a script that alters the content of the web page. My aim is to avoid using a visual composer since the same mbox is required across multiple pages.

alexbishop
Adobe Employee
alexbishopAdobe EmployeeAccepted solution
Adobe Employee
November 22, 2023

Ah ok, makes sense - you can just call getOffers and it will increment track the impression/visitor. The applyOffers function is just there to help out with rendering the offer