Expand my Community achievements bar.

SOLVED

'Passing on' a set value into a variable throughout the session

Avatar

Level 2

I’m wanting to view Revenue in Adobes Marketing analytics 'real-time' report by the Campaign code that drove it.
However when I try to configure this in the report I get the below message pop up.
========================================
The following dimensions which you have selected do not “persist” in the Real-Time Reports like they do elsewhere in Adobe Analytics: “Tracking Code”. This means that the metric you have selected must be set on the same hit (server call) as the value for the given dimension in order to be reflected as tied to that value in the Real-Time Reports. If the value occurred on a previous hit earlier in the user’s visit, or in a previous visit, the metric will not be tied to it in these reports only.
To use this dimension with a metric that may occur later in the visit, such as Revenue, use JavaScript or another means to cause the value to be passed into a Custom Traffic variable on pages or hits where the metric occurs. That Custom Traffic variable can then be used in the Real-Time Report to show the relationship between your selected metric and the desired dimension.
===============================================================
Is there anywhere a shared example of the necessary set up needed to achieve this end-to-end? Have you an example of the code used to ‘use JavaScript or another means to cause the value to be passed into a Custom Traffic variable on pages or hits where the metric occurs’ and the variables needed as part of this?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

If you're wanting to view revenue via the campaign code that drove it, you must be able to persist that campaign code so it appears in the same image request when you pass in an order.

  • If you're using DTM, you can create a rule that captures the campaign code and places it in a custom variable. In the setting 'remember this value for...", set it to something that persists, such as 'visit'. When the rule is published, you should see your campaign code in every subsequent image request after the campaign code was defined.
  • Alternatively, you can store the campaign code value in a cookie, and when the user reaches the page where revenue is sent to Adobe Analytics, call the cookie value and place it in your campaign code custom variable.

Note that by doing this, campaign code instances will inflate, as you're setting the campaign value multiple times. I'd only recommend bothering with this if you absolutely need revenue data before the 30-90 minutes it takes to fully process this data in regular reporting.

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

If you're wanting to view revenue via the campaign code that drove it, you must be able to persist that campaign code so it appears in the same image request when you pass in an order.

  • If you're using DTM, you can create a rule that captures the campaign code and places it in a custom variable. In the setting 'remember this value for...", set it to something that persists, such as 'visit'. When the rule is published, you should see your campaign code in every subsequent image request after the campaign code was defined.
  • Alternatively, you can store the campaign code value in a cookie, and when the user reaches the page where revenue is sent to Adobe Analytics, call the cookie value and place it in your campaign code custom variable.

Note that by doing this, campaign code instances will inflate, as you're setting the campaign value multiple times. I'd only recommend bothering with this if you absolutely need revenue data before the 30-90 minutes it takes to fully process this data in regular reporting.