Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Adobe Target Server Side Implementation

josejr19
Level 6
Level 6

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?

1 Accepted Solution
josejr19
Correct answer by
Level 6
Level 6

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

    }

  };

View solution in original post

0 Replies
josejr19
Correct answer by
Level 6
Level 6

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

    }

  };

View solution in original post

Eric_Vidana
Level 8
Level 8

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
Level 6
Level 6

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!