-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.tpl
331 lines (287 loc) · 27 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
___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": "Lefty Conversion Pixel",
"categories": [
"AFFILIATE_MARKETING",
"CONVERSIONS"
],
"brand": {
"id": "brand_dummy",
"displayName": "Lefty",
"thumbnail": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAAXNSR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OEhAggggAACGgQIABpmmTEigAACCCCQIEAASADhIQIIIIAAAhoECAAaZpkxIoAAAgggkCBAAEgA4SECCCCAAAIaBAgAGmaZMSKAAAIIIJAgQABIAOEhAggggAACGgQIABpmmTEigAACCCCQIEAASADhIQIIIIAAAhoECAAaZpkxIoAAAgggkCBAAEgA4SECCCCAAAIaBAgAGmaZMSKAAAIIIJAgQABIAOEhAggggAACGgQIABpmmTEigAACCCCQIEAASADhIQIIIIAAAhoECAAaZpkxIoAAAgggkCBAAEgA4SECCCCAAAIaBAgAGmaZMSKAAAIIIJAgQABIAOEhAggggAACGgQIABpmmTEigAACCCCQIEAASADhIQIIIIAAAhoECAAaZpkxIoAAAgggkCBAAEgA4SECCCCAAAIaBAgAGmaZMSKAAAIIIJAgQABIAOEhAggggAACGgQIABpmmTEigAACCCCQIEAASADhIQIIIIAAAhoECAAaZpkxIoAAAgggkCBAAEgA4SECCCCAAAIaBAgAGmaZMSKAAAIIIJAgQABIAOEhAggggAACGgQIABpmmTEigAACCCCQIEAASADhIQIIIIAAAhoECAAaZpkxIoAAAgggkCBAAEgA4SECCCCAAAIaBAgAGmaZMSKAAAIIIJAgQABIAOEhAggggAACGgQIABpmmTEigAACCCCQIEAASADhIQIIIIAAAhoECAAaZpkxIoAAAgggkCBAAEgA4SECCCCAAAIaBAgAGmaZMSKAAAIIIJAgQABIAOEhAggggAACGgQIABpmmTEigAACCCCQIEAASADhIQIIIIAAAhoECAAaZpkxIoAAAgggkCBAAEgA4SECCCCAAAIaBAgAGmaZMSKAAAIIIJAgQABIAOEhAggggAACGgQIABpmmTEigAACCCCQIEAASADhIQIIIIAAAhoECAAaZpkxIoAAAgggkCBAAEgA4SECCCCAAAIaBAgAGmaZMSKAAAIIIJAgQABIAOEhAggggAACGgQIABpmmTEigAACCCCQIEAASADhIQIIIIAAAhoE/h8ZHV0Ps2h1ywAAAABJRU5ErkJggg\u003d\u003d"
},
"description": "Setup affiliation conversion tracking for Lefty",
"containerContexts": [
"WEB"
]
}
___TEMPLATE_PARAMETERS___
[]
___SANDBOXED_JS_FOR_WEB_TEMPLATE___
// Enter your template code here.
const log = require('logToConsole');
const sendPixel = require('sendPixel');
const encodeUri = require('encodeUri');
const copyFromDataLayer = require('copyFromDataLayer');
const getReferrerUrl = require('getReferrerUrl');
const queryPermission = require('queryPermission');
const conversionKey = 'lefty.conversion';
if (queryPermission('read_data_layer', conversionKey)) {
log('read_data_layer permission OK!');
const leftyConversion = copyFromDataLayer(conversionKey) || {};
const products = leftyConversion.products || [];
if (!leftyConversion.orderId) {
log("Order ID not found");
data.gtmOnFailure();
return;
}
if (!leftyConversion.amount) {
log("Order amount not found");
data.gtmOnFailure();
return;
}
if (!leftyConversion.currencyCode) {
log("Order currency not found");
data.gtmOnFailure();
return;
}
let uri = 'type=conversion';
uri += '&orderId=' + leftyConversion.orderId;
uri += '&amount=' + leftyConversion.amount;
uri += '¤cy=' + leftyConversion.currencyCode;
uri += '&ref=' + getReferrerUrl('host');
if (products.length !== 0) {
const pIds = products.map((item) => 'pId=' + item.id).join('&');
const pNames = products.map((item) =>'pName=' + item.name).join('&');
const itemQty = products.map((item) => 'itemQty=' + item.quantity).join('&');
const itemAmount = products.map((item) => 'itemAmount=' + item.amount).join('&');
uri += '&' + pIds;
uri += '&' + pNames;
uri += '&' + itemQty;
uri += '&' + itemAmount;
}
let url = 'https://a.lefty.io/track?' + encodeUri(uri);
sendPixel(url, data.gtmOnSuccess, data.gtmOnFailure);
} else {
log('read_data_layer permission KO!');
data.gtmOnFailure();
}
___WEB_PERMISSIONS___
[
{
"instance": {
"key": {
"publicId": "logging",
"versionId": "1"
},
"param": [
{
"key": "environments",
"value": {
"type": 1,
"string": "debug"
}
}
]
},
"clientAnnotations": {
"isEditedByUser": true
},
"isRequired": true
},
{
"instance": {
"key": {
"publicId": "send_pixel",
"versionId": "1"
},
"param": [
{
"key": "allowedUrls",
"value": {
"type": 1,
"string": "specific"
}
},
{
"key": "urls",
"value": {
"type": 2,
"listItem": [
{
"type": 1,
"string": "https://a.lefty.io/*"
}
]
}
}
]
},
"clientAnnotations": {
"isEditedByUser": true
},
"isRequired": true
},
{
"instance": {
"key": {
"publicId": "read_data_layer",
"versionId": "1"
},
"param": [
{
"key": "keyPatterns",
"value": {
"type": 2,
"listItem": [
{
"type": 1,
"string": "lefty.*"
}
]
}
}
]
},
"clientAnnotations": {
"isEditedByUser": true
},
"isRequired": true
},
{
"instance": {
"key": {
"publicId": "get_referrer",
"versionId": "1"
},
"param": [
{
"key": "urlParts",
"value": {
"type": 1,
"string": "any"
}
},
{
"key": "queriesAllowed",
"value": {
"type": 1,
"string": "any"
}
}
]
},
"clientAnnotations": {
"isEditedByUser": true
},
"isRequired": true
}
]
___TESTS___
scenarios:
- name: Trigger send pixel for 1 product
code: |-
mock("copyFromDataLayer", {
products: [
{
id: '1',
name: 'Test 1',
quantity: 1,
amount: 12
}
],
orderId: 1,
currencyCode: 'USD',
amount: 12
});
mock('sendPixel', function(url, onSuccess, onFailure) {
assertThat(url).isEqualTo("https://a.lefty.io/track?type=conversion&orderId=1&amount=12¤cy=USD&ref=https://test.com&pId=1&pName=Test%201&itemQty=1&itemAmount=12");
onSuccess();
});
runCode({});
assertApi('sendPixel').wasCalled();
assertApi('gtmOnSuccess').wasCalled();
- name: Trigger send pixel for multiple products
code: "mock(\"copyFromDataLayer\", {\n products: [\n {\n id: '1',\n \
\ name: 'Test 1',\n quantity: 1,\n amount: 10\n },\n {\n \
\ id: '2',\n name: 'Test 2',\n quantity: 2,\n amount: 30\n \
\ },\n {\n id: '3',\n name: 'Test 3',\n quantity: 1,\n \
\ amount: 5\n }\n ],\n orderId: 1,\n currencyCode: 'USD',\n amount: 45\n\
});\n\nmock('sendPixel', function(url, onSuccess, onFailure) {\n assertThat(url).isEqualTo(\"\
https://a.lefty.io/track?type=conversion&orderId=1&amount=45¤cy=USD&ref=https://test.com&pId=1&pId=2&pId=3&pName=Test%201&pName=Test%202&pName=Test%203&itemQty=1&itemQty=2&itemQty=1&itemAmount=10&itemAmount=30&itemAmount=5\"\
);\n \n onSuccess();\n});\n\nrunCode({});\n\nassertApi('sendPixel').wasCalled();\n\
assertApi('gtmOnSuccess').wasCalled();"
- name: Products list is optional
code: |-
mock("copyFromDataLayer", {
orderId: 1,
currencyCode: 'USD',
amount: 12
});
mock('sendPixel', function(url, onSuccess, onFailure) {
assertThat(url).isEqualTo("https://a.lefty.io/track?type=conversion&orderId=1&amount=12¤cy=USD&ref=https://test.com");
onSuccess();
});
runCode({});
assertApi('sendPixel').wasCalled();
assertApi('gtmOnSuccess').wasCalled();
- name: Order ID not found
code: |-
mock("copyFromDataLayer", {
products: [
{
id: '1',
name: 'Test 1',
quantity: 1,
amount: 12
}
],
currencyCode: 'USD',
amount: 12
});
runCode({});
assertApi('gtmOnFailure').wasCalled();
- name: Order currency not found
code: |-
mock("copyFromDataLayer", {
products: [
{
id: '1',
name: 'Test 1',
quantity: 1,
amount: 12
}
],
orderId: '1',
amount: 12
});
runCode({});
assertApi('gtmOnFailure').wasCalled();
- name: Order amount not found
code: |-
mock("copyFromDataLayer", {
products: [
{
id: '1',
name: 'Test 1',
quantity: 1,
amount: 12
}
],
orderId: '1',
currencyCode: 'USD',
});
runCode({});
assertApi('gtmOnFailure').wasCalled();
setup: mock('getReferrerUrl', "https://test.com");
___NOTES___
Created on 10/29/2021, 10:39:42 AM