Skip to content

Instantly share code, notes, and snippets.

@morriq
Last active May 7, 2020 05:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morriq/9a0cc9ccd6b4f4c03e023257bf025177 to your computer and use it in GitHub Desktop.
Save morriq/9a0cc9ccd6b4f4c03e023257bf025177 to your computer and use it in GitHub Desktop.
gtm
"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