...
You can use the following JavaScript to display the event's output in the browser's console:
Code Block |
---|
|
document.addEventListener('mopinion_ready', function(e) {
console.log(e.detail)
}); |
Specific code to push the Event Object into the Google Tag Manager dataLayer:
Code Block |
---|
|
<script type="text/javascript">
document.addEventListener('mopinion_ready', function(e) {
dataLayer.push(e.detail)
});
</script> |
The result in the console / dataLayer:
Code Block |
---|
|
{event: "ready",
key: "[UNIQUE_FORM_KEY]",
formName: "[FORM_NAME]"} |
...
You can use the following JavaScript to display the event's output in the browser's console:
Code Block |
---|
|
document.addEventListener('mopinion_will_show', function(e) {
console.log(e.detail)
}); |
Specific code to push the Event Object into the Google Tag Manager dataLayer:
Code Block |
---|
|
<script type="text/javascript">
document.addEventListener('mopinion_will_show', function(e) {
dataLayer.push(e.detail)
});
</script> |
The result in the console / dataLayer:
Code Block |
---|
|
{event: "will_show",
key: "[UNIQUE_FORM_KEY]",
formName: "[FORM_NAME]",
triggerMethod: "[PASSIVE | PROACTIVE | EXIT]"} |
...
You can use the following JavaScript to display the event's output in the browser's console:
Code Block |
---|
|
document.addEventListener('mopinion_shown', function(e) {
console.log(e.detail)
}); |
Specific code to push the Event Object into the Google Tag Manager dataLayer:
Code Block |
---|
|
<script type="text/javascript">
document.addEventListener('mopinion_shown', function(e) {
dataLayer.push(e.detail)
});
</script> |
The result in the console / dataLayer:
Code Block |
---|
|
{event: "shown",
key: "[UNIQUE_FORM_KEY]",
formName: "[FORM_NAME]",
triggerMethod: "[PASSIVE | PROACTIVE | EXIT]"} |
...