check googleTrackingId before initializing

This commit is contained in:
bill bittner 2018-03-15 15:12:51 -07:00
parent 04ede6621c
commit 3ff70c4f9d
5 changed files with 13 additions and 58886 deletions

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -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;
}