-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
38 lines (33 loc) · 1.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Dittofeed Library Test</title>
</head>
<body>
<h1>Dittofeed Library Test</h1>
<script type="text/javascript">
var _df = _df || [];
(function () {
var methods = ["track", "identify", "page", "flush"];
methods.forEach(function (method) {
_df[method] = function () {
_df.push([method].concat(Array.prototype.slice.call(arguments)));
};
});
var script = document.createElement("script");
script.type = "module";
script.async = true;
script.src = "http://localhost:5173/src/snippetEntry.js"; // URL where Vite serves your file
script.id = "df-tracker";
script.setAttribute("data-write-key", "Basic my-write-key");
script.setAttribute("data-host", "http://localhost:3001");
document.head.appendChild(script);
})();
_df.identify({
userId: "123",
email: "test@email.com"
});
</script>
</body>
</html>