Skip to content

Commit f11d953

Browse files
authored
Merge pull request #172 from creativecommons/add_hotjar
Add hotjar heatmap tracking
2 parents ec992d7 + 7a4b465 commit f11d953

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

package-lock.json

Lines changed: 8 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"core-js": "^3.6.1",
3434
"vue": "^2.6.10",
3535
"vue-analytics": "^5.22.1",
36+
"vue-hotjar": "^1.1.2",
3637
"vue-i18n": "^8.15.3",
3738
"vuex": "^3.1.2"
3839
},

src/main.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import Vue from 'vue'
22
import Buefy from 'buefy'
33
import i18n from './i18n'
4-
import VueAnalytics from 'vue-analytics'
54
import App from './App.vue'
65
import store from './store'
76
import './styles/vocab.scss'
87

8+
// Analytics
99
import * as Sentry from '@sentry/browser'
1010
import * as Integrations from '@sentry/integrations'
11+
import Hotjar from 'vue-hotjar'
12+
import VueAnalytics from 'vue-analytics'
1113

1214
import { library } from '@fortawesome/fontawesome-svg-core'
1315
import { faCopy } from '@fortawesome/free-solid-svg-icons/faCopy'
@@ -51,6 +53,14 @@ Sentry.init({
5153
]
5254
})
5355

56+
// Production only since we only have a prod id
57+
if (process.env.NODE_ENV === 'production') {
58+
Vue.use(Hotjar, {
59+
id: '1803702',
60+
isProduction: true
61+
})
62+
}
63+
5464
new Vue({
5565
store,
5666
i18n,

0 commit comments

Comments
 (0)