feat: migrate addressable over to hypelabs - #87
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughAnalytics provider integration has been switched from adrsbl to Hypelab. The Script component in the layout was updated to initialize HypeLabAnalytics instead of the previous adrsbl loader, and middleware CSP directives were modified to permit hypelab.com domains in script-src and connect-src while removing adrsbl references. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10–15 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
middleware.ts (1)
165-166: CSP changes correctly allow Hypelab domains.The
script-srcandconnect-srcdirectives properly includehttps://api.hypelab.comto support the new Hypelab SDK. The migration fromadrsbl.iodomains appears complete.Consider breaking this long CSP string into a template literal with separate lines for each directive to improve maintainability:
const cspHeader = [ "default-src 'self'", `script-src 'self' 'nonce-${nonce}' https://api.hypelab.com https://app.chatwoot.com https://widget.chatwoot.com https://cdn.weglot.com`, // ... other directives ].join('; ')
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
app/layout.tsx(1 hunks)middleware.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: thesmithdao
Repo: shapeshift/website-frontend PR: 52
File: app/layout.tsx:57-62
Timestamp: 2025-08-11T16:14:56.571Z
Learning: In the ShapeShift website-frontend repository, the adrsbl tracking pixel TID can be kept hardcoded in the app/layout.tsx file rather than being sourced from environment variables, as the team considers this value public and non-sensitive.
📚 Learning: 2025-08-11T16:14:56.571Z
Learnt from: thesmithdao
Repo: shapeshift/website-frontend PR: 52
File: app/layout.tsx:57-62
Timestamp: 2025-08-11T16:14:56.571Z
Learning: In the ShapeShift website-frontend repository, the adrsbl tracking pixel TID can be kept hardcoded in the app/layout.tsx file rather than being sourced from environment variables, as the team considers this value public and non-sensitive.
Applied to files:
app/layout.tsx
📚 Learning: 2025-08-20T22:37:17.653Z
Learnt from: thesmithdao
Repo: shapeshift/website-frontend PR: 58
File: app/[lang]/_utils/constants.tsx:877-879
Timestamp: 2025-08-20T22:37:17.653Z
Learning: In the ShapeShift website frontend, redirect entries in next.config.ts are kept for SEO purposes even when partner logos are removed from carouselLogos in constants.tsx. This preserves search rankings and link equity from legacy integrations while removing them from active promotion.
Applied to files:
app/layout.tsx
🔇 Additional comments (1)
app/layout.tsx (1)
56-74: Hypelab SDK integration looks correct.The script properly initializes the HypeLabAnalytics stub before loading the SDK asynchronously. The hardcoded
propertySlugis acceptable per team conventions (tracking IDs are considered public). Based on learnings, this is consistent with how the previous adrsbl TID was handled.One item to verify: the
trackAllSessions: trueprivacy setting. Please confirm this aligns with your privacy policy and any GDPR/CCPA consent requirements, as it enables session tracking for all users.
0xApotheosis
left a comment
There was a problem hiding this comment.
✅ Make sure you don't see any errors in the console for ha-sdk or api.hypelab
✅ Check that window.HypeLabAnalytics is defined
✅ Try running window.HypeLabAnalytics.logEvent('test_event') in the console and see if the event appears in window.__hype_analytics
Replaces Addressable Pixel with HypeLabs Pixel as per marketing request
Sister PR in web: shapeshift/web#11420
For testing:
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.