Adobe Target for SPA - How to Pass entity.id and other datalyer parameters on every viewchange happens in SPA? | Community
Skip to main content
New Participant
April 17, 2023
Solved

Adobe Target for SPA - How to Pass entity.id and other datalyer parameters on every viewchange happens in SPA?

  • April 17, 2023
  • 1 reply
  • 1243 views

Hi Team

 

We are following best pratices mentioned as below link

https://developer.adobe.com/target/implement/client-side/atjs/how-to-deployatjs/target-atjs-single-page-application/

However it doesnot talk about how to pass entity.id or other datalyer parameters on everyview change.

we would like to implement that in out SPA application.

 

We have below setup in our application SPA application.

Step 1 : Created a rule to Load Target in page. I use Library Load (page top) event. In actions Load Target , and Fire Page Load Request actions,

Step 2: On viewchange from source code we are triggering adobe.target.triggerView("viewname")

Step 3 : We browse application in VEC and apply required XT or AB

Step 4: Application loads very first time it brings all experiences for that SPA.

Step 5: Upon loading specific view for that application, configured XT gets rendered on SPA

 

During whole process 2 things we would like to achive

1. Due to target load which happens at step1, target returns all experiences configured for various views in SPA, instead we want to pass some mbox parameter and based on that we would like to bring view from target and apply.

2. every viewchange which happens in SPA, we would like to pass entirty.ID and few other information to target?

 

We are not sure about how t ouse Call visitor.resetState() & Update cache by calling the getOffers() API.

 

Please guide us on this.

 

 

 

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

It sounds like this example of how to use getOffers, applyOffers & triggerView in sequence might be what you need

1 reply

alexbishop
alexbishopAccepted solution
Employee
May 3, 2023

It sounds like this example of how to use getOffers, applyOffers & triggerView in sequence might be what you need