Last active
January 22, 2020 17:43
-
-
Save MattJermyWright/c00db269abf74b50727672642bc902a6 to your computer and use it in GitHub Desktop.
HPE: Decibel code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global sessionStorage decibelInsight s digitalData utag_data */ | |
(function (s) { | |
var enable = false | |
try { | |
enable = location.hostname.indexOf('www.hpe.com')!==-1 && digitalData.page.pageInfo.technology_stack.indexOf('AEM') > -1 | |
} catch (e) {} | |
if (enable) { | |
digitalData.log.info('***Decibel Adobe Integrate: enable detected, starting to execute plugin') | |
s.maxDelay = 750 | |
s.loadModule('Integrate') | |
s.Integrate.onLoad = function (s) { | |
digitalData.log.info('***Decibel Adobe Integrate: starting integrate onload') | |
var eVar = 'eVar127' | |
var diPropertyId = '280307' | |
if (sessionStorage && sessionStorage._da_da_sessionId) { | |
s[eVar] = 'di-' + diPropertyId + '-' + sessionStorage._da_da_sessionId | |
} else { | |
s.Integrate.add('DecibelInsight') | |
s.Integrate.DecibelInsight.sessionVar = eVar | |
s.Integrate.DecibelInsight.setVars = function (s, p) { | |
if (typeof decibelInsight.getSessionId === 'function') { | |
s[p.sessionVar] = decibelInsight.getSessionId() | |
} | |
} | |
if (typeof decibelInsight === 'undefined' || typeof decibelInsight.getSessionId !== 'function') { | |
s.Integrate.DecibelInsight.delay() | |
} | |
} | |
digitalData.log.info('***Decibel Adobe Integrate: done integrate onload') | |
} | |
digitalData.log.info('***Decibel Adobe Integrate: finished with plugin') | |
} | |
})(s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment