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

docs: Document exposing gtag for custom events in Qwik Partytown setup #6303

Merged
merged 1 commit into from
May 13, 2024

Conversation

itssajan
Copy link
Contributor

@itssajan itssajan commented May 12, 2024

This update enhances the Qwik application's integration with Google Analytics via Partytown by ensuring the gtag function is exposed for use in components, enabling the sending of custom events directly from the component level.

Key changes:

  1. Updated the Partytown script configuration to expose gtag globally, allowing for direct invocation in component logic.
  2. Added the complete Google Analytics integration script as recommended by Google, ensuring comprehensive tracking capabilities.
  3. Documented this integration pattern to assist others in setting up Google Analytics with Partytown in Qwik applications, addressing a common challenge found during implementation.

Overview

What is it?

  • Feature / enhancement
  • Bug
  • Docs / tests / types / typos

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Use cases and why

    1. One use case
    1. Another use case

Checklist:

  • My code follows the developer guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • Added new tests to cover the fix / functionality

This update enhances the Qwik application's integration with Google Analytics via Partytown by ensuring the `gtag` function is exposed for use in components, enabling the sending of custom events directly from the component level.

Key changes:
1. Updated the Partytown script configuration to expose `gtag` globally, allowing for direct invocation in component logic.
2. Added the complete Google Analytics integration script as recommended by Google, ensuring comprehensive tracking capabilities.
3. Documented this integration pattern to assist others in setting up Google Analytics with Partytown in Qwik applications, addressing a common challenge found during implementation.
@itssajan itssajan changed the title Expose gtag for custom events in Qwik Partytown setup docs: Document exposing gtag for custom events in Qwik Partytown setup May 12, 2024
@PatrickJS PatrickJS requested a review from gioboa May 13, 2024 17:39
@PatrickJS PatrickJS added the STATUS-2: PR waiting for review This PR is waiting for review and approval before merge label May 13, 2024
Copy link
Member

@gioboa gioboa left a comment

Choose a reason for hiding this comment

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

Thanks @itssajan
It looks good to me

@gioboa gioboa merged commit bb8b7a9 into QwikDev:main May 13, 2024
21 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATUS-2: PR waiting for review This PR is waiting for review and approval before merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants