Possible to render a VEC decision server side? | Community
Skip to main content
New Participant
December 10, 2024
Solved

Possible to render a VEC decision server side?

  • December 10, 2024
  • 2 replies
  • 1011 views

I'm working on a solution to rendering a VEC personalization decision server-side in Next.js and React. Question is, is this possible? Here's what I've done so far on our site that uses the Adobe Web SDK extension in Tags.

 

When the page is rendering server-side using Next.js and React I make a request to the https://edge.adobedc.net/ee/v2/interact endpoint and I can see my VEC experience being returned. 

Example of the data returned from the endpoint:

 

 

{ "id": "0", "schema": "https://ns.adobe.com/personalization/dom-action", "meta": { "profile.et_rid": "true", "activity.name": "TEST: VEC Made For You", "experience.name": "Experience B", "option.name": "Offer2", "option.id": "2", "profile.daysSinceLastVisit": "0.0", "offer.id": "0", "experience.id": "1", "offer.name": "Default Content", "profile.247228_activityImpression": "true", "activity.decisioningMethod": "server-side", }, "data": { "type": "setHtml", "format": "application/vnd.adobe.target.dom-action", "content": "Made For You", "selector": "#topMenuSection-70 > A:nth-of-type(1) > SPAN:nth-of-type(1)", "prehidingSelector": "#topMenuSection-70 > A:nth-of-type(1) > SPAN:nth-of-type(1)" } },

 

 

Has anyone ever used the https://edge.adobedc.net/ee/v2/interact endpoint to render a VEC decision server side?

Best answer by RiteshY18

@msweeneyrab 

The VEC modifies the DOM using JavaScript and provides full controls to UI/UX via DOM; translating a similar experience would be challenging on the server side.

As for Server side you would have use  Node.js SDK or Server-Side APIs

  • Server-Side APIs would provide certain feature but has limitation 
  • Node.js SDK can help you to build a custom solution 

Hope this helps 

 

2 replies

RiteshY18
RiteshY18Accepted solution
New Participant
December 20, 2024

@msweeneyrab 

The VEC modifies the DOM using JavaScript and provides full controls to UI/UX via DOM; translating a similar experience would be challenging on the server side.

As for Server side you would have use  Node.js SDK or Server-Side APIs

  • Server-Side APIs would provide certain feature but has limitation 
  • Node.js SDK can help you to build a custom solution 

Hope this helps 

 

New Participant
January 3, 2025

Thank you @riteshy18 that makes perfect sense.

pradnya_balvir
New Participant
December 10, 2024

Hi @msweeneyrab ,

 

I have not implemented but I can see related document in adobe.

You can go through that.

https://experienceleague.adobe.com/en/docs/target-dev/developer/server-side/server-side-overview

 

 

New Participant
December 10, 2024

Thank you @pradnya_balvir. I looked quickly at the link provided and there is no mention of VEC for this approach, appears to be for form based experiences. I will dig further but wanted to call out that the solution needs to work for VEC.