check googleTrackingId before initializing
This commit is contained in:
parent
04ede6621c
commit
3ff70c4f9d
5 changed files with 13 additions and 58886 deletions
10993
index.js
10993
index.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
47898
public/bundle/bundle.js
47898
public/bundle/bundle.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -16,7 +16,9 @@ class GAListener extends React.Component {
|
|||
render () {
|
||||
// initiate analytics
|
||||
const { googleAnalyticsId } = this.props;
|
||||
GoogleAnalytics.initialize(googleAnalyticsId);
|
||||
if (googleAnalyticsId) {
|
||||
GoogleAnalytics.initialize(googleAnalyticsId);
|
||||
}
|
||||
// return children
|
||||
return this.props.children;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue