A4T and Server-side Digital Marketing

A4T and Server-side Digital Marketing

In a client-side implementation, the JavaScript code takes care of Analytics for Target (A4T), so you do not have to do anything. However and as usual, in any server-side or hybrid implementation of Analytics and Target, A4T requires some additional care.

If you want a quick review, I suggest you go to my old post about A4T. The concepts are still valid and now Adobe has also a help section about it. However, that post only covers a client-side implementation, where JavaScript takes care care of everything. In this post I will cover the server-side part.

First page of first visit

I know I am repeating myself a lot, but the very first page of a visitor is a special case. If you have been following my series of posts on hybrid implementation, you will know that you must always execute the ECID client-side and Target should also be executed client-side on the first page of the first visit. In the post about hybrid Target, I suggested injecting some JavaScript code only on this first page, to deal with Target. If, on this first page, you also implement Analytics client-side, you do not have to do anything. It works exactly as a typical client-side implementation with the SDID.

However, I also explained some alternative methods for hybrid Analytics. One of them was to make a call to the server and keep all Analytics implementations server-side. In this case, you need to get the SDID from the ECID service using visitor.getSupplementalDataID()  and send it to the server in the call. Then, in the Analytics call, you need to add the sdid  parameter with this value. I must admit I have never tried this option.

Second page onwards

The fun starts when you switch to pure server-side. As documented in A4T for Batch Delivery API, the response of the Target API call may include a parameter named clientSideAnalyticsLoggingPayload . This is how it looks like in one of the examples I created for the Adobe Summit 2019:

The official documentation then tells you to make an empty Analytics call with just the tnta  parameter above. However, this will cost you an extra server call. Instead, I recommend that you add the tnta  parameter to the Analytics call you would do anyway at the bottom of the page. Do not forget to URL-encode it. Following the previous example, this is the call made by my code (formatted for better reading):

You will notice that the Analytics mid  parameter is the same as the Target marketingCloudVisitorId .

A4T or not

I assume you have already provisioned A4T. However, you still need to configure the activities in the Target UI to use A4T. In order to do this, you must select “Adobe Analytics” as “Reporting Source” in the”Goals & Settings” page of the activity:

It goes without saying that you need to configure everything else correctly on that page.

Finally, since you can still configure Target as the reporting source, your code must accept both cases:

  • Reporting in Target: no clientSideAnalyticsLoggingPayload  in the Target response and no setting of the tnta  parameter in the Analytics calls.
  • Reporting in Analytics (aka A4T):  clientSideAnalyticsLoggingPayload  present in the Target response and its value copied over to the tnta  parameter in the Analytics calls.

 

 illustration by Ouch.pics

2 thoughts on “A4T and Server-side Digital Marketing”

  1. Any experience setting this up using the new Adobe Target Node.js SDK? Would love to see a similar article in reference to this SDK.

    • Hi Michael,
      I have not tried the Node.js SDK. If I have time to learn this environment, I will write another post on this SDK. That being said, conceptually, the idea is the same, as the calls need to have the same parameters, no matter what technology you use.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.