-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.tpl
333 lines (307 loc) · 19.1 KB
/
template.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
___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": "mParticle - Event - Custom Template",
"catagories": [
"MARKETING",
"ANALYTICS",
"PERSONALIZATION"
],
"brand": {
"id": "brand_dummy",
"displayName": "",
"thumbnail": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAC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BMKWm1l5VSP/P6mwDidKXX7Szx2U+OALGAlhbgFVpWlrALywL9B3GOR6AAzpO/o3OEhx2sQCxjlxbgLHZZWUaAVEC/X2SFATvghE3dsuJsh2W0sCqQO3h4JbhvDvDLFQ4GVocVSMWSVnter0YOB/2NAm7Z1quONT6X6rACqZj+AzzHagSozRU9KCc8KsYKpEZ6NbLMbASohMw6lgiO+hAgDWCnFmAdO6waQIA0RD8KRWYjx6O8AYAd63rWwaNIGkCANEyfYl9myA6Usq3bVRwIbBBD9IblTrFfjPpGAMVd5DS5G1iBOIS2FjAS7SrHECAOYrcWsAe7qxxFgDgsabUXlVIXmI8gUjLnuNDrdlb4A+AmAsRxSat9UH760r94XDxi0NMr8OVet/OAT9xdBIgnCBJEgODwDAHiGR0k8pfsdOz3AkG5ottVBIdHCBBP6R1bMh9ZYEUCT8mKY1UHBzurPESAeI7WFjxEqyoQBEggCBJ4gOAIDAESILb/wjFsxw0UARIw/ZytJU62oyHrerXBI0cCRYBEgIE7asRgPCIESET0nCRblfCYFNi0qecbq8w34kGARCppted0kLAqwaSy1Ya0qTa4i/EhQCKXW5UsMitBQev6qdGsNiJHgGCXnpVkLS52cCFvO9eiYraBHQQIBtItrkUdKIRJnLZ1i2qFFhUGIUAwFmESFUIDhREgKCXX5lpgZhKMdR0atKdQCgGCieUG8PPs5vJKtntqjUE4pkGAwBrd6prXv05xZ51yQwfGGq0p2EKAoDL63e7yKwsWVij16Omw2NCBwbvEUQkCBLXRK5S5XKhwGt6OzSws5J+sMFAXAgSN0quUudwvQmW0LCw2dFiwukBjCBA4R69UZnKhMhNhsEhQbOXCYouVBVxDgMAbegtxFiwHc/+c8fB8yrYOiAc6IB7kgoKttPACAYJg6G3Fc/r7ycJG5cJG5f7d9opmU4dAZiP371v6l9JtJ7bNwn9Kqf8H39S0uDFap1wAAAAASUVORK5CYII\u003d"
},
"description": "This template allows for the configuration and sending of a mParticle custom event. This tag will only work after the successful initialization of the mParticle SDK.",
"containerContexts": [
"WEB"
]
}
___TEMPLATE_PARAMETERS___
[
{
"type": "TEXT",
"name": "eventName",
"displayName": "Event Name",
"simpleValueType": true,
"help": "Please enter the desired event name for this custom event.",
"valueValidators": [
{
"type": "NON_EMPTY"
}
]
},
{
"type": "SELECT",
"name": "eventType",
"displayName": "Event Type",
"macrosInSelect": false,
"selectItems": [
{
"value": 1,
"displayValue": "Navigation"
},
{
"value": 2,
"displayValue": "Location"
},
{
"value": 3,
"displayValue": "Search"
},
{
"value": 4,
"displayValue": "Transaction"
},
{
"value": 5,
"displayValue": "UserContent"
},
{
"value": 6,
"displayValue": "UserPreference"
},
{
"value": 7,
"displayValue": "Social"
},
{
"value": 8,
"displayValue": "Other"
}
],
"simpleValueType": true,
"valueValidators": [
{
"type": "NON_EMPTY"
}
]
},
{
"type": "SIMPLE_TABLE",
"name": "customAttributes",
"displayName": "Custom Attributes",
"simpleTableColumns": [
{
"defaultValue": "",
"displayName": "Attribute Key",
"name": "key",
"type": "TEXT"
},
{
"defaultValue": "",
"displayName": "Attribute Value",
"name": "value",
"type": "TEXT"
}
],
"help": "Please enter any desired custom attributes to be mapped onto this event here."
},
{
"type": "SIMPLE_TABLE",
"name": "customFlags",
"displayName": "Custom Flags",
"simpleTableColumns": [
{
"defaultValue": "",
"displayName": "Flag Key",
"name": "key",
"type": "TEXT"
},
{
"defaultValue": "",
"displayName": "Flag Value",
"name": "value",
"type": "TEXT"
}
],
"help": "Please enter any desired custom flags to be mapped onto this event here."
}
]
___SANDBOXED_JS_FOR_WEB_TEMPLATE___
// Enter your template code here.
const log = require('logToConsole');
const callInWindow = require('callInWindow');
log('data =', data);
// -- helper functions --
const populateAttributes = function(rows){
let obj = {};
if (rows) {
rows.forEach((row)=> {
obj[row.key] = row.value;
});
}
return obj;
};
// -- Log mParticle Event --
let eventName = data.eventName;
let eventType = data.eventType;
let attributes = populateAttributes(data.customAttributes);
let flags = populateAttributes(data.customFlags);
//callInWindow('mParticle.ready', function() {
callInWindow('mParticle.logEvent', eventName, eventType, attributes, flags);
//});
// Call data.gtmOnSuccess when the tag is finished.
data.gtmOnSuccess();
___WEB_PERMISSIONS___
[
{
"instance": {
"key": {
"publicId": "logging",
"versionId": "1"
},
"param": [
{
"key": "environments",
"value": {
"type": 1,
"string": "all"
}
}
]
},
"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": "mParticle.logEvent"
},
{
"type": 8,
"boolean": false
},
{
"type": 8,
"boolean": false
},
{
"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": "mParticle.ready"
},
{
"type": 8,
"boolean": false
},
{
"type": 8,
"boolean": false
},
{
"type": 8,
"boolean": true
}
]
}
]
}
}
]
},
"clientAnnotations": {
"isEditedByUser": true
},
"isRequired": true
}
]
___TESTS___
scenarios:
- name: Event logged in window
code: "const log = require('logToConsole');\nconst mockData = {\n eventName: \"\
test event name\", \n eventType: 8,\n customFlags: [\n {\n \"key\": \"\
CF Key\", \n \"value\": \"CF Value\", \n }\n ],\n customAttributes: [\n\
\ {\n \"key\": \"CA Key\", \n \"value\": \"CA Value\",\n }\n \
\ ],\n};\n\nmock('callInWindow', function(method, fun) {\n if (method == \"mParticle.Ready\"\
) {\n log(fun); \n return fun; \n }\n});\n \nconst transformedData\
\ = {\n eventName: \"test event name\", \n eventType: 8,\n attributes: {\n\
\ \"CA Key\": \"CA Value\"\n }, \n flags: {\n \"CF Key\": \"CF Value\"\
\n }\n};\n// Call runCode to run the template's code.\nrunCode(mockData);\n\n\
// Verify that the tag finished successfully.\nassertApi('callInWindow').wasCalledWith('mParticle.logEvent',\
\ transformedData.eventName, transformedData.eventType, transformedData.attributes,\
\ transformedData.flags);\n"
- name: Attributes and flags converted properly when provided
code: "const log = require('logToConsole');\nconst mockData = {\n eventName: \"\
test event name\", \n eventType: 8,\n customFlags: [\n {\n \"key\": \"\
CF Key\", \n \"value\": \"CF Value\", \n }\n ],\n customAttributes: [\n\
\ {\n \"key\": \"CA Key\", \n \"value\": \"CA Value\",\n }\n \
\ ],\n};\n\nmock('callInWindow', function(method, fun) {\n if (method == \"mParticle.Ready\"\
) {\n log(fun); \n return fun; \n }\n});\n \nconst transformedData\
\ = {\n eventName: \"test event name\", \n eventType: 8,\n attributes: {\n\
\ \"CA Key\": \"CA Value\"\n }, \n flags: {\n \"CF Key\": \"CF Value\"\
\n }\n};\n// Call runCode to run the template's code.\nrunCode(mockData);\n\n\
// Verify that the tag finished successfully.\nassertApi('callInWindow').wasCalledWith('mParticle.logEvent',\
\ transformedData.eventName, transformedData.eventType, transformedData.attributes,\
\ transformedData.flags);"
___NOTES___
Created on 8/7/2023, 4:03:12 PM