MCPcopy
hub / github.com/DesignRevision/shards-dashboard-react / trackPage

Function trackPage

src/withTracker.js:7–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5
6const withTracker = (WrappedComponent, options = {}) => {
7 const trackPage = page => {
8 if (process.env.NODE_ENV !== "production") {
9 return;
10 }
11
12 GoogleAnalytics.set({
13 page,
14 ...options
15 });
16 GoogleAnalytics.pageview(page);
17 };
18
19 const BASENAME = process.env.REACT_APP_BASENAME || "";
20

Callers 2

componentDidMountMethod · 0.85
componentDidUpdateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected