Allowable Character limits of different Adobe Analytics variable

Many variables contain limitations to the number of bytes they can hold. A byte is generally a single character, however can take up to 6 bytes depending on the complexity of the character. Any variables that exceed these limitations are truncated:

  • PageName and all custom traffic variables (props): 100 bytes
  • Tracking Codes and all custom conversion variables (eVars): 255 bytes
  • URL and Referrer: 255 bytes
  • Hierarchy variables: 255 bytes total across all levels
  • The transactionID variable can contain any character other than a comma. It should be in the same location where the character limit (100 bytes) is specified. If multi-byte characters are used, multi-byte character support must be enabled in order to avoid problems with unexpected characters in the transactionID.
  • Purchase ID: 20 bytes
  • Products: 100 bytes for each product category
    100 bytes for each product name
    No overall limit within the entire variable
  • Events variable: No overall limit, however each serialized value may only contain 20 bytes

How to track banner/image impressions on website using Adobe Analytics

On page load there will be s.t() server call ,on banner/image impressions there will be s.tl() server call so artificially it will depress bounce and bounce rate.

Here is the document that explains how each of these metrics works.

You can build a calculated metric using single access, but that will only work when looking at specific dimensions (pages, evars, etc.) and not from a site-wide perspective.  If you want something at the site level, then you can use single page visits.

You should use the metric that suits your need based on where/how they will use it in reporting.

Solution 1:

By the user of other metric we can solve this problem.

We can build a calculated metric using single access, but that will only work when looking at specific dimensions (pages, evars, etc.)

Single Page Visit / Entries


If you want something at the site level, then they can use single page visits.

Single Access / Visits


You should use the metric that suits the needs based on the requirement.

Solution 2:

Other solution to track banner ads is to populate the value of banner in local variable of javascript like banner1:banner2:banner3 and pass on that value to analytics variable like prop on page load. This can give insight that how many banner has been loaded at the time of page load.

Dynamically Populate Value In dataLayer

While checking about dataLayer I came across: https://www.optimizesmart.com/google-tag-manager-data-layer-explained-like-never/

Example of dataLayer

On any web page test yourself by pasting the code

1.Paste the following code

<script>

  var dataLayer = {

‘pageName’: document.title,

‘pageURL’: document.URL

                                };

</script>

You can check these in console via

  • dataLayer.PageName
  • datLayer.pageURL

2.If you paste the following:

<script>

dataLayer = [{

‘pageCategory’: ‘Statistics’,

‘visitorType’: ‘high-value’

}];

</script>

You can check these in console via

  • dataLayer[0].pageCategory
  • dataLayer[0].visitorType

3.If you paste the following :

<script>

dataLayer = [{

‘pageCategory’: ‘Statistics’,

‘visitorType’: ‘high-value’

},

{‘nameA’:’salena’,

‘nameB’:’gomes’

}];

</script>

You can check these in console via

  • dataLayer[0].pageCategory
  • dataLayer[0].visitorType
  • dataLayer[1].nameA
  • dataLayer[1].nameB

4.

5.

digitalData.page = {};

digitalData.page.pageInfo = {};

digitalData.page.pageInfo.pageName = “Electronics>Computers>MacbookPro:ProductDetails”;

6.

digitalData.page={

       pageInfo:{

             pageName:”HomePage”,

       },

       category:{

             pageType:”Home”,

             primaryCategory:”Home”,

             subCategory1:”n/a”,

             subCategory2:”n/a”

       }

}

Please let me know if you have any question by your comment in the comment section.

How to track the amount of time between two different Adobe analytics events

In order to track the amount of time between two different events you can use the getTimeBetweenEvents plugin. It allows you to track the amount of time between two different Adobe analytics events.

I believe this plugin is not free , to get this you need to get in touch to Adobe Consulting.

In case you are not willing to work with Adobe Consulting then you can develop your own custom solution.

You can set a cookie when the first event is fired, in that cookie set the time stamp as t1 and when the second event fire set the timestamp as t2. Calculate the time difference between t1 and t2 and populate the value analytics variable.

Product String in Adobe Launch

If you have single product to pass then you can use the extension in Launch but if you have multiple products then don’t use the extension in Launch.

Use custom code option in Rule of Launch ,sample code is shown below:

for (i = 0; i < digitalData.transaction.item.length; i++)

{

var sku = digitalData.transaction.item[i].productInfo.sku;

var units = digitalData.transaction.item[i].productInfo.units;

var price = digitalData.transaction.item[i].productInfo.checkoutPrice;

var test=test+”;” + sku + “;” + units + “;” + price + “;,”;

}

s.products=test.substring(0,test.length-1);

Do the changes in code as per your requirement.

How to Capture multiple query parameters in the s.util.getQueryparam

Requirement : Want to capture the multiple query parameters in s.campaign variable of Adobe Analytics.

URL:www.example.com?cmpid=hhhh&source=ssss&medium=dddd

Use the following code:

s.campaign = s.Util.getQueryParam(‘cmpid’)+”:”+s.Util.getQueryParam(‘source’)+”:”+s.Util.getQueryParam (‘medium’);

Result: s.campaign =hhhh:ssss:dddd

How to track survey score through Adobe Analytics?

Almost all the companies have surveyed and want to keep track of it for the holistic view of customer satisfaction.

In a survey the possible outcome of a score that can be any of the following numbers- 0,1,2,3,4,5,6,7,8,9,10

The business question can be that what is the best way to capture this score to then be able to calculate the average score through Adobe Analytics.

In Adobe Analytics there is no predefined formula that it can be implemented.

While solving this business problem I came up with two methods.

Method 1:

Step 1 : Take an eVar with the following setting

Step 2: Take an event with the following settings

Step 3: Create a calculate metric

Final Report:

Method 2:

  1. Take an eVar which capture the score
  2. Take counter event which captures the score
  3. Take numeric event to capture the score in the numeric format
  4. Create a calculated metric with the following settings.

 

Final Report:

Please let me know if you have any doubt through comment section, will be happy to reply on it.