Skip to content

Install Plausible analytics on RaidGuild website#86

Merged
dekanbro merged 1 commit into
mainfrom
codex/cr-305-install-plausible-analytics-on-raidguild
Jul 1, 2026
Merged

Install Plausible analytics on RaidGuild website#86
dekanbro merged 1 commit into
mainfrom
codex/cr-305-install-plausible-analytics-on-raidguild

Conversation

@raidguildbot

@raidguildbot raidguildbot commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds the supplied Plausible analytics external script once in the global App Router head.
  • Adds the supplied inline Plausible init snippet once globally.
  • Leaves existing Vercel Analytics integration unchanged.

Validation

  • npm run lint
  • npm run build
  • Count-based built-output check confirmed the Plausible script URL and inline init each appear once in a representative rendered head.

Closes #85.

Summary by CodeRabbit

  • New Features
    • Added site analytics tracking to improve visibility into page usage and traffic trends.

@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
website Ready Ready Preview, Comment Jul 1, 2026 1:24pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a <head> section to RootLayout in src/app/layout.tsx containing an external async Plausible analytics script and an inline initialization script injected via dangerouslySetInnerHTML.

Changes

Plausible Analytics Installation

Layer / File(s) Summary
Head script injection
src/app/layout.tsx
Adds a <head> block to RootLayout loading an external async Plausible script and inlining a Plausible init snippet via dangerouslySetInnerHTML.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Related issues: #85 (Install Plausible analytics on RaidGuild website)

Suggested reviewers: raid-guild/website maintainers familiar with src/app/layout.tsx

🐰

A hop, a script, a head so small,
Plausible whispers, watching all,
No cookies crumbled, none to trace,
Just numbers counted, privacy's grace,
The rabbit nods and hops away. 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding Plausible analytics to the RaidGuild website.
Linked Issues check ✅ Passed The change installs Plausible once in the global layout head and matches the requested script/init behavior.
Out of Scope Changes check ✅ Passed The summary shows only the Plausible layout change, with no unrelated analytics or broader refactors.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/cr-305-install-plausible-analytics-on-raidguild

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/app/layout.tsx

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/app/layout.tsx (1)

20-31: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use next/script for the Plausible loader instead of raw <script> tags.

The inline snippet is static, so the XSS warning doesn’t apply here, but next/script gives App Router loading control (afterInteractive / lazyOnload) and handles the inline init block with a required id.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/layout.tsx` around lines 20 - 31, Replace the raw Plausible
`<script>` tags in `layout.tsx` with `next/script` usage inside the `head`
section so the App Router can control loading and the inline init block can be
given a stable `id`. Update the `head` markup around the Plausible loader and
the `dangerouslySetInnerHTML` init snippet to use `Script` with an appropriate
loading strategy such as `afterInteractive` or `lazyOnload`, keeping the
existing Plausible URL and initialization logic intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/app/layout.tsx`:
- Around line 20-31: Replace the raw Plausible `<script>` tags in `layout.tsx`
with `next/script` usage inside the `head` section so the App Router can control
loading and the inline init block can be given a stable `id`. Update the `head`
markup around the Plausible loader and the `dangerouslySetInnerHTML` init
snippet to use `Script` with an appropriate loading strategy such as
`afterInteractive` or `lazyOnload`, keeping the existing Plausible URL and
initialization logic intact.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d1b2f4e0-2b6b-4923-97e6-f96dbd3438e6

📥 Commits

Reviewing files that changed from the base of the PR and between a4d3078 and 2ad4c4e.

📒 Files selected for processing (1)
  • src/app/layout.tsx

@dekanbro dekanbro merged commit 2992a13 into main Jul 1, 2026
3 checks passed
@dekanbro dekanbro deleted the codex/cr-305-install-plausible-analytics-on-raidguild branch July 1, 2026 13:30
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.

Install Plausible analytics on RaidGuild website

2 participants