transactionID does not appear in Analytics when set in XDM using WebSDK | Community
Skip to main content
jgrubbs
November 11, 2021
Solved

transactionID does not appear in Analytics when set in XDM using WebSDK

  • November 11, 2021
  • 2 replies
  • 1795 views

Hi gang,

 

I'm working through the final details in our transition to the WebSDK for data collection and I have encountered a snag... It seems that when transactionID is specified in the XDM JSON, that value never seems to get forwarded to Analytics. I know this because 1) Our TransactionID processing offline doesn't work, and 2) For debugging, I copy the inbound transactionID into an eVar, and that shows that nothing is coming through.

 

Bear in mind that in our non-WebSDK implementation, transactionID is set in the AppMeasurement instance and can be seen in the "xact" query string parameter. It shows up in Analytics just fine.

 

In the XDM, I'm setting it in the commerce.order.payments[] array, roughly as:

{

  commerce: {

    order: {

      payments: [

        {

          transactionID: 'something',

        },

      ],

    },

  },

}

 

It seems that no matter what combination of other properties I include in the commerce or commerce.order object make any kind of difference. I can track purchases, so I know that at least something from commerce is getting forwarded to Analytics. productListItems seems to work as well, as I can see Product Names in Workspace.

 

Has anyone encountered this? Is there some undocumented combination of required properties that must be set in order for transactionID to be seen in Analytics?

 

Thanks!

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by dwright-adobe

@jgrubbs ,

I don't see transactionID on the list of automatically mapped variables. Have you tried mapping your xdm property to transactionID in your processing rule for XDM data?

https://experienceleague.adobe.com/docs/experience-platform/edge/data-collection/adobe-analytics/automatically-mapped-vars.html 

2 replies

yuhuisg
Community Advisor
Community Advisor
November 11, 2021

Shouldn't it be set at 

{

  commerce: {

    order: {

      purchaseID: "..." // here

    }

  }

}

 

Or if that doesn't work, then it could be that there is no automatic mapping from Web SDK to AA for transactionID. If that is the case, then you might need to set your own field in the XDM object, and then use AA's Processing Rules to map that field to Transaction ID.

jgrubbs
jgrubbsAuthor
November 11, 2021

That is perhaps correct for purchaseID, but not transactionID. purchaseID and transactionID are not the same

 

dwright-adobeAdobe EmployeeAccepted solution
Adobe Employee
November 11, 2021

@jgrubbs ,

I don't see transactionID on the list of automatically mapped variables. Have you tried mapping your xdm property to transactionID in your processing rule for XDM data?

https://experienceleague.adobe.com/docs/experience-platform/edge/data-collection/adobe-analytics/automatically-mapped-vars.html 

jgrubbs
jgrubbsAuthor
November 11, 2021

@dwright-adobeI hereby nominate you a genius! 🙂   For some reason I completely missed that transactionID was not one of the auto-mapped variables...

 

And sure enough when I started poking around in Processing Rules just now, I spot this item in the list:  a.x.commerce.order.payments.0.transactionid(Context Data)

 

So... I'm going to map this to TransactionID and see what happens. But I have a feeling that this is it. Either way, thank you for your help. I'm pretty certain this will be the answer