-
Notifications
You must be signed in to change notification settings - Fork 0
/
second.html
155 lines (147 loc) · 4.76 KB
/
second.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
<!DOCTYPE html>
<html lang="en">
<head>
<script>
rudderanalytics = window.rudderanalytics = [];
var methods = [
"load",
"page",
"track",
"identify",
"alias",
"group",
"ready",
"reset",
];
for (var i = 0; i < methods.length; i++) {
var method = methods[i];
rudderanalytics[method] = (function (methodName) {
return function () {
rudderanalytics.push(
[methodName].concat(Array.prototype.slice.call(arguments))
);
};
})(method);
}
//Local
rudderanalytics.load(
"1lp4zr8kEIx1s0CmuFi8a4Pu2Ui",
"https://rudderstacwihaveabesal.dataplane.rudderstack.com",
{
logLevel: "DEBUG",
// configUrl: "http://api.rudderstack.com",
// destSDKBaseURL: "http://127.0.0.1:5500/dist/legacy/js-integrations/",
}
);
// Prod
// rudderanalytics.load(
// "2IXTsZ9JnWzatwVGhvrQ8P4HDxb",
// "https://rudderstacmz.dataplane.rudderstack.com",
// {
// logLevel: "DEBUG",
// }
// );
</script>
<title>Testing Rudder-BingAds Integration</title>
</head>
<!-- localhost -->
<!-- <script src="http://127.0.0.1:5500/dist/rudder-analytics.js"></script> -->
<!-- v1.1 localhost -->
<!-- <script src="http://127.0.0.1:5500/dist/legacy/rudder-analytics.min.js"></script> -->
<!-- v1-staging -->
<!-- <script src="https://cdn.rudderlabs.com/v1/staging/rudder-analytics-staging.min.js"></script> -->
<!-- v1.1 staging -->
<!-- <script src="https://cdn.rudderlabs.com/staging/latest/rudder-analytics-staging.min.js"></script> -->
<!-- Bugbash staging -->
<script src="https://cdn.rudderlabs.com/v1.1/staging/rudder-analytics-staging.min.js"></script> -->
<!-- v1 prod -->
<!-- <script src="https://cdn.rudderlabs.com/v1/rudder-analytic s.min.js"></script> -->
<!-- v1.1 prod -->
<!-- <script src="https://cdn.rudderlabs.com/v1.1/rudder-analytics.min.js"></script> -->
<body>
<h1>Testing Rudder-FS Device Mode Integration</h1>
<button onclick="identify()">Identify</button>
<button onclick="page()">Page</button>
<button onclick="fireChrome()">Fire from chrome</button>
<button onclick="fireYeti()">Fire from yeti</button>
<script>
function identify() {
rudderanalytics.identify("userId123", {
email: "[email protected]",
firstName: "John 1",
});
}
</script>
<script>
function page() {
rudderanalytics.page("Last Page", {
url: "https://www.google.com/gmail/",
});
}
</script>
<script>
function fireChrome() {
rudderanalytics.track('v1-chrome', {
checkout_id: 'what is checkout id here??',
//event_id: 'eventIDTest',
order_id: "transactionId",
pagetype: 'home',
value: 31.98,
//revenue: 31.98,
shipping: 4.00,
coupon: 'APPARELSALE',
currency: 'GBP',
products: [
{
product_id: 'abc',
category: 'Merch',
name: 'Food/Drink',
brand: '',
variant: 'Extra topped',
price: 3.00,
quantity: 2,
currency: 'GBP',
position: 1,
value: 6.00,
typeOfProduct: 'Food',
url: 'https://www.example.com/product/bacon-jam',
image_url: 'https://www.example.com/product/bacon-jam.jpg'
}
]
});
}
</script>
<script>
function fireYeti() {
rudderanalytics.track('v1-yeti', {
checkout_id: 'what is checkout id here??',
//event_id: 'eventIDTest',
order_id: "transactionId",
value: 31.98,
//revenue: 31.98,
shipping: 4.00,
coupon: 'APPARELSALE',
currency: 'GBP',
pagetype: 'home',
products: [
{
product_id: 'abc',
category: 'Merch',
name: 'Food/Drink',
brand: '',
variant: 'Extra topped',
price: 3.00,
quantity: 2,
currency: 'GBP',
position: 1,
value: 6.00,
typeOfProduct: 'Food',
url: 'https://www.example.com/product/bacon-jam',
image_url: 'https://www.example.com/product/bacon-jam.jpg'
}
]
});
}
</script>
</body>
</html>