Expand my Community achievements bar.

SOLVED

How to read Target response tokens and push into ttMETA object with Adobe Experience Platform Web SDK?

Avatar

Level 2

We want to reproduce this same configuration below using Target Response Tokens but in Adobe Experience Platform Web SDK, there is zero documentation on this.

 

Screenshot 2022-12-14 at 16.38.56.png

 

 

The only thing I found but that doesnt explain at all what to do is this:

From here: https://experienceleague.adobe.com/docs/target/using/administer/response-tokens.html?lang=en

 

ugobey_0-1671028948313.png

 

It says "Use the Handle object class, which has a meta data object and a data object to listen for Target responses and read the response tokens." but it doesnt say what or where this is. 

What code do we use and where in Adobe Launch do we set it?

It was so much easier before with at.js but cant find the same thing for AEP.

 

1 Accepted Solution

Avatar

Correct answer by
Level 2

I found the solution and it was really simple

Just need to create a rule like this 

ugobey_0-1671450180416.png

Then add the code with event.propositions and done

ugobey_1-1671450200402.png

 

 

View solution in original post

5 Replies

Avatar

Community Advisor

Hello @ugobey 

Have you seen below link in documentation 

https://experienceleague.adobe.com/docs/experience-platform/edge/personalization/adobe-target/access... 

You can retrieve the activity name from the meta property, which is an object containing response tokens. 

Hope this helps.

Avatar

Level 2

Thanks for the reply but I dont understand why we would need to make a network request from the client side browser in order to get this, surely there is another way to get this without needing to make another network request?

I developed an integration years ago between our product Contentsquare and your product Adobe Target. 

I am not 100% familiar with how AEP works but where exactly would we have access to this part of the code in the Adobe Experience Platform Web SDK extension in Adobe Launch? 

Also is a sendEvent command sent on every pageview by default anyway? We need to get these values on every pageview but without having to ask our clients to send a new network request using alloy.

Avatar

Level 2

Basically where in here can we get the response tokens from?

ugobey_0-1671039351335.png

 

or here?

ugobey_1-1671039478705.png

 

 

and if not here then where?

Avatar

Employee Advisor

Hi @ugobey ,

Yes, I am not aware of any documentation of how to replicate the population of the ttMETA object with Web SDK. We are working on an at.js->Web SDK tutorial which will be published soon. It covers response tokens but not that specific use case. I will see if we can get that specific use case represented in the tutorial at some point.

 

"Also is a sendEvent command sent on every pageview by default anyway?" No, you need to explicitly make the call. It sounds like you are using tags/Launch to deploy, which case use the Send Event action in a rule. There is a tutorial which covers a lot of the basic Web SDK implementation with tags located here: https://experienceleague.adobe.com/docs/platform-learn/implement-web-sdk/overview.html

 

"We need to get these values on every pageview but without having to ask our clients to send a new network request using alloy."

You won't. You should be able to read the response tokens from the main sendEvent.

 

"Basically where in here can we get the response tokens from?" 
I assume you have an activity set up which you are using? Look in the response payload of each scope (aka mbox). Here it is in my  __view__ scope (aka target-global-mbox).

dwright_0-1671117870240.png

So, to fully replicate the ttMETA example with at.js, we need to see if there is an equivalent Web SDK event we can use as response success and then write the javascript to parse the response tokens to assemble the ttMETA object.  There may also completely new options to replicate your integration with Web SDK which are off my radar. I will see if I can get more info for you.

 

Avatar

Correct answer by
Level 2

I found the solution and it was really simple

Just need to create a rule like this 

ugobey_0-1671450180416.png

Then add the code with event.propositions and done

ugobey_1-1671450200402.png