Skip to content

Conversation

@jumski
Copy link
Contributor

@jumski jumski commented Nov 10, 2025

Add Plausible Analytics with Cloudflare Worker Proxy to Demo App

This PR adds privacy-focused analytics to the demo app using Plausible Analytics with a Cloudflare Worker proxy to bypass ad blockers. The implementation includes:

  • A new analytics module with initPlausible() and track() functions for event tracking
  • Integration in the main layout file to initialize analytics on app mount
  • A Cloudflare Worker script for proxying requests to Plausible
  • Comprehensive setup documentation in PLAUSIBLE_SETUP.md

The analytics implementation supports:

  • Custom event tracking with properties
  • Revenue tracking
  • Automatic pageview, outbound link, and file download tracking
  • Configurable localhost tracking for development

The proxy setup helps avoid ad blockers by serving the Plausible script and forwarding events through a custom domain path.

@changeset-bot
Copy link

changeset-bot bot commented Nov 10, 2025

⚠️ No Changeset found

Latest commit: 62dda08

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor Author

jumski commented Nov 10, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge:queue - adds this PR to the back of the merge queue
  • hotfix:queue - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@nx-cloud
Copy link

nx-cloud bot commented Nov 10, 2025

🤖 Nx Cloud AI Fix Eligible

An automatically generated fix could have helped fix failing tasks for this run, but Self-healing CI is disabled for this workspace. Visit workspace settings to enable it and get automatic fixes in future runs.

To disable these notifications, a workspace admin can disable them in workspace settings.


View your CI Pipeline Execution ↗ for commit 62dda08

Command Status Duration Result
nx affected -t lint typecheck test --parallel -... ❌ Failed 6m 3s View ↗
nx affected -t test:e2e --parallel --base=556f4... ✅ Succeeded 6m 4s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-11 14:58:37 UTC

@jumski jumski force-pushed the 11-10-feat_final_tweaks_v2 branch from acc7fe9 to a650055 Compare November 10, 2025 20:45
@jumski jumski force-pushed the 11-10-feat_demo_-_setup_plausible branch from 5d9274d to 9257deb Compare November 10, 2025 20:45
@jumski jumski force-pushed the 11-10-feat_final_tweaks_v2 branch from a650055 to e673bd3 Compare November 10, 2025 21:04
@jumski jumski force-pushed the 11-10-feat_demo_-_setup_plausible branch 2 times, most recently from 91b2d67 to b932450 Compare November 10, 2025 23:05
@jumski jumski force-pushed the 11-10-feat_final_tweaks_v2 branch 2 times, most recently from 639621a to 0c1e21b Compare November 10, 2025 23:37
@jumski jumski force-pushed the 11-10-feat_demo_-_setup_plausible branch from b932450 to 388a018 Compare November 10, 2025 23:37
…tracking functions

- Introduced new documentation for setting up Plausible with a Cloudflare Worker proxy
- Added a new worker script to proxy Plausible requests and avoid ad-blockers
- Updated demo app to initialize Plausible with custom API host and tracking options
- Created analytics utility functions for initializing and tracking events with optional
properties and revenue
- Modified layout to include Plausible initialization on mount
- Updated package dependencies to include @plausible-analytics/tracker
- Enhanced tracking capabilities with support for custom events and revenue data
- Improved configuration flexibility and obfuscation to prevent detection and blocking
- Overall, integrated first-party Plausible tracking via proxy for more reliable analytics
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 11, 2025

Merge activity

  • Nov 11, 8:50 PM UTC: jumski added this pull request to the Graphite merge queue.
  • Nov 11, 8:53 PM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #289.
  • Nov 11, 8:54 PM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #289.
  • Nov 11, 9:05 PM UTC: jumski added this pull request to the Graphite merge queue.
  • Nov 11, 9:06 PM UTC: CI is running for this pull request on a draft pull request (#362) due to your merge queue CI optimization settings.
  • Nov 11, 9:07 PM UTC: Merged by the Graphite merge queue via draft PR: #362.

graphite-app bot pushed a commit that referenced this pull request Nov 11, 2025
# Add Plausible Analytics with Cloudflare Worker Proxy to Demo App

This PR adds privacy-focused analytics to the demo app using Plausible Analytics with a Cloudflare Worker proxy to bypass ad blockers. The implementation includes:

- A new analytics module with `initPlausible()` and `track()` functions for event tracking
- Integration in the main layout file to initialize analytics on app mount
- A Cloudflare Worker script for proxying requests to Plausible
- Comprehensive setup documentation in `PLAUSIBLE_SETUP.md`

The analytics implementation supports:
- Custom event tracking with properties
- Revenue tracking
- Automatic pageview, outbound link, and file download tracking
- Configurable localhost tracking for development

The proxy setup helps avoid ad blockers by serving the Plausible script and forwarding events through a custom domain path.
@graphite-app graphite-app bot closed this Nov 11, 2025
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