-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
94 lines (93 loc) · 2.94 KB
/
test.html
File metadata and controls
94 lines (93 loc) · 2.94 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
<!DOCTYPE html>
<html>
<head>
<title>Action widget</title>
</head>
<body>
<h1>Action widget example</h1>
<script src="../dist/pathfora.min.js"></script>
<!-- Start Lytics Tracking Tag Version 3 -->
<script type="text/javascript">
!(function () {
'use strict';
var o = window.jstag || (window.jstag = {}),
r = [];
function n(e) {
o[e] = function () {
for (var n = arguments.length, t = new Array(n), i = 0; i < n; i++)
t[i] = arguments[i];
r.push([e, t]);
};
}
n('send'),
n('mock'),
n('identify'),
n('pageView'),
n('entityReady'),
n('unblock'),
n('getid'),
n('setid'),
n('loadEntity'),
n('getEntity'),
n('on'),
n('once'),
n('call'),
(o.loadScript = function (n, t, i) {
var e = document.createElement('script');
(e.async = !0), (e.src = n), (e.onload = t), (e.onerror = i);
var o = document.getElementsByTagName('script')[0],
r = (o && o.parentNode) || document.head || document.body,
c = o || r.lastChild;
return null != c ? r.insertBefore(e, c) : r.appendChild(e), this;
}),
(o.init = function n(t) {
return (
(this.config = t),
this.loadScript(t.src, function () {
if (o.init === n) throw new Error('Load error!');
o.init(o.config),
(function () {
for (var n = 0; n < r.length; n++) {
var t = r[n][0],
i = r[n][1];
o[t].apply(o, i);
}
r = void 0;
})();
}),
this
);
});
})();
// Define config and initialize Lytics tracking tag.
// - The setup below will disable the automatic sending of Page Analysis Information (to prevent duplicative sends, as this same information will be included in the jstag.pageView() call below, by default)
jstag.init({
src: 'https://c.lytics.io/api/tag/ea48c631489b0c19dd62ee5b40acca4b/latest.min.js',
stream: 'pathfora',
pageAnalysis: {
dataLayerPull: {
disabled: true,
},
},
pathfora: {
publish: {
disabled: true,
}
}
});
// You may need to send a page view, depending on your use-case
jstag.pageView();
</script>
<script>
var modal = new pathfora.Form({
id: 'modal1',
layout: 'gate',
msg: 'Welcome to our website',
image: 'https://lytics.github.io/pathforadocs/assets/lion.jpg',
headline: 'Headline',
okShow: true,
});
window.pathfora.initializeWidgets([modal]);
</script>
</body>
</html>