Expand my Community achievements bar.

Take 10 minutes to complete an Adobe Target review on Gartner Peer Insights, and as a thank you for your time, you’ll have the option to receive a $25 gift card!
SOLVED

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

Avatar

Level 3

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-p...

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.

 

 

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

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