This file contains 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
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: #333; | |
cursor: default; | |
margin: 0; | |
padding: 0; |
This file contains 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
<script type="text/javascript"> | |
function OMCustomVariables(setCustom) { | |
setCustom('name', 'Thomas'); | |
} | |
</script> |
This file contains 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
<script type="text/javascript"> | |
window.OMCustomVariables = function(setCustom) { | |
setCustom('name', 'Thomas'); | |
}; | |
</script> |
This file contains 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
document.addEventListener('om.Campaign.normalize', function(event) { | |
console.log(event.detail.Campaign); | |
} ); |
This file contains 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
document.addEventListener('om.Action.window', function(event) { | |
// This event is passed the Campaign object | |
console.log(event.detail.Campaign); | |
// This event is passed the Action object | |
console.log(event.detail.Action); | |
} ); |
This file contains 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
document.addEventListener('om.Analytics.track', function(event) { | |
if ( 'conversion' === event.detail.Analytics.type ) { | |
console.log(event.detail.Campaign.id + '-' + event.detail.Campaign.type + ' successfully tracked a conversion.'); | |
} else { | |
console.log(event.detail.Campaign.id + '-' + event.detail.Campaign.type + ' successfully tracked an impression.'); | |
} | |
} ); |
This file contains 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
document.addEventListener('om.Analytics.track', function(event) { | |
// This event is passed the Campaign object | |
console.log(event.detail.Campaign); | |
// This event is passed the Analytics object | |
console.log(event.detail.Analytics); | |
} ); |
This file contains 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
document.addEventListener('om.Analytics.track', function(event) { | |
if ( 'conversion' === event.detail.Analytics.type ) { | |
dataLayer.push({ | |
'event': 'gaTriggerEvent', | |
'gaEventCategory': 'form', | |
'gaEventAction': 'submit', | |
'gaEventLabel': 'optin-monster' | |
}); | |
} | |
} ); |
This file contains 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
<script type="text/javascript"> | |
document.addEventListener('om.Dtr.init', function(event) { | |
/** | |
* API method for setting a custom variable. Must be accessed via the Dtr object. | |
* | |
* @param string $key The custom variable key to set. | |
* @param string $value The custom variable value to set for the key. | |
* @return null | |
*/ | |
event.detail.Dtr.setCustomVariable('foo', 'bar'); |
This file contains 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
<script type="text/javascript"> | |
document.addEventListener('om.Dtr.init', function(event) { | |
/** | |
* API method for retrieving a custom variable. Must be accessed via the app object. | |
* | |
* @param string $key The custom variable key to retrieve. | |
* @return string|bool The value of the custom variable key or false if not found. | |
*/ | |
event.detail.Dtr.getCustomVariable('foo'); | |
}); |