We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18186fb commit 2e1c1b0Copy full SHA for 2e1c1b0
src/lib/analytics.js
@@ -1,5 +1,7 @@
1
import GoogleAnalytics from 'react-ga';
2
3
+import log from './log';
4
+
5
const GA_ID = (process.env.GA_ID || window.GA_ID);
6
if (GA_ID) {
7
GoogleAnalytics.initialize(GA_ID, {
@@ -9,6 +11,7 @@ if (GA_ID) {
9
11
forceSSL: true
10
12
});
13
} else {
14
+ log.info('Disabling GA because GA_ID is not set.');
15
window.ga = () => {
16
// The `react-ga` module calls this function to implement all Google Analytics calls. Providing an empty
17
// function effectively disables `react-ga`. This is similar to the `testModeAPI` feature of `react-ga` except
0 commit comments