-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.tpl
193 lines (169 loc) · 9.2 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
___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": "Immerss Tracking Order",
"categories": ["SALES"],
"brand": {
"id": "brand_dummy",
"displayName": "",
"thumbnail": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA9jSURBVHgB7d1dehNHFsbxU1Lm3rOCCHhyHWcFiBVgVoCYLABYAWYFkAVkrKwgzgoQK8C5ngBiBaO5JlLNOa2W8Yc+uqpbckvn/3seRyY0tJFdb52qru4K0gL3fo7fd2bSj1F6+stekPlr8ZuhfAX2UZSJ/tc+xvYaRS5mQS5CkPHnf4c/5Y4FuQO9QTzqiDzVk/fFPoIcCeDNPBxG0yDnoSOjz7+GL7JjOwuAK43+RM/aFwDXxSIMhrsMg60HQO9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Djs/CeyUDgMN3s/c2t5wFoFXAqAA7Ozd7f3AqAsgpgLgA4IMt6f7P0iUB6meClcEUAOBjLen+zNAD0isBYE+OtANh72pZPl/X+Jqz7g/cH8UMIciwA9pI98OfTWbi36vfXPhR0JvJEGAoA+2oSO9Jfd8DaACiHAqcCYO+sK/0XNj4W/NMw/MJ8ALBfrPFb2910XJCKHgziOz26LwDabvTxLDyqcmDljUH00uATTZULAdBa9qTfaSzm7iqpHAB2s1A5KTgWAK1jM/466XdS3NhXUdLWYDYpqOnyiEoAaBfr+W3Gf9Ok302V5wCu6g3iUVfkd+YEgFYYWdmf0vMvZAXAwv1BfBW4eQi4M3aFTmf7X0qmWrsD64lf6xfwQlgsBOzaxNpencZvalUACzok6HWDvLNPBcBWleP9k9Tx/jKNBMACQwJgqyZlyf9aGtJoAJiiGhB5pX/zQAA0I8r5rCsvmuj1r2o8ABYIAqARoxDl9V/DMJIt2FoALBAEQDIr9c91hv63bTX8ha0HwEI5UfhQPx3oR18A3DSyhm97dORc08+xswC46jIMgpzo2KYvbE0OnybaBkZxJqNdNvqr7iQAbvphEI/1Dejp5Y0fQ0eONRQsEHoyDwbCAftsvHiNQT+fyVgb3Zep9va2tF7u2P8B5RFIJFQzse4AAAAASUVORK5CYII\u003d"
},
"description": "Insert immerss tracking order code",
"containerContexts": [
"WEB"
]
}
___TEMPLATE_PARAMETERS___
[
{
"type": "TEXT",
"name": "appId",
"displayName": "Application ID",
"simpleValueType": true,
"valueValidators": [
{
"type": "REGEX",
"args": [
"^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$"
]
}
]
}
]
___SANDBOXED_JS_FOR_WEB_TEMPLATE___
const log = require('logToConsole');
const callInWindow = require('callInWindow');
const injectScript = require('injectScript');
const encodeUriComponent = require('encodeUriComponent');
const successHandler = function() {
log('ImmerssTrackingOrder: Success loaded.');
callInWindow('imrsTrackingOrderLoaded');
data.gtmOnSuccess();
};
const failureHandler = function() {
log('ImmerssTrackingOrder: Loaded with failure!');
data.gtmOnFailure();
};
const url = 'https://portal.immerss.live/vece/affiliate/v1/tracking/' + encodeUriComponent(data.appId) + '/order.js';
log('ImmerssTrackingOrder:buildedUrl', url);
injectScript(url, successHandler, failureHandler, url);
___WEB_PERMISSIONS___
[
{
"instance": {
"key": {
"publicId": "inject_script",
"versionId": "1"
},
"param": [
{
"key": "urls",
"value": {
"type": 2,
"listItem": [
{
"type": 1,
"string": "https://portal.immerss.live/"
}
]
}
}
]
},
"clientAnnotations": {
"isEditedByUser": true
},
"isRequired": true
},
{
"instance": {
"key": {
"publicId": "logging",
"versionId": "1"
},
"param": [
{
"key": "environments",
"value": {
"type": 1,
"string": "debug"
}
}
]
},
"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": "imrsTrackingOrderLoaded"
},
{
"type": 8,
"boolean": true
},
{
"type": 8,
"boolean": true
},
{
"type": 8,
"boolean": true
}
]
}
]
}
}
]
},
"clientAnnotations": {
"isEditedByUser": true
},
"isRequired": true
}
]
___TESTS___
scenarios: []
___NOTES___
Created on 28.06.2022, 15:39:20