Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading react-ga to react-ga4 #48932

Merged
merged 12 commits into from May 16, 2023
Merged

Upgrading react-ga to react-ga4 #48932

merged 12 commits into from May 16, 2023

Conversation

DevEsteves
Copy link
Contributor

@DevEsteves DevEsteves commented Apr 28, 2023

taken from google analytic's page:

"On July 1, 2023, this property will stop processing data. Starting in March 2023, for continued website measurement, migrate your original property settings to a Google Analytics 4 (GA4) property, or they'll be copied for you to an existing GA4 property, reusing existing site tags."

The package 'react-ga' doesn't support GA4, so i updated the package to 'react-ga4', the example continues primarily the same, the only differences is that specifying 'pageview' is now required instead of just setting the location of the pageview and the expection() function doesn't exist in this package.

required changes are welcomed

@DevEsteves DevEsteves requested review from a team, leerob and steven-tey as code owners April 28, 2023 01:21
@ijjk ijjk added the examples Issue/PR related to examples label Apr 28, 2023
@DevEsteves
Copy link
Contributor Author

I've changed the logException function, as exception() from react-ga is not available in the react-ga4 yet.

@DevEsteves
Copy link
Contributor Author

Is it better to include the react-ga4 example and keep the react-ga example here as well (until July 1, 2023 when it will be deprecated)?

If that's the case I can fix the PR.

@housseindjirdeh
Copy link
Collaborator

Thanks for this!

Is it better to include the react-ga4 example and keep the react-ga example here as well (until July 1, 2023 when it will be deprecated)?

I don't think that's necessary. I wouldn't want folks to look at the react-ga example and be surprised come July. I think your current solution is better.

Copy link
Collaborator

@housseindjirdeh housseindjirdeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with minor nits

examples/with-react-ga4/README.md Show resolved Hide resolved
@kodiakhq kodiakhq bot merged commit 9e51169 into vercel:canary May 16, 2023
92 checks passed
hydRAnger pushed a commit to hydRAnger/next.js that referenced this pull request Jun 12, 2023
taken from google analytic's page:

 "_On July 1, 2023, this property will stop processing data. Starting in March 2023, for continued website measurement, migrate your original property settings to a Google Analytics 4 (GA4) property, or they'll be copied for you to an existing GA4 property, reusing existing site tags._"

The package 'react-ga' doesn't support GA4, so i updated the package to 'react-ga4', the example continues primarily the same, the only differences is that specifying 'pageview' is now required instead of just setting the location of the pageview and the expection() function doesn't exist in this package.

required changes are welcomed




Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue/PR related to examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants