Skip to content

crds-analytics-wrapper integration#3492

Open
jacobtellep wants to merge 7 commits intodemofrom
feature/implement-analytics-wrapper
Open

crds-analytics-wrapper integration#3492
jacobtellep wants to merge 7 commits intodemofrom
feature/implement-analytics-wrapper

Conversation

@jacobtellep
Copy link
Copy Markdown
Contributor

@jacobtellep jacobtellep commented Aug 26, 2025

Problem

Move to using crds-analytics-wrapper

Solution

Replaced Segment integration with Crossroads Analytics wrapper and updated includes:

  • Modified _includes/_head.html and _includes/_footer-script.html to load the wrapper.
  • Updated .env-sample with required analytics env vars.
  • Diff: 3 files changed, 74 insertions, 12 deletions.
  • Files: .env-sample, _includes/_head.html, _includes/_footer-script.html.

Corresponding Branch

N/A

Testing

  • Install deps and serve: bundle install && npm i && bundle exec jekyll serve.
  • Load any page; view source/Network:
    • Confirm wrapper loads (no requests to Segment domains).
    • Verify analytics object is present and initialized.
  • Optional: run npm run build to ensure assets build cleanly.

@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 26, 2025

Deploy Preview for demo-crds-jekyll ready!

Name Link
🔨 Latest commit 59651bf
🔍 Latest deploy log https://app.netlify.com/projects/demo-crds-jekyll/deploys/68af41566ca48f0007aa9fe4
😎 Deploy Preview https://deploy-preview-3492--demo-crds-jekyll.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

jacobtellep and others added 6 commits August 27, 2025 11:20
Removes the crossOrigin attribute that was causing CORS issues with the analytics wrapper script loading.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove all debugging code and console logging
- Add browser polyfills for Node.js globals (process, global)
- Fix script loading race condition with proper event handlers
- Add robust error handling and method name fallbacks
- Improve page tracking logic for navigation scenarios
- Remove crossorigin attribute (already committed separately)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
… and auto-tracking setup; add data attributes for article engagement tracking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants