Saturday, June 30, 2018

Adobe Audience Library and Where It Fits In

Digital Analysts and Marketers make informed decisions when they have the data they need without worrying about underlying system limitations. I know how empowered our customers feel when they see reporting solutions connect seamlessly with one another.

Recently, I worked with a client who was trying to share a bunch of segments from Adobe Analytics to Audience Manager and Adobe Ad Cloud. It should've been simple given the robust integrations we already have among various Experience Cloud solutions but in this case, we found a gap. The gap was primarily in terms of the number of segments that can be shared (20 segments from Analytics to Audience Manager) and the lack of a direct integration between Analytics and Ad Cloud. So, what was the solution? 

The solution was Audience Library. Adobe Audience Library is built on the same framework as Audience Manager where Visitor segments are shared seamlessly across the Experience Cloud. Audience Library provides us that ability by automatically sharing segments across Adobe Analytics, Audience Manager, Adobe Target and Adobe Ad Cloud with no known limits in how many segments can be shared (I will update this if I come to know of any). 


How To Get Access To It?

  • The first step is to get provisioned with Shared Audiences.
  • Make sure you've implemented the Experience Cloud ID Service on your Website or App.
  • Once provisioned, get access to the Audience Library product in the Adobe admin console.

  • Click on the "People" link with the Experience Cloud product selector menu and click on Audience Library.


Quick Walkthrough of Audience Library

  • The Audience Library home screen will show all audiences/segments created in Adobe Analytics, Audience Library and Audience Manager as shown below.

  • Click on the "New" button to create a new audience.
  • On the segment creation page, you can create a combination of Experience Cloud audiences (retroactive) and Real-time audiences which will look like this

  • For this demo, I created a Real-time segment called "Test Segment for Audience Library" which pulls data from an Analytics report suite tied to a page name.

  • Finally, we check if our segment shows up in different Adobe solutions. In this case, we'll check if it shows up in Audience Manager and Target which it does.



When To Use Audience Library

  • When you've run out of segments to share from Analytics to Audience Manager. 
  • If you want to share Analytics batch or Real-time audiences or both across the Experience Cloud (primarily Analytics to Adobe Ad Cloud or Target) automatically. Note that Audience Manager automatically send segments to Adobe Target as well.
  • If segmentation requirements are based on simple conditional logic tied to Visitors for personalization, retargeting or other use cases.

Limitations of Audience Library

  • Audience Library doesn't allow sequential segmentation like it's possible in Adobe Analytics.
  • It doesn't let you define segment containers based on Page View and Visit like we can do in Analytics.

To summarize, Audience Library is not the ultimate solution for all segmentation requirements but it can certainly solve a lot of problems either stemming from lack of system integrations or limitations in terms of the number of segments needed to be shared. I'd encourage you to give it a try.

Saturday, June 9, 2018

Accelerated Mobile Pages Adobe Analytics Tagging

A few months ago, I participated in a "Hackathon" at work and was tasked with creating a technical guide outlining how to set up Launch by Adobe on Accelerated Mobile Pages (AMP). In this post, I'll share a link to the tech guide I worked on as part of the Hackathon as well as cover basic Adobe Analytics link tracking on AMP pages. 

According to the official AMP website, AMP is an open-source library that provides a straightforward way to create web pages that are compelling, smooth, and load near instantaneously for users. AMP pages are just web pages that you can link to and are controlled by you. One of the reasons why these pages are "compelling, smooth, and load near instantaneously" is because they don't run any JavaScript. 


Digital Analytics tags as you already know, rely almost entirely on JavaScript and not having it enabled introduces a lot of implementation challenges. This post covers two different methodologies by which we set up Adobe Analytics page load and link tracking using AMP. I'll also share links to some sample pages with you for you to set them up on your end. Let's dive right in!


AMP Pages Tagging via Launch by Adobe


Before we get started, it's important to call out that this method supports the Visitor ID Service, Adobe Analytics page view tracking and Adobe Audience Manager. Adobe Target and link tracking are not supported with this approach. 


