Skip to content

Commit ddf967b

Browse files
author
Ives van Hoorne
committed
Add Twitter analytics
1 parent 1e08bdb commit ddf967b

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

src/app/index.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<meta property="twitter:card" content="summary_large_image">
1515
<meta property="twitter:site" content="@Ives13">
1616
<meta property="twitter:creator" content='@Ives13'>
17-
<meta property="twitter:title" content="CodeSandbox">
17+
<meta property="twitter:title" content="CodeSandbox - Editor">
1818
<meta property="twitter:description" content="An online React editor with a focus on creating, sharing and importing">
1919
<meta property="twitter:image:src" content="https://codesandbox.io/static/img/banner.png">
2020
<meta property="twitter:image:width" content="1200">
@@ -34,6 +34,18 @@
3434
ga('create', 'UA-89432508-1', 'auto');
3535
ga('send', 'pageview');
3636
</script>
37+
<script>
38+
!function (e, t, n, s, u, a) {
39+
e.twq || (s = e.twq = function () {
40+
s.exe ? s.exe.apply(s, arguments) : s.queue.push(arguments);
41+
}, s.version = '1.1', s.queue = [], u = t.createElement(n), u.async = !0, u.src = '//static.ads-twitter.com/uwt.js',
42+
a = t.getElementsByTagName(n)[0], a.parentNode.insertBefore(u, a))
43+
}(window, document, 'script');
44+
// Insert Twitter Pixel ID and Standard Event data below
45+
twq('init', 'nx5o6');
46+
twq('track', 'PageView');
47+
48+
</script>
3749
<script src="https://cdn.ravenjs.com/3.14.0/raven.min.js" crossorigin="anonymous"></script>
3850
</head>
3951

src/homepage/index.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@
3939
ga('create', 'UA-89432508-1', 'auto');
4040
ga('send', 'pageview');
4141
</script>
42+
<script>
43+
!function (e, t, n, s, u, a) {
44+
e.twq || (s = e.twq = function () {
45+
s.exe ? s.exe.apply(s, arguments) : s.queue.push(arguments);
46+
}, s.version = '1.1', s.queue = [], u = t.createElement(n), u.async = !0, u.src = '//static.ads-twitter.com/uwt.js',
47+
a = t.getElementsByTagName(n)[0], a.parentNode.insertBefore(u, a))
48+
}(window, document, 'script');
49+
// Insert Twitter Pixel ID and Standard Event data below
50+
twq('init', 'nx5o6');
51+
twq('track', 'PageView');
52+
</script>
4253
<script src="static/js/smooth-scroll.min.js"></script>
4354
</head>
4455

@@ -145,4 +156,4 @@ <h3>Example Projects</h3>
145156
</script>
146157
</body>
147158

148-
</html>
159+
</html>

0 commit comments

Comments
 (0)