-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
52 lines (43 loc) · 2.04 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
51
<!DOCTYPE html>
<html>
<head>
<script>
!function (t, e, n, s, a, c, i, o, p) {
t.AppsFlyerSdkObject = a, t.AF = t.AF || function () {
(t.AF.q = t.AF.q || []).push([Date.now()].concat(Array.prototype.slice.call(arguments)))
},
t.AF.id = t.AF.id || i, t.AF.plugins = {}, o = e.createElement(n), p = e.getElementsByTagName(n)[0], o.async = 1,
o.src = "https://websdk.appsflyer.com?" + (c.length > 0 ? "st=" + c.split(",").sort().join(",") + "&" : "") + (i.length > 0 ? "af_id=" + i : ""),
p.parentNode.insertBefore(o, p)
}(window, document, "script", 0, "AF", "pba", {pba: {webAppId: "3b0b15ad-125e-4786-b93d-003b13d6bf43"}})
</script>
<script>
window.onload = function () {
AF('pba', 'event', {eventType: 'IDENTIFY', customerId: 'paz'}),
AF('pba', 'event', {
eventType: 'EVENT',
eventCategory: 'conversion',
eventName: 'test1',
eventLabel: 'pba test'
}),
document.getElementById('my_btn').addEventListener('click', function () {
AF('pba', 'event', {eventType: 'EVENT', eventCategory: 'conversion', eventName: 'btn click'})
window.AF_SDK.PLUGINS.PBA.enableMeasurement()
}),
document.getElementById('disable').addEventListener('click', function () {
AF('pba', 'event', {eventType: 'EVENT', eventCategory: 'conversion', eventName: 'disable click'})
window.AF_SDK.PLUGINS.PBA.disableMeasurement()
})
}
</script>
<title>PBA TEST</title>
</head>
<body>
<h1>Paz Lavi</h1>
<h2>This page is for testing Appsflyer PBA SDK</h2>
<p>My first paragraph.</p>
<a href="https://support.appsflyer.com/hc/en-us/articles/360001610038-PBA-web-SDK-integration-guide">integration guide</a>
<button id="my_btn">PBA TEST</button>
<button id="disable">disable explicit control</button>
</body>
</html>