Here's a link to the public facing technical guide I created that walks through how to do Adobe Analytics page load tracking on AMP pages. I'm going to reference certain components from it in this section.

Validate AMP Syntax

The first step is to make sure your site is compatible with AMP. To do so, paste your code into the AMP validator code editor. Below is a screenshot from the validator site showing that my test page passed (click on the image to enlarge) the syntactical check on the validator site.



Add References to Libraries


We need to reference a couple of JavaScript libraries which are compatible with the AMP platform. These are pasted below and highlighted in the screenshot. Make sure to reference these correctly as shown in the screenshot.

  • https://cdn.ampproject.org/v0/amp-analytics-0.1.js (Mandatory file for any kind of analytics tracking in AMP be it Adobe Analytics or Google Analytics.)
  • https://cdn.ampproject.org/v0/amp-iframe-0.1.js (Required if you want to setup Adobe Analytics using any Tag Management solution such as Launch by Adobe)



Leverage  the "adobeanalytics_nativeConfig" Template


This is the most important step in the overall configuration. This method makes use of the "adobeanalytics_nativeConfig" template to host the Launch by Adobe library in an iframe as well as outputs meta data required to pass data over to the Analytics tag.


There are two main components of the code as shown in the sections highlighted below.



This is where the iframe (Red) is added and meta data (Blue) to pass along

The "iframeMessage" section (Red) contains the link to the iframe URL along with additional data points such as page URL, referring URL etc along with the iframe domain which in this case is my blog. The next two screenshots see how "iframeMessage" is linked to a separate "iframe" page on my blog.

The "extraUrlParams" section (Blue) contains any meta data you want to pass along to the Tag Management tool and eventually to your Analytics solution. We can think of this as a virtual data layer.

http://rkapoor.blogspot.com/2018/05/launch.html is where the Launch library is hosted

The HTML of the iframe page is very simple where all we've included is the Launch by Adobe library code.


HTML of the iframe page reference added here

Setup Adobe Analytics Extension in Launch


Install the Adobe Analytics extension in Launch.




Create a data element to override the page URL to capture the parent page URL instead of the iframe URL.


Validate Adobe Analytics on the AMP Page

Here's a link to a page I created to showcase the capability of this hosted on a server. Also, here's a link to a couple of simple AMP pages which when hosted on a server, will fire the Adobe Analytics tag as shown below. 


Caveats with this Approach
  • This method doesn't work on Adobe Target due to the iframe
  • Link tracking doesn't work with the "adobeanalytics_nativeConfig" template
  • We've seen issues with Safari where the iFrame is unable to set a cookie and the Visitor object thereby affecting the Visitor/Visit count

Link Tracking on AMP Pages

This section is based off the instructions provided in the official Adobe documentation. I've added a simple addition to show how to fire off events as a client asked about it which are not listed on this page. Let's go through the setup.

Link Tracking Code Setup

The screenshot below shows the code that we need to use to setup basic image pixel based page load and link tracking on AMP pages. At a high level, there are three main sections in the code.


  • The "requests" section (Red) contains a definition of various Adobe Analytics variables that are referenced for the page view and link tracking image requests.
  • The "vars" section (Blue) contains variables that are mandatory to send the image request such as tracking server and report suite.
  • The "click" section (Orange) is where we define all variables needed to be sent as part of the link tracking call.

Validate Link Tracking

Below is a screenshot that shows the Adobe Analytics link tracking call.



Caveats with this Approach

Here's a link to a page hosted on a server that has a click tracking example for AMP. There are lot of issues with this method which are taken from the test page hosted on Adobe's Github

  • Visitor/visit counts will be hyper inflated.
  • Visitor ID Service is not supported.
  • No way to tie a visitor back to the originating site (no measuring new vs repeat visitors or user acquisition).

Given that the link tracking method on AMP causes visitor duplication, my recommendation is to go with the first method which leverages an iframe. How are you tracking your AMP pages?