Răsfoiți Sursa

hotjar on hosted

Justin Rhee 3 ani în urmă
părinte
comite
858d25f9d0
2 a modificat fișierele cu 12 adăugiri și 0 ștergeri
  1. 11 0
      dashboard/src/hosted.index.html
  2. 1 0
      dashboard/webpack.config.js

+ 11 - 0
dashboard/src/hosted.index.html

@@ -10,6 +10,17 @@
       };
     </script>
 
+    <script>
+      (function(h,o,t,j,a,r){
+          h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
+          h._hjSettings={hjid:"<%= htmlWebpackPlugin.options.hotjarId %>",hjsv:6};
+          a=o.getElementsByTagName('head')[0];
+          r=o.createElement('script');r.async=1;
+          r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
+          a.appendChild(r);
+      })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
+    </script>
+
     <script>
       // We pre-filled your app ID in the widget URL: 'https://widget.intercom.io/widget/gq56g49i'
       (function () {

+ 1 - 0
dashboard/webpack.config.js

@@ -45,6 +45,7 @@ module.exports = () => {
     htmlPluginOpts = {
       template: path.resolve(__dirname, "src", "hosted.index.html"),
       intercomAppId: `${env.INTERCOM_APP_ID}`,
+      hotjarId: `${env.HOTJAR_ID}`,
       intercomSrc: `${process.env.INTERCOM_SRC}`,
       segmentWriteKey: `${process.env.SEGMENT_WRITE_KEY}`,
       segmentKey: `${process.env.SEGMENT_PUBLIC_KEY}`,