Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hotjar heatmap tracking #172

Merged
merged 1 commit into from
May 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"core-js": "^3.6.1",
"vue": "^2.6.10",
"vue-analytics": "^5.22.1",
"vue-hotjar": "^1.1.2",
"vue-i18n": "^8.15.3",
"vuex": "^3.1.2"
},
Expand Down
12 changes: 11 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import Vue from 'vue'
import Buefy from 'buefy'
import i18n from './i18n'
import VueAnalytics from 'vue-analytics'
import App from './App.vue'
import store from './store'
import './styles/vocab.scss'

// Analytics
import * as Sentry from '@sentry/browser'
import * as Integrations from '@sentry/integrations'
import Hotjar from 'vue-hotjar'
import VueAnalytics from 'vue-analytics'

import { library } from '@fortawesome/fontawesome-svg-core'
import { faCopy } from '@fortawesome/free-solid-svg-icons/faCopy'
Expand Down Expand Up @@ -51,6 +53,14 @@ Sentry.init({
]
})

// Production only since we only have a prod id
if (process.env.NODE_ENV === 'production') {
Vue.use(Hotjar, {
id: '1803702',
isProduction: true
})
}

new Vue({
store,
i18n,
Expand Down