-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsniffer.js
More file actions
28 lines (26 loc) · 947 Bytes
/
sniffer.js
File metadata and controls
28 lines (26 loc) · 947 Bytes
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
// results here https://docs.google.com/spreadsheets/d/1ZjqsUNV_uY64eau-UjflLw2JoM-Bcv3uvTR_zqrJpwU/edit?usp=sharing
var dataLayer = dataLayer || [];
$(document).ajaxSuccess(function (event, jqXHR, ajaxOptions, data) {
dataLayer.push({
event: event.type,
request: {
method: ajaxOptions.type,
url: ajaxOptions.url,
data: ajaxOptions.data,
contentType: ajaxOptions.contentType
},
response: {
url: jqXHR.responseURL,
status: jqXHR.status,
statusText: jqXHR.statusText,
data: jqXHR.response
}
});
var l = 'https://script.google.com/macros/s/AKfycbxwLu2i2Vb5IllKrwrW6FpSsdCR3RXaJ3M1m4a4m9WWT46M7lc/exec?' +
'event=' + event.type +
'&reqmethod=' + ajaxOptions.type +
'&requrl=' + ajaxOptions.url +
'&respstatus=' + jqXHR.status;
img = new Image();
img.src = l
});