___TERMS_OF_SERVICE___ By creating or modifying this file you agree to Google Tag Manager's Community Template Gallery Developer Terms of Service available at https://developers.google.com/tag-manager/gallery-tos (or such other URL as Google may provide), as modified from time to time. ___INFO___ { "type": "TAG", "id": "cvt_temp_public_id", "version": 1, "securityGroups": [], "displayName": "walkerOS", "brand": { "id": "brand_dummy", "displayName": "elbwalker", "thumbnail": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANkAAADZCAYAAACtvpV2AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAkGVYSWZNTQAqAAAACAAGAQYAAwAAAAEAAgAAARIAAwAAAAEAAQAAARoABQAAAAEAAABWARsABQAAAAEAAABeASgAAwAAAAEAAgAAh2kABAAAAAEAAABmAAAAAAAAAEgAAAABAAAASAAAAAEAA6ABAAMAAAABAAEAAKACAAQAAAABAAAA2aADAAQAAAABAAAA2QAAAADtdgG+AAAACXBIWXMAAAsTAAALEwEAmpwYAAAC5GlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iPgogICAgICAgICA8dGlmZjpQaG90b21ldHJpY0ludGVycHJldGF0aW9uPjI8L3RpZmY6UGhvdG9tZXRyaWNJbnRlcnByZXRhdGlvbj4KICAgICAgICAgPHRpZmY6T3JpZW50Y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2Pgz8196XxykwaO40ZHL2P8lzRz5hqUb7yBpp0o2NQxKwFNuVVnZGMu/ryyimbrGFRo1xbiGVAYKrDuNpWofhny1V6khlQfiL88txTMCmNOKk3M+MZAqFpq+96uHt3sM3KTdzVbYK2093r7YV/K3c3b16feWqevo3uaXT+HzV/v5/tydeWxmntOm/dtquuDn39VVkbRK346VffGBd4+kJ29sTv3rkxcV0sk5vX+lIBZ3cHxmJrbztIPaZ5K4K0vU3q6xNOQ0ovaJPFCOrRrbxKoSKAIG4UTLyTNp4TlEgCfPPXIc+sWpsFBSJAH3UddNYtyPrXfX4kd7dumPj3JGMOIchnV5qxUSx8kjekJYRpNdI6WuJrh2L230UWmww9X5Gzj2S57EzOa4vd9Ff61ieh48uzcYhiZVqsdvlk+NV8wnR22cK/HI5tacaDVZpNTd3AtVfuvv8/MPxOm7g0pOu+aN/Ht0YubtNTrOum97kmjyGCBABIkAEiAARIAJEgAgQASJABIgAESACRIAIEAEiQASIABEgAkSACBABIkAEiAARIAJEgAgQASJABIgAESACRIAIEAEiQASIABEgAkSACBABIkAEiAARIAJEgAgQASJABIgAESACRIAIEAEiQASIABEgAkSACBABIkAEiAARIAJEgAgQASJABIgAESACRIAIEAEiQASIABEgAkSACKhD4P/KgEPMhGhV/QAAAABJRU5ErkJggg\u003d\u003d" }, "description": "Install and configure walker.js", "containerContexts": [ "WEB" ] } ___TEMPLATE_PARAMETERS___ [ { "type": "LABEL", "name": "intro", "displayName": "This is the \u003cb\u003ewalkerOS Tag template\u003c/b\u003e (v1.2) for installing and configuring walker.js on a website. Learn more in the \u003ca href\u003d\"https://www.elbwalker.com/docs/stacks/gtm/tag_template\"\u003edocumentation at elbwalker.com\u003c/a\u003e." }, { "type": "GROUP", "name": "installationGroup", "displayName": "Installation", "groupStyle": "ZIPPY_OPEN", "subParams": [ { "type": "CHECKBOX", "name": "walkerjsLoad", "checkboxText": "Load walker.js", "simpleValueType": true, "subParams": [ { "type": "SELECT", "name": "walkerjsLoadType", "displayName": "From source", "macrosInSelect": false, "selectItems": [ { "value": "cdn", "displayValue": "CDN" }, { "value": "hosted", "displayValue": "Self-hosted" }, { "value": "window", "displayValue": "Window" } ], "simpleValueType": true, "subParams": [ { "type": "TEXT", "name": "walkerjsLoadCDN", "displayName": "With the version", "simpleValueType": true, "enablingConditions": [ { "paramName": "walkerjsLoadType", "paramValue": "cdn", "type": "EQUALS" } ], "defaultValue": "latest", "valueValidators": [ { "type": "NON_EMPTY" } ] }, { "type": "TEXT", "name": "walkerjsLoadURL", "displayName": "Full URL", "simpleValueType": true, "enablingConditions": [ { "paramName": "walkerjsLoadType", "paramValue": "hosted", "type": "EQUALS" } ], "defaultValue": "", "help": "Make sure to add the URL to\u003cbr /\u003e\u003cb\u003ePermissions -\u003e Injects Scripts\u003c/b\u003e", "valueHint": "https://", "valueValidators": [ { "type": "NON_EMPTY" } ] }, { "type": "TEXT", "name": "walkerjsLoadWindow", "displayName": "Name of the factory", "simpleValueType": true, "enablingConditions": [ { "paramName": "walkerjsLoadType", "paramValue": "window", "type": "EQUALS" } ], "defaultValue": "Walkerjs", "help": "Name of the function to create a walker.js instance. Make sure to have Permissions to read and execute.", "valueHint": "Walkerjs", "valueValidators": [ { "type": "NON_EMPTY" } ] } ], "enablingConditions": [ { "paramName": "walkerjsLoad", "paramValue": true, "type": "EQUALS" } ] } ], "defaultValue": true, "alwaysInSummary": false, "help": "There are multiple ways to load walker.js\u003cbr /\u003e\u003col\u003e\u003cli\u003e\u003cb\u003eCDN\u003c/b\u003e: Load from an external source (for quick testing)\u003c/li\u003e\u003cli\u003e\u003cb\u003eSelf-hosted\u003c/b\u003e: Upload the walker.js to your own server for first-party context\u003c/li\u003e\u003cli\u003e\u003cb\u003eWindow\u003c/b\u003e: Use a previously integrated version, e.g. via NPM (recommended)\u003c/li\u003e\u003c/ol\u003e" }, { "type": "SELECT", "name": "walkerjsMode", "displayName": "Mode", "macrosInSelect": false, "selectItems": [ { "value": "run", "displayValue": "Auto run" }, { "value": "consent", "displayValue": "Require consent" }, { "value": "manual", "displayValue": "Manual" } ], "simpleValueType": true, "help": "\u003col\u003e\u003cli\u003e\u003cb\u003eAuto run\u003c/b\u003e starts the walker immediately.\u003c/li\u003e\n\u003cli\u003e\u003cb\u003eRequire consent\u003c/b\u003e waits until the consent state is granted before calling \u0027walker run\u0027.\u003c/li\u003e\n\u003cli\u003e\u003cb\u003eManual\u003c/b\u003e won\u0027t do anything - it\u0027s up to you.\u003c/li\u003e\u003c/ol\u003e", "defaultValue": "run" }, { "type": "TEXT", "name": "walkerjsModeConsent", "displayName": "Required consent state", "simpleValueType": true, "enablingConditions": [ { "paramName": "walkerjsMode", "paramValue": "consent", "type": "EQUALS" } ], "help": "Enter the name of the consent group that has to be set to true via \u003cb\u003ewalker consent\u003c/b\u003e command. Granting that consent state will call \u003cb\u003ewalker run\u003c/b\u003e.", "valueHint": "functional", "valueValidators": [ { "type": "NON_EMPTY" } ], "defaultValue": "functional" }, { "type": "GROUP", "name": "walkerjsNamesGroup", "displayName": "Names", "groupStyle": "ZIPPY_OPEN_ON_PARAM", "subParams": [ { "type": "LABEL", "name": "introNames", "displayName": "Change the default names if there might be a conflict with already existing variables." }, { "type": "TEXT", "name": "walkerjsWindowInstance", "displayName": "walkerjs instance", "simpleValueType": true, "defaultValue": "walkerjs", "help": "This is the variable name that can be used to access the walker.js instance in the browser", "valueHint": "walkerjs", "valueValidators": [ { "type": "NON_EMPTY" } ] }, { "type": "TEXT", "name": "walkerjsWindowElb", "displayName": "elb function", "simpleValueType": true, "defaultValue": "elb", "help": "This is the variable name that can be used to access the elb function in the browser", "valueHint": "elb", "valueValidators": [ { "type": "NON_EMPTY" } ] }, { "type": "TEXT", "name": "walkerjsWindowElbLayer", "displayName": "elbLayer", "simpleValueType": true, "defaultValue": "elbLayer", "help": "This is the variable name for the elbLayer array.", "valueHint": "elbLayer", "valueValidators": [] } ] } ] }, { "type": "GROUP", "name": "optionsGroup", "displayName": "Options", "groupStyle": "ZIPPY_OPEN", "subParams": [ { "type": "TEXT", "name": "walkerjsOptionsTagging", "displayName": "Tagging version", "simpleValueType": true, "defaultValue": 1, "help": "Helps to debug the setup by knowing which tagging version was used during measurement.", "valueValidators": [ { "type": "POSITIVE_NUMBER" } ] }, { "type": "TEXT", "name": "walkerjsOptionsUserId", "displayName": "Set a user id", "simpleValueType": true, "help": "This will set the id for the user. Both device and session ids will be set in the Session section or via a custom on event." }, { "type": "SIMPLE_TABLE", "name": "walkerjsOptionsGlobals", "displayName": "Globals", "simpleTableColumns": [ { "defaultValue": "", "displayName": "Name", "name": "key", "type": "TEXT" }, { "defaultValue": "", "displayName": "Value", "name": "value", "type": "TEXT" } ], "newRowButtonText": "Add global", "help": "Add static globals that will be set to every single event." }, { "type": "CHECKBOX", "name": "walkerjsOptionsLog", "checkboxText": "Preview events in the console", "simpleValueType": true, "displayName": "Logging", "help": "This adds a destination to the walker.js that logs all events to the console." } ] }, { "type": "GROUP", "name": "sessionGroup", "displayName": "Session", "groupStyle": "ZIPPY_OPEN", "subParams": [ { "type": "LABEL", "name": "sessionNote", "displayName": "Session detection, user identification, and consent management are closely connected. Learn more about \u003ca href\u003d\"https://www.elbwalker.com/docs/utils/session\"\u003ehow to detect a session\u003c/a\u003e." }, { "type": "GROUP", "name": "sessionConfigGroup", "displayName": "", "groupStyle": "NO_ZIPPY", "subParams": [ { "type": "CHECKBOX", "name": "session", "checkboxText": "Enable session detection", "simpleValueType": true, "help": "This uses the \u003cb\u003esessionWindow Util\u003c/b\u003e as a cookie-less version", "alwaysInSummary": true, "defaultValue": true }, { "type": "CHECKBOX", "name": "sessionStorage", "checkboxText": "Use Storage", "simpleValueType": true, "help": "This additionally uses the \u003cb\u003esessionStorage Util\u003c/b\u003e to persist data and enhance session information and user identification.", "alwaysInSummary": true, "enablingConditions": [ { "paramName": "session", "paramValue": true, "type": "EQUALS" } ] }, { "type": "LABEL", "name": "infoSessionStorage", "displayName": "This uses \u003cb\u003eelbDeviceId\u003c/b\u003e and \u003cb\u003eelbSessionId\u003c/b\u003e in the \u003cb\u003elocalStorage\u003c/b\u003e. There is a virtual rule to limit the age to 30 days for the device ID and 30 minutes for a session ID, which updates with each new run.", "enablingConditions": [ { "paramName": "sessionStorage", "paramValue": true, "type": "EQUALS" } ] }, { "type": "TEXT", "name": "sessionStorageConsent", "displayName": "Required consent for storage access", "simpleValueType": true, "enablingConditions": [ { "paramName": "sessionStorage", "paramValue": true, "type": "EQUALS" } ], "help": "Once the user\u0027s consent choice is available, the session detection starts", "valueHint": "marketing", "notSetText": "Make sure to have granted consent for storage access." } ] } ], "enablingConditions": [ { "paramName": "walkerjsLoad", "paramValue": true, "type": "EQUALS" } ] }, { "type": "GROUP", "name": "destinationsGroup", "displayName": "Destinations", "groupStyle": "ZIPPY_OPEN", "subParams": [ { "type": "CHECKBOX", "name": "destinationDataLayer", "checkboxText": "Use dataLayer", "simpleValueType": true, "displayName": "Google Tag Manager", "defaultValue": true, "help": "Enabling this option will push every single event to the dataLayer automatically." }, { "type": "TEXT", "name": "destinationDataLayerConfig", "displayName": "dataLayer configuration", "simpleValueType": true, "help": "", "enablingConditions": [ { "paramName": "destinationDataLayer", "paramValue": true, "type": "EQUALS" } ] }, { "type": "PARAM_TABLE", "name": "destinations", "displayName": "Additional destinations", "paramTableColumns": [ { "param": { "type": "TEXT", "name": "code", "displayName": "Code*", "simpleValueType": true, "help": "(Required) The destinations function code", "alwaysInSummary": false, "valueValidators": [ { "type": "NON_EMPTY" } ] }, "isUnique": false }, { "param": { "type": "TEXT", "name": "config", "displayName": "Config", "simpleValueType": true, "help": "Settings about mapping, required consent states and more." }, "isUnique": false } ], "newRowButtonText": "Add destination", "editRowTitle": "Edit destination" } ] }, { "type": "GROUP", "name": "onGroup", "displayName": "On Events", "groupStyle": "ZIPPY_OPEN", "subParams": [ { "type": "SIMPLE_TABLE", "name": "on", "displayName": "Code that gets called on the selected trigger", "simpleTableColumns": [ { "defaultValue": "", "displayName": "Trigger", "name": "trigger", "type": "SELECT", "selectItems": [ { "value": "consent", "displayValue": "Consent" }, { "value": "ready", "displayValue": "Ready" }, { "value": "run", "displayValue": "Run" }, { "value": "session", "displayValue": "Session" } ] }, { "defaultValue": "", "displayName": "Code", "name": "code", "type": "TEXT" } ], "newRowButtonText": "Add event" } ] }, { "type": "GROUP", "name": "hooksGroup", "displayName": "Hooks", "groupStyle": "ZIPPY_OPEN", "subParams": [ { "type": "SIMPLE_TABLE", "name": "hooks", "displayName": "Update default behavior with custom hooks", "simpleTableColumns": [ { "defaultValue": "", "displayName": "Hook", "name": "hookName", "type": "SELECT", "selectItems": [ { "value": "prePush", "displayValue": "prePush" }, { "value": "preDestinationInit", "displayValue": "preDestinationInit" }, { "value": "postDestinationInit", "displayValue": "postDestinationInit" }, { "value": "preDestinationPush", "displayValue": "preDestinationPush" }, { "value": "preDestinationPushBatch", "displayValue": "preDestinationPushBatch" }, { "value": "postDestinationPush", "displayValue": "postDestinationPush" }, { "value": "postDestinationPushBatch", "displayValue": "postDestinationPushBatch" }, { "value": "postPush", "displayValue": "postPush" }, { "value": "preSessionStart", "displayValue": "preSessionStart" }, { "value": "postSessionStart", "displayValue": "postSessionStart" } ], "valueValidators": [ { "type": "NON_EMPTY" } ] }, { "defaultValue": "", "displayName": "Code", "name": "hookCode", "type": "TEXT", "valueValidators": [ { "type": "NON_EMPTY" } ] } ], "newRowButtonText": "Add Hook", "help": "Hooks can be used to customize the default behavior of the walker.js. Three hooks are available: Push, DestinationInit, and DestinationPush. Hooks allows for validation, manipulation, or even eventual cancellation of default behavior. \u003ca href\u003d\"https://www.elbwalker.com/docs/sources/walkerjs/commands#hooks\"\u003eRead more about hooks\u003c/a\u003e." } ] } ] ___SANDBOXED_JS_FOR_WEB_TEMPLATE___ const log = require("logToConsole"); const callInWindow = require("callInWindow"); const copyFromWindow = require("copyFromWindow"); const createArgumentsQueue = require("createArgumentsQueue"); const injectScript = require("injectScript"); // log("data", data); function isObject(o) { return typeof o === "object" && o !== null; } // Names const elbLayerName = data.walkerjsWindowElbLayer ? data.walkerjsWindowElbLayer : "elbLayer"; // elbLayer name const walkerjsName = data.walkerjsWindowInstance ? data.walkerjsWindowInstance : "walkerjs"; // walkerjs instance name const elbName = data.walkerjsWindowElb ? data.walkerjsWindowElb : "elb"; // elb function name // elb let elb = copyFromWindow(elbName); // Get existing elb function if (!elb) elb = createArgumentsQueue(elbName, elbLayerName); // (Optional) create elb function // Installation function installation() { // Options const config = {}; // Window variables config.instance = walkerjsName; config.elb = elbName; // Tagging version if (data.walkerjsOptionsTagging) config.tagging = data.walkerjsOptionsTagging; // User ID if (data.walkerjsOptionsUserId) config.user = { id: data.walkerjsOptionsUserId }; // Globals if (data.walkerjsOptionsGlobals) { const globals = data.walkerjsOptionsGlobals.reduce(function (acc, global) { acc[global.key] = global.value; return acc; }, {}); config.globalsStatic = globals; } // DataLayer destination if (data.destinationDataLayer) { config.dataLayer = true; config.dataLayerConfig = data.destinationDataLayerConfig || {}; } // Session if (data.session) { config.session = {}; // Storage if (data.sessionStorage) config.session.storage = true; // Consent for storage access if (data.sessionStorageConsent) config.session.consent = data.sessionStorageConsent; } else { config.session = false; } // Init modes function requireConsentMode(instance, consent) { if (consent[data.walkerjsModeConsent]) elb("walker run"); } if (data.walkerjsMode == "consent") { // Require consent var consent = {}; consent[[data.walkerjsModeConsent]] = requireConsentMode; elb("walker on", "consent", consent); } else if (data.walkerjsMode == "run") { // Auto run config.run = true; } var factory = data.walkerjsLoadWindow ? data.walkerjsLoadWindow : "Walkerjs.default"; // Let's go callInWindow(factory, config); data.gtmOnSuccess(); } // Destinations if (data.destinations) { data.destinations.forEach(function (destination) { // Validation if (!isObject(destination.code)) data.gtmOnFailure(); var config = isObject(destination.config) ? destination.config : {}; // Add the destination elb("walker destination", destination.code, config); }); } // On Events if (data.on) { var onConsent = []; var onReady = []; var onRun = []; var onSession = []; data.on.forEach(function (on) { if (on.trigger == "consent") onConsent.push(on.code); if (on.trigger == "ready") onReady.push(on.code); if (on.trigger == "run") onRun.push(on.code); if (on.trigger == "session") onSession.push(on.code); }); if (onConsent.length) elb("walker on", "consent", onConsent); if (onReady.length) elb("walker on", "ready", onReady); if (onRun.length) elb("walker on", "run", onRun); if (onSession.length) elb("walker on", "session", onSession); } // Hooks if (data.hooks) { data.hooks.forEach(function (hook) { elb("walker hook", hook.hookName, hook.hookCode); }); } // Debug mode preview destination if (data.walkerjsOptionsLog) { elb( "walker destination", { push: function (e) { log("preview", e); }, }, { type: "preview" } ); } // Load if (data.walkerjsLoad) { var url = data.walkerjsLoadURL; // Load self-hosted // Load from CDN if (data.walkerjsLoadCDN) { url = "https://cdn.jsdelivr.net/npm/@elbwalker/walker.js@" + data.walkerjsLoadCDN + "/dist/index.browser.js"; } if (url) { injectScript(url, installation, data.gtmOnFailure, "walkerjs"); } else { installation(); } } else { data.gtmOnSuccess(); } ___WEB_PERMISSIONS___ [ { "instance": { "key": { "publicId": "logging", "versionId": "1" }, "param": [ { "key": "environments", "value": { "type": 1, "string": "debug" } } ] }, "clientAnnotations": { "isEditedByUser": true }, "isRequired": true }, { "instance": { "key": { "publicId": "access_globals", "versionId": "1" }, "param": [ { "key": "keys", "value": { "type": 2, "listItem": [ { "type": 3, "mapKey": [ { "type": 1, "string": "key" }, { "type": 1, "string": "read" }, { "type": 1, "string": "write" }, { "type": 1, "string": "execute" } ], "mapValue": [ { "type": 1, "string": "elb" }, { "type": 8, "boolean": true }, { "type": 8, "boolean": true }, { "type": 8, "boolean": true } ] }, { "type": 3, "mapKey": [ { "type": 1, "string": "key" }, { "type": 1, "string": "read" }, { "type": 1, "string": "write" }, { "type": 1, "string": "execute" } ], "mapValue": [ { "type": 1, "string": "walkerjs" }, { "type": 8, "boolean": true }, { "type": 8, "boolean": true }, { "type": 8, "boolean": false } ] }, { "type": 3, "mapKey": [ { "type": 1, "string": "key" }, { "type": 1, "string": "read" }, { "type": 1, "string": "write" }, { "type": 1, "string": "execute" } ], "mapValue": [ { "type": 1, "string": "elbLayer" }, { "type": 8, "boolean": true }, { "type": 8, "boolean": true }, { "type": 8, "boolean": false } ] }, { "type": 3, "mapKey": [ { "type": 1, "string": "key" }, { "type": 1, "string": "read" }, { "type": 1, "string": "write" }, { "type": 1, "string": "execute" } ], "mapValue": [ { "type": 1, "string": "Walkerjs" }, { "type": 8, "boolean": true }, { "type": 8, "boolean": true }, { "type": 8, "boolean": true } ] }, { "type": 3, "mapKey": [ { "type": 1, "string": "key" }, { "type": 1, "string": "read" }, { "type": 1, "string": "write" }, { "type": 1, "string": "execute" } ], "mapValue": [ { "type": 1, "string": "Walkerjs.default" }, { "type": 8, "boolean": true }, { "type": 8, "boolean": false }, { "type": 8, "boolean": true } ] } ] } } ] }, "clientAnnotations": { "isEditedByUser": true }, "isRequired": true }, { "instance": { "key": { "publicId": "inject_script", "versionId": "1" }, "param": [ { "key": "urls", "value": { "type": 2, "listItem": [ { "type": 1, "string": "https://cdn.jsdelivr.net/npm/@elbwalker/*" }, { "type": 1, "string": "https://elbwalker.com/*" } ] } } ] }, "clientAnnotations": { "isEditedByUser": true }, "isRequired": true } ] ___TESTS___ scenarios: - name: Default settings code: |- runCode({}); assertThat(copyFromWindow('elb')).isDefined(); assertThat(copyFromWindow('walkerjs')).isUndefined(); assertApi('gtmOnSuccess').wasCalled(); - name: Load Window code: | runCode(dataWalkerjsLoad); assertApi("callInWindow").wasCalledWith("Walkerjs", { instance: data.walkerjsWindowInstance, elb: data.walkerjsWindowElb, session: false, }); assertApi("gtmOnSuccess").wasCalled(); - name: Load CDN code: | runCode(assign( data, { walkerjsLoad: true, walkerjsLoadType: 'CDN', walkerjsLoadCDN: 'version', }) ); assertApi('injectScript').wasCalledWith("https://cdn.jsdelivr.net/npm/@elbwalker/walker.js@version/dist/index.browser.js", success, failure, 'walkerjs'); assertApi("callInWindow").wasCalledWith("Walkerjs.default", { instance: data.walkerjsWindowInstance, elb: data.walkerjsWindowElb, session: false, }); assertApi("gtmOnSuccess").wasCalled(); - name: Load self-hosted code: | runCode(assign( data, { walkerjsLoad: true, walkerjsLoadType: 'hosted', walkerjsLoadURL: 'CUSTOM_URL', }) ); assertApi('injectScript').wasCalledWith("CUSTOM_URL", success, failure, 'walkerjs'); assertApi("callInWindow").wasCalledWith("Walkerjs.default", { instance: data.walkerjsWindowInstance, elb: data.walkerjsWindowElb, session: false, }); assertApi("gtmOnSuccess").wasCalled(); - name: Mode Auto run code: | runCode(assign( dataWalkerjsLoad, { walkerjsMode: 'run' } )); assertApi("callInWindow").wasCalledWith("Walkerjs", { instance: data.walkerjsWindowInstance, elb: data.walkerjsWindowElb, session: false, run: true }); assertApi("gtmOnSuccess").wasCalled(); - name: Mode Require consent code: | runCode(assign( dataWalkerjsLoad, { walkerjsMode: 'consent' } )); assertApi("callInWindow").wasCalledWith("Walkerjs", { instance: data.walkerjsWindowInstance, elb: data.walkerjsWindowElb, session: false, }); assertApi("gtmOnSuccess").wasCalled(); setup: |- let log = require("logToConsole"); const copyFromWindow = require("copyFromWindow"); const setInWindow = require("setInWindow"); // Required fields with default values data.walkerjsWindowElbLayer = "elbLayer"; data.walkerjsWindowInstance = "walkerjs"; data.walkerjsWindowElb = "elb"; const dataWalkerjsLoad = assign( { walkerjsLoad: true, walkerjsLoadType: "window", walkerjsLoadWindow: "Walkerjs", }, data ); // Miss you, Object.assign function assign(o1, o2) { for (var key in o2) { if (o2.hasOwnProperty(key)) { o1[key] = o2[key]; } } return o1; } // Mocks let success, failure; mock("injectScript", (url, onsuccess, onfailure) => { success = onsuccess; failure = onfailure; onsuccess(); }); const elbCalls = []; function mockElb(a, b, c) { elbCalls.push(a, b, c); } setInWindow(data.walkerjsWindowElb, mockElb); ___NOTES___ Created on 3/15/2024, 3:08:28 PM