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

fix: Fix CCA initialization by exporting function instead of immediate execution #1466

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Odomey
Copy link

@Odomey Odomey commented Dec 23, 2024

What changed? Why?

  • Fixed the CCA (Client Analytics) initialization in initCCA.ts by modifying the export statement
  • Previously, the initialization function was being executed immediately on import, which could cause timing issues with analytics initialization
  • Now exporting the function itself instead of its execution result, allowing proper initialization timing control

Notes to reviewers

  • The change is minimal but important for analytics functionality
  • Only the export statement was modified, the initialization logic remains unchanged
  • This follows best practices for module initialization, allowing the importing code to control when the initialization occurs
  • The fix aligns with the CCA team's recommendations for library usage

How has it been tested?

  • Verified that analytics initialization still works correctly in development environment
  • Checked that page view tracking continues to function as expected
  • Confirmed that device ID management and tracking preferences are maintained
  • Tested with both allowed and disallowed tracking preferences

Copy link

vercel bot commented Dec 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
web-base-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 23, 2024 9:32pm

Copy link

vercel bot commented Dec 23, 2024

@Odomey is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

@cb-heimdall
Copy link
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
base web review To be reviewed by the Base web team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants