-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathdemo.html
160 lines (143 loc) · 4.6 KB
/
demo.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
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<!doctype html>
<html lang=en>
<head>
<meta charset=UTF-8>
<title>Adjust WebSDK</title>
<script type="text/javascript">
!function(t,a,e,r,s,l,d,n,o){t.Adjust=t.Adjust||{},t.Adjust_q=t.Adjust_q||[];for(var c=0;c<l.length;c++)d(t.Adjust,t.Adjust_q,l[c]);n=a.createElement("script"),o=a.getElementsByTagName("script")[0],n.async=!0,n.src="https://cdn.adjust.com/adjust-latest.min.js",n.onload=function(){for(var a=0;a<t.Adjust_q.length;a++)t.Adjust[t.Adjust_q[a][0]].apply(t.Adjust,t.Adjust_q[a][1]);t.Adjust_q=[]},o.parentNode.insertBefore(n,o)}(window,document,0,0,0,["initSdk","trackEvent","addGlobalCallbackParameters","addGlobalPartnerParameters","removeGlobalCallbackParameter","removeGlobalPartnerParameter","clearGlobalCallbackParameters","clearGlobalPartnerParameters","switchToOfflineMode","switchBackToOnlineMode","stop","restart","gdprForgetMe","disableThirdPartySharing"],function(t,a,e){t[e]=function(){a.push([e,arguments])}});
</script>
</head>
<body>
<pre id="output" style="width: 100vw; height: 100vh;"></pre>
<script type="text/javascript">
/**
* initSdk: initiate adjust sdk instance, do it only once per page load
*/
Adjust.initSdk({
appToken: 'YOUR_APP_TOKEN', // required
environment: 'production', // required, 'production' or 'sandbox' in case you are testing SDK locally with your web app
attributionCallback: function (e, attribution) { // optional
// define your attribution callback function
},
logLevel: 'verbose', // optional, default is 'error', other options are 'none', 'error', 'warning', 'info', 'verbose'
logOutput: '#output', // optional, outputs logs from sdk into provided container
// defaultTracker: 'YOUR_DEFAULT_TRACKER_TOKEN', // optional
// externalDeviceId: 'YOUR_EXTERNAL_DEVICE_ID', // optional
// customUrl: 'YOUR_CUSTOM_URL', // optional
// eventDeduplicationListLimit: 'YOUR_EVENT_DEDUPLICATION_LIST_LIMIT' // optional, default set to 10
// namespace: 'YOUR_CUSTOM_STORAGE_NAMESPACE' // optional, namespace for sdk data storage
});
/**
* trackEvent: track standard event, requires sdk instance to be initiated
*/
/*
Adjust.trackEvent({
eventToken: 'YOUR_EVENT_TOKEN',
// deduplicationId: 'YOUR_EVENT_DEDUPLICATION_ID' // optional
});
*/
/**
* trackEvent: track revenue event, requires sdk instance to be initiated
*/
/*
Adjust.trackEvent({
eventToken: 'YOUR_EVENT_TOKEN',
// deduplicationId: 'YOUR_EVENT_DEDUPLICATION_ID' // optional
revenue: 111,
currency: 'EUR',
callbackParams: [
{key: 'some-key-1', value: 'some-value-1'},
{key: 'some-key-2', value: 'some-value-2'},
{key: 'key1', value: 'new-value1'}
],
partnerParams: [
{key: 'key-1', value: 'new-value-1'},
{key: 'some-partner-key-1', value: 'some-partner-value-1'},
{key: 'key-2', value: 'new-value-2'},
{key: 'some-partner-key-2', value: 'some-partner-value-2'},
{key: 'some-partner-key-1', value: 'some-partner-value-3'}
]
});
*/
/**
* addGlobalCallbackParameters: add global callback parameters
*/
/*
Adjust.addGlobalCallbackParameters([
{key: 'key1', value: 'value1'},
{key: 'key2', value: 'value2'}
]);
*/
/**
* addGlobalPartnerParameters: add global partner parameters
*/
/*
Adjust.addGlobalPartnerParameters([
{key: 'key-1', value: 'value-1'},
{key: 'key-2', value: 'value-2'},
{key: 'key-3', value: 'value-3'}
]);
*/
/**
* removeGlobalCallbackParameter: remove global callback parameter per key
*/
/*
Adjust.removeGlobalCallbackParameter('key1');
*/
/**
* removeGlobalPartnerParameter: remove global partner parameters
*/
/*
Adjust.removeGlobalPartnerParameter('key-1');
*/
/**
* clearGlobalCallbackParameters: clears all global callback parameters
*/
/*
Adjust.clearGlobalCallbackParameters();
*/
/**
* clearGlobalPartnerParameters: clear all global partner parameters
*/
/*
Adjust.clearGlobalPartnerParameters();
*/
/**
* switchToOfflineMode: go to offline mode
*/
/*
Adjust.switchToOfflineMode();
*/
/**
* switchBackToOnlineMode: go back to online mode after went to offline mode by previous switchToOfflineMode method
*/
/*
Adjust.switchBackToOnlineMode();
*/
/**
* stop: stop the sdk
*/
/*
Adjust.stop();
*/
/**
* restart: restart the sdk
*/
/*
Adjust.restart();
*/
/**
* gdprForgetMe: initiate GDPR forget me request
*/
/*
Adjust.gdprForgetMe();
*/
/**
* disableThirdPartySharing: initiate marketing opt-out request
*/
/*
Adjust.disableThirdPartySharing();
*/
</script>
</body>
</html>