Adobe Analytics

This document provides a basic integration guide for using HUMAN’s binary result flag to enrich Adobe Analytics.

Prerequisites

JavaScript integration

The data from HUMAN is returned as an event. To receive the event, you must store the following functions in an Adobe eVar.

APPID will be equal to your app ID. For example if your APPID is PX12345678, then your function variable will be window.PX12345678_asyncInit.

1window.APPID_asyncInit = function(px) { // replace with your app ID
2 px.Events.on('score', function(score) {
3 // Set your action for the score here
4 // The score can go to another variable or function
5 try {
6 // Set eVar for Adobe
7 window.digitalData.page.pageInfo.attributes.pxbs = score;
8 } catch (err) {
9 console.log("error: " + err);
10 }
11 });
12};

Add the JS to your domain

The JavaScript integration can be added to your existing HUMAN JavaScript snippet.

1<script type="text/javascript">
2(function() {
3
4 // Adobe Integration added here
5 window.PX12345678_asyncInit = function(px) {
6 px.Events.on('score', function(score) {
7 // Set your action for the score here
8 // The score can go to another variable or function
9 try {
10 // Set eVar for Adobe
11 window.digitalData.page.pageInfo.attributes.pxbs = score;
12 } catch (err) {
13 console.log("error: " + err);
14 }
15 });
16 };
17// Custom parameters
18// window._pxParam1 = "<param1>";
19var p = document.getElementsByTagName('script')[0],
20 s = document.createElement('script');
21s.async = 1;
22s.src = '//client.perimeterx.net/PX12345678/main.min.js';
23p.parentNode.insertBefore(s, p);
24}());
25</script>