docs: load Plausible on invoke.ai (custom), not ghpages#9161
Open
Pfannkuchensack wants to merge 4 commits into
Open
docs: load Plausible on invoke.ai (custom), not ghpages#9161Pfannkuchensack wants to merge 4 commits into
Pfannkuchensack wants to merge 4 commits into
Conversation
Plausible was being injected on the ghpages target, which redirects to invoke.ai and therefore never serves analytics. Flip the conditional so the script loads on the actual production custom-domain build.
Collaborator
|
Wouldn't this show plausible on local? |
Collaborator
Author
|
Right now it is not working on invoke.ai and yes that would also show on local. |
Collaborator
|
The best approach may be setting an env variable in the deploy action Something along the lines of: const enableAnalytics = process.env.ENABLE_ANALYTICS === 'true';That way only a deployment would get tracked, unless of course someone strips the config condition, runs a build and bombards the endpoint. UPDATE: I'd assume plausible only accepts requests from the configured domain? If so then I don't think what I said above matters too much. |
Only inject the tracking script when ENABLE_ANALYTICS=true, which the deploy workflow sets exclusively on main-branch pushes. Keeps local builds, PR builds, and manual workflow_dispatch runs analytics-free.
joshistoast
requested changes
May 13, 2026
Collaborator
joshistoast
left a comment
There was a problem hiding this comment.
No notes on the rest, made a code suggestion for keeping analytics on manual pushes
Co-authored-by: Josh Corbett <joshwcorbett@icloud.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Plausible was being injected on the ghpages target, which redirects to invoke.ai and therefore never serves analytics. Flip the conditional so the script loads on the actual production custom-domain build.
Merge Plan
This only applies to the invoke.ai website.
Checklist
What's Newcopy (if doing a release after this PR)