Adobe Target Server Side Implementation

josejr19 21-10-2019

Hello, I am doing a POC on the Adobe Target Server Side implementation. It will technically be hybrid in that I will take what the Target delvers back to the node.js and drop it into an object. Then I will use the SPA to grab the experience/markup from the object.

My question has to do with the visitorApi. In the below snippet from the sdk, we assume the user has a visitor cookie(AMCID). If the user has never visited the site he/she wont be eligible for any activities at all.

With that said, am I missing something here? Should I make the visitor api call from my node js server and passing that to target and also back in the response header to be set on the client side like it would if it was initiated from the client side?

Accepted Solutions (1)

Accepted Solutions (1)

josejr19 21-10-2019

Here is the snippet from the sdk example;

target-nodejs-sdk-samples/ecid-customer-ids-integration at master · adobe/target-nodejs-sdk-samples ...

const visitorCookie = req.cookies[TargetClient.getVisitorCookieName(CONFIG.organizationId)];

  const targetCookie = req.cookies[TargetClient.TargetCookieName];

  const customerIds = {

    "userid": {

      "id": "67312378756723456",

      "authState": TargetClient.AuthState.AUTHENTICATED

    }

  };

Answers (2)

Answers (2)

Eric_Vidana 23-10-2019

Is the Visitor API integrated on the client side of the app that you are working on? I presume that the cookie pool is already around and in a place that you just use it as a pass thru.

josejr19 29-10-2019

Hey Eric, thanks for responding. I was not planning on adding the visitor API on the client side. My understanding is that I could in theory make the call on the server side and pass the cookies from the call on the server side back to the client in the response.

Here is the article I am using;

Using the ID Service with A4T and a Server-side Implementation of Target

I want to be able to do personalization or a/b testing on first touch really, so the idea is that when the user initially request's the content on the first visit they can qualify for an experience. As well as making sure we pass in a customer id if we have one.

Thanks for your help!