Skip to content

[Docs] Fix sendGAEvent example in @next/third-parties#65678

Closed
tschoffelen wants to merge 1 commit into
vercel:canaryfrom
tschoffelen:docs-sendEvent
Closed

[Docs] Fix sendGAEvent example in @next/third-parties#65678
tschoffelen wants to merge 1 commit into
vercel:canaryfrom
tschoffelen:docs-sendEvent

Conversation

@tschoffelen
Copy link
Copy Markdown

@tschoffelen tschoffelen commented May 13, 2024

Fixes the usage example for sendGAEvent() exposed by @next/third-parties.

This pushes to GTAG's dataLayer, which means it needs to follow the structure set out in the Google docs here:

gtag('event', 'screen_view', {
  'app_name': 'myAppName',
  'screen_name': 'Home'
});

This also matches with the function signature, which looks like this: function sendGAEvent(..._args: Object[])

@tschoffelen tschoffelen requested review from a team as code owners May 13, 2024 08:09
@tschoffelen tschoffelen requested review from StephDietz and molebox and removed request for a team May 13, 2024 08:09
@ijjk ijjk added the Documentation Related to Next.js' official documentation. label May 13, 2024
@ijjk
Copy link
Copy Markdown
Member

ijjk commented May 13, 2024

Allow CI Workflow Run

  • approve CI run for commit: f8915f1

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

@samcx
Copy link
Copy Markdown
Member

samcx commented May 13, 2024

@tschoffelen Is this Google docs site link down for you?

@tschoffelen
Copy link
Copy Markdown
Author

@tschoffelen Is this Google docs site link down for you?

Hmm no it works for me, let me try again:

https://developers.google.com/analytics/devguides/collection/ga4/event-parameters?client_type=gtag

@samcx
Copy link
Copy Markdown
Member

samcx commented May 14, 2024

@tschoffelen Very strange 🤔

CleanShot 2024-05-14 at 10 38 47@2x

@samcx
Copy link
Copy Markdown
Member

samcx commented Jul 25, 2024

@tschoffelen The :docs: have already been :fixed: (https://rc.nextjs.org/docs/app/building-your-application/optimizing/third-party-libraries), so will be closing this!

@samcx samcx closed this Jul 25, 2024
@github-actions github-actions Bot added the locked label Aug 9, 2024
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Documentation Related to Next.js' official documentation. locked

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants