Expand my Community achievements bar.

Join us for the Adobe Journey Optimizer Community Q&A Coffee Break on 28th February at 8 am PT with Ariel Sultan, Daniel Wright, Josee Haeley and Rohit Basuri.
SOLVED

How to implement web sdk on spa

Avatar

Level 2

I have been trying to implement adobe web sdk(only target) in the SPA environment. On the view change i am firing alloy.event to render the experience through target.

In the current state, i can see my calls are going to target but getting no personalisation from target.

 

could anyone help me here.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@vijayc88216288 ,

This means, on the Page Load you are getting the personalized experience, but on the screen change (View change/history change), you are unable to see the experience.

Did you check the example given under "An equivalent Platform Web SDK sendEvent approach" in the link. Kindly give it a try.

Thank You, Pratheep Arun Raj B (Arun) | NextRow Digital | Terryn Winter Analytics

 

View solution in original post

10 Replies

Avatar

Community Advisor

Hello @vijayc88216288 

 

Can you share more details on the payload of the API calls and how you are firing the events on view change?


     Manoj
     Find me on LinkedIn

Avatar

Level 2

Currently I am sending the below code to fire on every view.

 if(window.alloy){
    window.alloy("sendEvent", {
      "renderDecisions": true,
      "xdm": {
        "web": {
          "webPageDetails": {
            "viewName": "category"
          }
        }
      }
    });
  }
And I can see the network call as well
vijayc88216288_0-1685601987974.png

If I hard refresh the page then the experience load however if a view gets changed then no personalization.

Let me know if I miss anything here.

 

Avatar

Community Advisor

Hello @vijayc88216288 

 

The event call looks good.

 

Do you see any difference in the payload of API calls on view change and hard refresh?


     Manoj
     Find me on LinkedIn

Avatar

Level 2

On hard refresh, I am getting a personalized experience.
I am not sure, what difference are you referring to in the payload call.

Avatar

Community Advisor

Do you see any change in this payload highlighted below in Hard refresh and view change?

Manoj_Kumar__1-1685604651101.png

 

 


     Manoj
     Find me on LinkedIn

Avatar

Correct answer by
Community Advisor

@vijayc88216288 ,

This means, on the Page Load you are getting the personalized experience, but on the screen change (View change/history change), you are unable to see the experience.

Did you check the example given under "An equivalent Platform Web SDK sendEvent approach" in the link. Kindly give it a try.

Thank You, Pratheep Arun Raj B (Arun) | NextRow Digital | Terryn Winter Analytics

 

Avatar

Community Advisor

Dear @vijayc88216288 ,

Did you receive the Personalization Response from Edge? If not, make sure that your data stream is configured for Target and 'renderDecisions' is set to 'true' in the SendEvent call.

If you receive the Personalization Response from Edge, however, if offers are not applied, then you need to validate the segment qualification. Try the 'all visitor segment' and see whether the offers are applied to the page.

If possible, share the public URL so that we can validate it for you.

Also, go through the Web SDK Migration for Adobe Target once again to see the missing pieces if any.

Thank You, Pratheep Arun Raj B (Arun) | NextRow DigitalTerryn Winter Analytics

 

Avatar

Administrator

Hey @PratheepArunRaj ,

 

Seeing you after a long in AEP Community!  

Avatar

Community Advisor

Yeah @NimashaJain ,

Was busy with Adobe Summit Presentations and then with my paternity. Getting time and thus back in Community.

Thank You, Pratheep Arun Raj B (Arun) | NextRow DigitalTerryn Winter Analytics