diff options
author | Fabio Berger <me@fabioberger.com> | 2019-02-06 05:34:29 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2019-02-06 05:34:29 +0800 |
commit | 8de955f3d891620c90c668b4ac0b046e772d4da8 (patch) | |
tree | 9e98bcbfa9a7aeffa01820bc01e9be16b9b4abab | |
parent | 69c7c03fb34b3f21f65c40b73baa21184a296fb2 (diff) | |
download | dexon-0x-contracts-8de955f3d891620c90c668b4ac0b046e772d4da8.tar.gz dexon-0x-contracts-8de955f3d891620c90c668b4ac0b046e772d4da8.tar.zst dexon-0x-contracts-8de955f3d891620c90c668b4ac0b046e772d4da8.zip |
Add Heap and Google analytics to Dev Tools Pages
-rw-r--r-- | packages/dev-tools-pages/assets/index.html | 76 | ||||
-rw-r--r-- | packages/dev-tools-pages/pages.js | 8 |
2 files changed, 72 insertions, 12 deletions
diff --git a/packages/dev-tools-pages/assets/index.html b/packages/dev-tools-pages/assets/index.html index 5ab1a45f1..73797b958 100644 --- a/packages/dev-tools-pages/assets/index.html +++ b/packages/dev-tools-pages/assets/index.html @@ -1,14 +1,66 @@ <!DOCTYPE html> <html lang="en"> -<head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <meta http-equiv="X-UA-Compatible" content="ie=edge"> - <link rel="preload" href="/fonts/MaisonNeue-Book-subset.woff2" as="font" type="font/woff2" crossorigin> - <link rel="preload" href="/fonts/MaisonNeue-Bold-subset.woff2" as="font" type="font/woff2" crossorigin> - <title><%= htmlWebpackPlugin.options.title %></title> -</head> -<body> - <div id="app"></div> -</body> -</html>
\ No newline at end of file + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta http-equiv="X-UA-Compatible" content="ie=edge" /> + <link rel="preload" href="/fonts/MaisonNeue-Book-subset.woff2" as="font" type="font/woff2" crossorigin /> + <link rel="preload" href="/fonts/MaisonNeue-Bold-subset.woff2" as="font" type="font/woff2" crossorigin /> + <title><%= htmlWebpackPlugin.options.title %></title> + </head> + <body> + <!-- Heap SDK --> + <script type="text/javascript"> + (window.heap = window.heap || []), + (heap.load = function(e, t) { + (window.heap.appid = e), (window.heap.config = t = t || {}); + var r = t.forceSSL || 'https:' === document.location.protocol, + a = document.createElement('script'); + (a.type = 'text/javascript'), + (a.async = !0), + (a.src = (r ? 'https:' : 'http:') + '//cdn.heapanalytics.com/js/heap-' + e + '.js'); + var n = document.getElementsByTagName('script')[0]; + n.parentNode.insertBefore(a, n); + for ( + var o = function(e) { + return function() { + heap.push([e].concat(Array.prototype.slice.call(arguments, 0))); + }; + }, + p = [ + 'addEventProperties', + 'addUserProperties', + 'clearEventProperties', + 'identify', + 'resetIdentity', + 'removeEventProperty', + 'setEventProperties', + 'track', + 'unsetEventProperty', + ], + c = 0; + c < p.length; + c++ + ) + heap[p[c]] = o(p[c]); + }); + heap.load('<%= htmlWebpackPlugin.options.heapAnalyticsId %>'); + </script> + <!-- Global site tag (gtag.js) - Google Analytics --> + <script + async + src="https://www.googletagmanager.com/gtag/js?id=<%= htmlWebpackPlugin.options.googleAnalyticsId %>" + ></script> + <script> + window.dataLayer = window.dataLayer || []; + function gtag() { + dataLayer.push(arguments); + } + gtag('js', new Date()); + + gtag('config', '<%= htmlWebpackPlugin.options.googleAnalyticsId %>'); + </script> + <!-- End Google Analytics --> + <div id="app"></div> + </body> +</html> diff --git a/packages/dev-tools-pages/pages.js b/packages/dev-tools-pages/pages.js index 488c2ecd7..62a022603 100644 --- a/packages/dev-tools-pages/pages.js +++ b/packages/dev-tools-pages/pages.js @@ -15,6 +15,8 @@ const pages = [ 'twitter:site': '@0xproject', 'twitter:image': '/images/og-compiler.png', }, + googleAnalyticsId: 'UA-98720122-4', + heapAnalyticsId: '3772819976', }, { title: 'sol-coverage', @@ -32,6 +34,8 @@ const pages = [ 'twitter:site': '@0xproject', 'twitter:image': '/images/og-cov.png', }, + googleAnalyticsId: 'UA-98720122-3', + heapAnalyticsId: '3386971671', }, { title: 'sol-profiler', @@ -49,6 +53,8 @@ const pages = [ 'twitter:site': '@0xproject', 'twitter:image': '/images/og-profiler.png', }, + googleAnalyticsId: 'UA-98720122-5', + heapAnalyticsId: '3776009943', }, { title: 'sol-trace', @@ -66,6 +72,8 @@ const pages = [ 'twitter:site': '@0xproject', 'twitter:image': '/images/og-trace.png', }, + googleAnalyticsId: 'UA-98720122-6', + heapAnalyticsId: '4172106583', }, ]; |