I need to pass the purchase details of a transaction in order to capture revenue/product level information.
If my digitalData / dataLayer contains these two bits of info, what should my rule be in Adobe Launch in order to pass this info to Adobe Analytics?
Thanks
--
digitalData.transaction.total =
{ purchaseID: "ABCAS",
basePrice: 100.00,
currency: "AED",
taxRate: 0.05,
priceWithTax: 105,
transactionTotal: 105 };
digitalData.transaction.item = {
basePrice: 100.00,
currency: "AED",
taxRate: 0.05,
priceWithTax: 105,
transactionTotal: 105,
category=smartphones,
product=Samsung smartphone,
quantity=1
};
Solved! Go to Solution.
Views
Replies
Total Likes
In AA - Product String Builder - You should set product with only events and only eVar you want to set in the product string. Other events can be set within "AA - Set Variable" for the direct call rule you want to trigger on the purchase.
For currency Event - you need to make sure you set it correct and event2=%currency dataElement%
%currency dataElement% should return a numeric value, not a string.
Views
Replies
Total Likes
Hi,
Syntax:
You will need to set transaction.total details in few currency events (event1, event2, event3, event4), purchaseId and currencyCode variables and transaction.item will go in s.products variable for each product (seperatrd by comma) as following E.g.
s.events="purchase,event1=105,event2=0.05,event3=105,event4=105"
You can either use the custom code section to set it.
More Info:
Views
Replies
Total Likes
Dear Adil,
If these data layers are available, grab those values and build 'Data Elements'. Use the 'Data Elements' in the Page Load Rule to fire it based on your requirement.
If the Data Layers are available at the top, use 'Library Load'.
If the Data Layers are available on DOM, use 'DOM'.
Else use a 'Direct Call' rule and pass all the values to your function directly to trigger it along with your adobe Analytics Call.
I would go for 'Direct Call' Rule.
Thank you!
Arun
Views
Replies
Total Likes
Hi Asheesh,
is there a specific syntax I need to follow in dataLayer to be able to read this in Adobe Launch?
Does the below code go in my custom code when I create a rule for transactions?
Also, in the below code - how will the dynamic values for event 1, event2 etc be populated here? Should it be "purchase,event1=%event1%, event2=%event2% where %event1%, %event2% are data elements?
Thanks,
Views
Replies
Total Likes
Hi Pratheep,
We already have a direct call to trigger the page load event. Does the custom code for purchase go within the existing Action configuration or do I need to create a new rule for Purchase events?
If it';s the existing direct call, then on a regular page load (NOT /thank-you page), what will the s.purchase events populate or they will not be utilized until this is available in the dataLayer?
Thanks.
Views
Replies
Total Likes
is there a specific syntax I need to follow in dataLayer to be able to read this in Adobe Launch?
Also, in the below code - how will the dynamic values for event 1, event2 etc be populated here? Should it be "purchase,event1=%event1%, event2=%event2% where %event1%, %event2% are data elements?
Does the below code go in my custom code when I create a rule for transactions?
Note: To read transaction.item array use product extension by Adobe or any other launch extension.
Views
Replies
Total Likes
Hi,
Have you used Search Discovery's AA Product string builder?
If I want to use that extension,
which variables should I pass via AA - Set variables and AA - Product String builder?
I've asked in this thread as well Adobe Launch - steps to use AA Product String Builder Search Discovery but will paste it here too:
My transaction event is supposed to fire on a direct call.
While using this AA string builder, which variables should I populate via AA "Set Variables" Vs "SDI string builder"
In my current workspace report, I can see that the Evars are populating for purchase category/product. However, the events [currency] are showing as 0 while ecommerce variables such as product/category are empty.
In my rule for Purchase event:
Adobe Analytics - Set variables has a few evars + events only
AA string builder has my root object as: %Transaction: Root Object% [where it is a JS var called digitalData.transaction]
Product collection path is set to: .transaction.item [because the object is available in digitalData.transaction.item]
Category is setup as .transaction.item.category as Collection Item Path
Quantity as 1 as Static Text
Unit price as .transaction.item.basePrice as Collection Item Path
Question: In the AA string builder, should I again set custom events if they are already set in the AA "Set variables" action?
I'm attaching a screenshot of the transaction object.
Thanks for reading and your help.
Views
Replies
Total Likes
In AA - Product String Builder - You should set product with only events and only eVar you want to set in the product string. Other events can be set within "AA - Set Variable" for the direct call rule you want to trigger on the purchase.
For currency Event - you need to make sure you set it correct and event2=%currency dataElement%
%currency dataElement% should return a numeric value, not a string.
Views
Replies
Total Likes