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

Update docs for Google Analytics 4 #51405

Merged
merged 8 commits into from
Jun 23, 2023

Conversation

nickmccurdy
Copy link
Contributor

What?

Update docs for Google Analytics 4

Why?

This page doesn't make it clear which script is recommended, and has code that's outdated and erroring.

How?

Update headings and clean up bad code.

@nickmccurdy
Copy link
Contributor Author

nickmccurdy commented Jun 17, 2023

@leerob I forgot that Script is necessary for hydration, so I'll revert this for now. However, I'm concerned that if users try to call the gtag or ga function, it may not be defined because these scripts are async. Should we run these scripts synchronously or with strategy="beforeInteractive"?

@ijjk
Copy link
Member

ijjk commented Jun 17, 2023

Allow CI Workflow Run

  • approve CI run for commit: 022b610

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

1 similar comment
@ijjk
Copy link
Member

ijjk commented Jun 17, 2023

Allow CI Workflow Run

  • approve CI run for commit: 022b610

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@nickmccurdy nickmccurdy changed the title Update docs for Update docs for Google Analytics 4 Update docs for Google Analytics 4 Jun 17, 2023
@kodiakhq kodiakhq bot merged commit c3c6214 into vercel:canary Jun 23, 2023
31 checks passed
@leerob
Copy link
Member

leerob commented Jun 23, 2023

Can you explain why afterInteractive was removed?

@nickmccurdy
Copy link
Contributor Author

nickmccurdy commented Jun 24, 2023

Because it's the default behavior, and I wanted to make the code easier to read and understand. It's also easier to compare with the Google Analytics docs which don't use Next features.

Please let me know if a different strategy should be used (original question).

@nickmccurdy nickmccurdy deleted the update-docs-for-ga4 branch June 24, 2023 02:58
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants