studiokit-scaffolding-js 4.10.1 → 4.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/startup.js +4 -4
  2. package/package.json +2 -2
package/lib/startup.js CHANGED
@@ -27,7 +27,7 @@ var applicationinsights_web_1 = require("@microsoft/applicationinsights-web");
27
27
  var Sentry = __importStar(require("@sentry/react"));
28
28
  var tracing_1 = require("@sentry/tracing");
29
29
  var history_1 = require("history");
30
- var react_ga_1 = __importDefault(require("react-ga"));
30
+ var react_ga4_1 = __importDefault(require("react-ga4"));
31
31
  var configuration_1 = require("./constants/configuration");
32
32
  var configureStore_1 = __importDefault(require("./redux/configureStore"));
33
33
  var logger_1 = require("./utils/logger");
@@ -63,7 +63,7 @@ var startup = function (appConfig, endpointMappings) {
63
63
  var locationListener = function (location, action) {
64
64
  // send pageview to Google Analytics
65
65
  if (appConfig.GOOGLE_ANALYTICS_TRACKING_ID) {
66
- react_ga_1.default.pageview(location.pathname);
66
+ react_ga4_1.default.send({ hitType: 'pageview', page: location.pathname });
67
67
  }
68
68
  // send pageview to Application Insights
69
69
  if (appInsights) {
@@ -115,9 +115,9 @@ var startup = function (appConfig, endpointMappings) {
115
115
  };
116
116
  // Google Analytics
117
117
  if (appConfig.GOOGLE_ANALYTICS_TRACKING_ID) {
118
- react_ga_1.default.initialize(appConfig.GOOGLE_ANALYTICS_TRACKING_ID);
118
+ react_ga4_1.default.initialize(appConfig.GOOGLE_ANALYTICS_TRACKING_ID);
119
119
  // track initial page
120
- react_ga_1.default.pageview(window.location.pathname);
120
+ react_ga4_1.default.send({ hitType: 'pageview', page: window.location.pathname });
121
121
  }
122
122
  // Application Insights
123
123
  var appInsights;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "studiokit-scaffolding-js",
3
- "version": "4.10.1",
3
+ "version": "4.11.0",
4
4
  "description": "Common scaffolding for Studio apps at Purdue",
5
5
  "repository": "https://gitlab.com/purdue-informatics/studiokit/studiokit-scaffolding-js",
6
6
  "license": "MIT",
@@ -133,7 +133,7 @@
133
133
  "react": "^17.0.1",
134
134
  "react-bootstrap": "^1.4.3",
135
135
  "react-dom": "^17.0.1",
136
- "react-ga": "^3.3.0",
136
+ "react-ga4": "^2.1.0",
137
137
  "react-helmet": "^6.1.0",
138
138
  "react-modal": "^3.12.1",
139
139
  "react-quill": "purdue-tlt/react-quill#fix/auto-focus",