Skip to content

Source code to add a reporting string to each Adobe Analytics Call

License

Notifications You must be signed in to change notification settings

UrsBoller/AdobeAnalytics_ReportingProp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Adobe Analytics Reporting 2.1

During the Adobe Summit EMEA 2019 in London I presented a new way to add a documentation direcly to workspace projects. You can read a blog post about my tip at webanalyticsfordevelopers.com/2019/05/15/adobe-analytics-documentation-2-0/

In this github I uploaded the whole source code as well as additional information to make it as easy as possible. I want to thank Jan Exner and Benedikt Wedenik for their help in getting the code up and running.

ATTENTION: Update 2.1 - 2019-07-19 - read changes

Source code for your Adobe Analytics Tag Manager

Either in "Adobe DTM" oder "Launch, by Adobe" you need to add code to the Adobe Analytics "Custom Code". Basically you add a new function "writeAADocuString" and call it from inside s.doPlugins. You're custom code should look something like this:

// Define function for documentation (see source code in github)
var writeAADocuString = function (s) { ... }

// Enable plugins
s.usePlugins = true;

function s_doPlugins(s) {
    // Do your custom stuff here

    // Call the quality stats function at the end!
    writeAADocuString(s);
}
// Set plugins function
s.doPlugins = s_doPlugins;

The code for the function "writeAADocuString" is in the github-file "writeAADocuString.js"

Excel file for Classification and Debugging

After you send your codes to Adobe Analytics by implementing the code above, you can classify the codes to add the real names of the items. To make it easier to create the classification file, you can use the file in this github: Excel file "20190511_DocuProp_KeyTemplate_v1.0.xlsx"the file has two sheets for the following purpose:

  1. Sheet "DocuString" contains the table with all codes generated by the code above. This sheet can be used for your classification by adding the desired meta data to all codes. Download a classification file for your prop, copy the table and upload to Adobe Analytics.
  2. Sheet "DecodeDocuString" lets you inspect the new string on the server call. just copy the full string from your Adobe Analytics server call to the marked field and see what codes have been collected. The table uses the classification sheet to lookup the friendly names of all codes.

Please test before publishing (and Disclaimer)

I strongly recommend to test the code after you add it to your Analytics Tool and before you publish for the live website. Even if we tryed to keep the code as clean and fast as possible, there might be bad situation we haven't seen yet.

I do not make any warranties about the completeness, reliability and accuracy of this code. Any action you take upon the code is strictly at your own risk, and I will not be liable for any losses or damages by the code

Change July 2019

I didn't know that some report suites in Adobe Analytics are "case insensitive". that means that the keys "AA" and "aa" get the same classified values - no differentiation possible. Therefore I decided to change the docuString to not contain "case sensitive" values by skipping all the upper case letters. the new string now contains only 39 characters which is just long enough to match the framework. for new implementation just use the files in this github.

steps for migration from base64 to base39 basically only the function buildCachedVarsMap has changed due to the new coding system. and the string now contains different values. Follow this steps to migrate to the new coding system:

  1. Replace the function buildCachedVarsMap in your property, do not forget to set the cookie name (Replace "YOUR_COMPANY" by the desired value)
  2. (optional) depending how far you setup the system, maybe it's worth changing the prop numbers to not mess with the old system. if you stick on the same prop, just make sure that you do not report on the old data (since all has changed ...). If you want, you could set a new prop for docu version (or any other version information you have) to use in a segment for filtering out old values ...
  3. Upload the new classifiations using the excel in this github. the items have the exact same order just the key changed. that means you can just replace the key column to match the new system. In the excel you'll find both the old and new keys just to have the option to compare (in case you want). Remark: I recommend to insert an ~empty~ in all cells not used to clear out old classifications!

About

Source code to add a reporting string to each Adobe Analytics Call

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published