[Purchase Event in Launch] Unable to pass product category from digitalData as eVar.

adilk

11-06-2019

I have a transaction digitalData object and I'd like to pass product category as an eVar when the purchase occurs.

At the moment, Cloud Debugger shows 'not available' for this variable.

Here is my setup:

Data elements > JS Variable > Variable name: digitalData.transaction.item[0].category

As all our transactions will only contain 1 item, I've kept the index as 0 to return the first and only object details.

When I check this in Dev console, I can see it return the correct product category

Here's my digitalData object screenshot. As you can see in this object, it is returning the value that I would want to pass.

What should I change in my eVar definition within Data Elements to correctly pick up the value?

Thanks for your help!

Capture.JPG

Accepted Solutions (1)

Accepted Solutions (1)

Asheesh_P

MVP

12-06-2019

Hey Adil,

I can keep playing a guessing game, but can you share some other details eg. how you setting these eVars in rule, are you setting these in product string, are you using s.t or s.tl call type, are you using launch interface or custom code, did you include these evars in s.tracklinkvars, etc.

There may be a reason because of each one of the issues i mentioned here...so more details will help us reach to issue faster.

Answers (3)

Answers (3)

adilk

12-06-2019

Hi Akash,

Thanks, will provide the details now:

My Purchase Rule is based on a Direct call.

I am using Launch interface and not a custom code

These eVars are not included in s.tracklinkvars

Please let me know if below provides the right context around why product name would get passed but not category as eVar?

Thanks

--

In the Actions section for Purchase Rule, I have:

First Action > AA - Set Variables > This includes:

Setting eVar6 as %Transaction: product category% and eVar7 as %Transaction: product%

Both these are based on data elements with custom code that you had provided earlier. Atm, product value is getting passed but not category.

In the same action, there are also custom events 5/6/7/8

There is no other setting in this action

Next Action > AA Product String Builder (from Search Discovery)

Here, my root data Object is digitalData, product collection path is transaction.item.

Category var is category as Collection Item Path, same for product, quantity and unit price

I am facing some error in passing the products to Products report in AA and trying to get help in this thread as well [scroll to the bottom, please] Adobe Launch - steps to use AA Product String Builder Search Discovery 

Next Action > Send Beacon as s.tl() - do not treat is as a page view

adilk

11-06-2019

Thanks, Asheesh.

I changed my data elements to custom code:

Category eVar: return digitalData.transaction.item[0].category;

Product eVar: return digitalData.transaction.item[0].product;

However, in Cloud Debugger, only product var value got passed while category remained as 'not available'

For both data elements, these are set to Custom code with default value as 'not available' and storage duration of none.

I checked the latest digitalData transaction object and both variables were available there.

Any particular reason why category variable failed?

Thanks,