fix pageview args #2415
1 changed files with 3 additions and 2 deletions
|
@ -15,7 +15,7 @@ let analyticsEnabled: boolean = true;
|
||||||
const analytics: Analytics = {
|
const analytics: Analytics = {
|
||||||
pageView: path => {
|
pageView: path => {
|
||||||
if (analyticsEnabled) {
|
if (analyticsEnabled) {
|
||||||
ReactGA.pageview(path, IS_WEB ? 'web' : 'desktop');
|
ReactGA.pageview(path, IS_WEB ? ['web'] : ['desktop']);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setUser: user => {
|
setUser: user => {
|
||||||
|
@ -72,10 +72,11 @@ const analytics: Analytics = {
|
||||||
|
|
||||||
// Initialize google analytics
|
// Initialize google analytics
|
||||||
// Set `debug: true` for debug info
|
// Set `debug: true` for debug info
|
||||||
|
// Currently doesn't actually differentiate between web/desktop
|
||||||
ReactGA.initialize('UA-60403362-12', {
|
ReactGA.initialize('UA-60403362-12', {
|
||||||
gaOptions: { name: IS_WEB ? 'web' : 'desktop' },
|
gaOptions: { name: IS_WEB ? 'web' : 'desktop' },
|
||||||
testMode: process.env.NODE_ENV !== 'production',
|
testMode: process.env.NODE_ENV !== 'production',
|
||||||
debug: true,
|
// debug: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Manually call the first page view
|
// Manually call the first page view
|
||||||
|
|
Loading…
Reference in a new issue