-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.tpl
More file actions
141 lines (115 loc) · 3.92 KB
/
Copy pathtemplate.tpl
File metadata and controls
141 lines (115 loc) · 3.92 KB
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
___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.1,
"securityGroups": [],
"displayName": "CrowdHandler Javascript Template",
"categories": ["SALES"],
"brand": {
"id": "brand_dummy",
"displayName": "Javascript Include",
"thumbnail": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAbAAAAGwAFXKpbWAAADWElEQVRYhdWZT0hUQRzHvy2LIKiFXgoXdEGDNFE75B7CNtBAO0gpVBREbtap1UPQTRZvUQd3O2Wtp6A6WHhIoYSe0WHpULv98WKwCiueFHWFoIvxG+e93ps3b923+3xuX1jYN/Nm5rO/mfn9fjN7aGdnB3blD8frAQT5pw1Aq0UXKQBJAAp90rHQkt2xbAH6w3ECGgHQZ/tX7WoawHg6FlIcBeRgEQBnCwQTNU/95QOaE9Afjh/hYMMOgYmKctAN24AcTsmxvpwSrdOgFaTHAo4W/pILcOBjLPExTTJZkFuO4A67AKfXJoB60ZIGC+qm1W048DEVzqBJnOKIS9NqpVbOoEmbYu5KPhwgnF7nVBekt2Bkz2buSWNhFtzLelXlZQg0HkNTbY2hPPFrFYnFVUMZvWd4R6hX5auugK+mUnvOrGWRWd82WdHLH0aswAaDJzEYbEZleZmpfhjtWFnfxtjrBN59W2ZlL+72Gt7xh+NSwIGO4xjuadeeo7NfMT77Rf8KMSkeHvhNsZWs9TJ8gXUig1NVW12BJ7e6MNDRaPlOgeojNi/PSAwiy00MdbHBRWV//2Elemgq2+LlDisoBRztD5jg3n9fxr3nHzUQWkMTQ93sO5UvrKztG6AhxNDA/aeN0yVZH2xBX4m9Zd/3yXqkNq/omMVdSJtgUvkhbZ0PmNifKl+NeflI1OoVy0RXQruzGAuJu9quTNlMk88ImFnPFjVAsZKmW6Uk0xQvZNbQ0XDU0qJ2dfXxjLQF+U1xM8pkBhTcxfmWOuYXC12HVqEu0CDfPKI8POW27JAc8qPrndLGZIXRS4GCwPNUysPPrZrIv019XjQ0726pw8z9i8xlkDVpp4/0nMLDa524GWxmdVU5wmERSnp5Bn1D38fYVIJNgT6anKittnQZVPcpchlnIq+cBlQ8HNAgWm+3n84xJ52vJpWf+xFRFA+/jpgWa2iz9D54w8JcNsfAVHfn2ZwpFDqgaWIrKmGlH6HmgaqcTlj1ZxLFwauNYjWfjoVYllXyZxINkJ+iogeG9E9R/aWS7FycsmjohlKW52JVJX31gd2p3uDHgE2X4aQ3XNJ0Kx0LUfird2m6U9xySVnlgV9gpmMh6Zlc1f99BSyqZC/RJaDu/A0B4C8q6HFpoftk2wAAAABJRU5ErkJggg\u003d\u003d"
},
"description": "During periods of heavy traffic, let our queue management solution help safeguard your website from crashing, look after your customers and protect your sales.",
"containerContexts": [
"WEB"
]
}
___TEMPLATE_PARAMETERS___
[
{
"type": "TEXT",
"name": "apikey",
"displayName": "Public API Key",
"simpleValueType": true,
"help": "Enter your public API key here. Be sure to copy it exactly.",
"valueValidators": [
{
"type": "NON_EMPTY"
},
{
"type": "STRING_LENGTH",
"args": [
64,
64
]
}
]
}
]
___SANDBOXED_JS_FOR_WEB_TEMPLATE___
// Enter your template code here.
const log = require('logToConsole');
const injectScript = require('injectScript');
const queryPermission = require('queryPermission');
const encodeUriComponent = require('encodeUriComponent');
const apikey=data.apikey;
const url = 'https://wait.crowdhandler.com/js/latest/lite-validator/main.js?id='+encodeUriComponent(apikey);
const onSuccess = () => {
data.gtmOnSuccess();
};
const onFailure = () => {
data.gtmOnFailure();
};
if (queryPermission('inject_script', url)) {
injectScript(url, onSuccess, onFailure);
} else {
data.gtmOnFailure();
}
___WEB_PERMISSIONS___
[
{
"instance": {
"key": {
"publicId": "logging",
"versionId": "1"
},
"param": [
{
"key": "environments",
"value": {
"type": 1,
"string": "debug"
}
}
]
},
"isRequired": true
},
{
"instance": {
"key": {
"publicId": "inject_script",
"versionId": "1"
},
"param": [
{
"key": "urls",
"value": {
"type": 2,
"listItem": [
{
"type": 1,
"string": "https://wait.crowdhandler.com/"
}
]
}
}
]
},
"clientAnnotations": {
"isEditedByUser": true
},
"isRequired": true
}
]
___TESTS___
scenarios: []
___NOTES___
Created on 19/11/2020, 14:56:53