-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
50 lines (42 loc) · 1.51 KB
/
index.html
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
<html>
<head>
<meta charset="UTF-8"/>
<title>Test</title>
<script>
// snippet for all sites to use below; modify stringer.init as appropriate
(function(window, document) {
var stringer = window.stringer = window.stringer || [],
methods = ["init", "track", "identify", "clear", "getBrowserId"];
if (stringer.snippetRan || stringer.loaded) { return; }
stringer.snippetRan = true;
function stub(method) {
return function() {
var args = Array.prototype.slice.call(arguments);
args.unshift(method);
stringer.push(args);
return window.stringer;
};
}
for (var i = 0; i < methods.length; i++) {
var k = methods[i];
stringer[k] = stub(k);
}
var script = document.createElement('script');
script.type = 'text/javascript';
script.async = true;
script.src = "stringer.js";
var first = document.getElementsByTagName('script')[0];
first.parentNode.insertBefore(script, first);
stringer.init({debug: true,
environment: "acceptance",
sourceSite: "storefront"});
})(window, document);
</script>
<script>
window.stringer.track('blah', {"hello": true});
window.stringer.track(undefined, {"hello": true});
</script>
</head>
<body>
</body>
</html>