mirror of
https://github.com/ipfs/ipfs-blog.git
synced 2026-03-28 17:32:37 +01:00
Revert "fix: disable countly in dev mode"
This reverts commit 55b1baff03.
This commit is contained in:
@@ -27,7 +27,7 @@ export default ({ Vue, router, siteData, isServer }) => {
|
||||
return originalPush.call(this, location)
|
||||
}
|
||||
|
||||
if (!isServer && process.env.NODE_ENV === 'production') {
|
||||
if (!isServer) {
|
||||
// track page view via Countly when route changes
|
||||
router.afterEach((to) => {
|
||||
if (!window.Countly) return
|
||||
|
||||
@@ -44,17 +44,15 @@ export function loadScript() {
|
||||
Track an event to countly with the provided data
|
||||
*/
|
||||
export function trackEvent(event, data = {}) {
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
window.Countly.q.push([
|
||||
'add_event',
|
||||
{
|
||||
key: event,
|
||||
segmentation: data,
|
||||
},
|
||||
])
|
||||
} else {
|
||||
console.info('[countly]', 'trackEvent()', event, data)
|
||||
}
|
||||
// console.info('[countly]', 'trackEvent()', event, data)
|
||||
|
||||
window.Countly.q.push([
|
||||
'add_event',
|
||||
{
|
||||
key: event,
|
||||
segmentation: data,
|
||||
},
|
||||
])
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user