Last active
May 7, 2020 05:37
-
-
Save morriq/9a0cc9ccd6b4f4c03e023257bf025177 to your computer and use it in GitHub Desktop.
gtm
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
"use strict"; | |
var addEventCallback = require('addEventCallback'); | |
var callInWindow = require('callInWindow'); | |
var makeString = require('makeString'); | |
addEventCallback(function (containerId, eventData) { | |
var tags = eventData.tags.map(function (tag) { | |
return { | |
containerId: containerId, | |
tagId: makeString(tag.id), | |
executionTime: makeString(tag.executionTime), | |
status: tag.status, | |
additionalInformation: "" | |
}; | |
}); | |
callInWindow('gptr', 'send', 'tagmanager', { | |
tags: tags | |
}); | |
}); | |
data.gtmOnSuccess(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment