Skip to content

Commit 2650c69

Browse files
WIP
1 parent 1d6884f commit 2650c69

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

client/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"react-aria-live": "^2.0.4",
3939
"react-browser-detection": "^1.2.1",
4040
"react-dom": "^16.7.0",
41-
"react-ga": "^2.6.0",
41+
"react-ga4": "^2.1.0",
4242
"react-grid-system": "^4.4.1",
4343
"react-helmet": "^5.2.1",
4444
"react-redux": "^7.1.1",

client/src/components/analytics/GoogleAnalytics.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// utils/GoogleAnalytics.js
22
import React from 'react'
33
import PropTypes from 'prop-types'
4-
import * as ReactGA from 'react-ga'
4+
import ReactGA from 'react-ga4'
55
import {Route} from 'react-router-dom'
66

77
export default class GoogleAnalytics extends React.Component {
@@ -54,7 +54,7 @@ export default class GoogleAnalytics extends React.Component {
5454
},
5555
profileNames
5656
)
57-
ReactGA.pageview(page, profileNames)
57+
ReactGA.send({ hitType: 'pageview', page: page, title: 'Custom Title' });
5858
}
5959

6060
render() {

docs/operator/deployment/v2/onestop/feature-toggles.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ There are two *new* sections to the search API UI config YML.
7070

7171
1. If the cart feature is desired, simply add the `features` config section as seen below. Without it, the UI will default to not showing a cart feature.
7272

73-
1. Google Analytics can be configured by replacing the following parts with the appropriate IDs for the test and prod environments. When using multiple trackers, you **must** provide a name for additional trackers. There can only be one default (without a name), and the one without a name will only receive updates depending on `reactGaOptions.alwaysSendToDefaultTracker`. See Google Analytics and react-ga documentation for more details.
74-
- `trackingId: 'UA-XXXXXXXXX-X'`
73+
1. Google Analytics can be configured by replacing the following parts with the appropriate IDs for the test and prod environments. When using multiple trackers, you **must** provide a name for additional trackers. There can only be one default (without a name), and the one without a name will only receive updates depending on `reactGaOptions.alwaysSendToDefaultTracker`. See Google Analytics and react-ga4 documentation for more details.
74+
- `trackingId: 'XXXXXXXXX'`
7575
- `name: XXXXXXXXX`
7676

7777

docs/operator/deployment/v3/feature-toggles.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ There are two *new* sections to the search API UI config YML.
6464

6565
1. If the cart feature is desired, simply add the `features` config section as seen below. Without it, the UI will default to not showing a cart feature.
6666

67-
1. Google Analytics can be configured by replacing the following parts with the appropriate IDs for the test and prod environments. When using multiple trackers, you **must** provide a name for additional trackers. There can only be one default (without a name), and the one without a name will only receive updates depending on `reactGaOptions.alwaysSendToDefaultTracker`. See Google Analytics and react-ga documentation for more details.
68-
- `trackingId: 'UA-XXXXXXXXX-X'`
67+
1. Google Analytics can be configured by replacing the following parts with the appropriate IDs for the test and prod environments. When using multiple trackers, you **must** provide a name for additional trackers. There can only be one default (without a name), and the one without a name will only receive updates depending on `reactGaOptions.alwaysSendToDefaultTracker`. See Google Analytics and react-ga4 documentation for more details.
68+
- `trackingId: 'XXXXXXXXX'`
6969
- `name: XXXXXXXXX`
7070

7171
```

helm/onestop-search/values.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ config: |-
3030
ui:
3131
googleAnalytics:
3232
profiles:
33-
- trackingId: 'UA-127993388-1'
33+
- trackingId: '358541492'
3434
gaOptions:
35-
name: 127993388
35+
name: 358541492
3636
reactGaOptions:
3737
alwaysSendToDefaultTracker: false
3838
features:

0 commit comments

Comments
 (0)