Skip to content

fix(registry): add missing Google Ads proxy domains (www.google.com, www.googletagmanager.com)#678

Closed
felixgabler wants to merge 3 commits intonuxt:mainfrom
felixgabler:fix/google-ads-proxy-domain
Closed

fix(registry): add missing Google Ads proxy domains (www.google.com, www.googletagmanager.com)#678
felixgabler wants to merge 3 commits intonuxt:mainfrom
felixgabler:fix/google-ads-proxy-domain

Conversation

@felixgabler
Copy link
Copy Markdown

Adds www.google.com and www.googletagmanager.com to the Google Analytics registry's proxy domain list.

When firstParty proxy is enabled and Google Ads is configured alongside GA4 via useScriptGoogleAnalytics, the gtag SDK makes runtime requests to www.google.com/pagead/1p-conversion/, www.google.com/g/collect, and www.googletagmanager.com/td. The AST rewriter intercepts these URLs but the server handler rejects them with 403 because the domains are not in the allowlist.

Impact: 111K+ errors in ~3 hours of production traffic.

Fixes #677

…gle Analytics proxy domains

Google Ads gtag makes runtime requests to www.google.com for conversion
tracking (/pagead/1p-conversion/, /pagead/1p-user-list/, /g/collect) and
www.googletagmanager.com for tag discovery (/td). When the first-party
proxy is enabled, the AST rewriter intercepts these URLs but the server
handler rejects them with 403 because the domains are not in the allowlist.

Fixes nuxt#677
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 28, 2026

@felixgabler is attempting to deploy a commit to the Nuxt Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 28, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5355df55-a290-4ea8-9a2d-f336c98a1fe4

📥 Commits

Reviewing files that changed from the base of the PR and between 747c5a4 and da428fe.

📒 Files selected for processing (1)
  • packages/script/src/registry.ts
✅ Files skipped from review due to trivial changes (1)
  • packages/script/src/registry.ts

📝 Walkthrough

Walkthrough

This change reformats packages/script/src/registry.ts (imports, object/array literals, function signatures and helper formatting) without altering logic. It also updates the Google Analytics/Ads proxy domain allowlist to include www.google.com so gtag conversion/collection endpoints are accepted by the proxy. No exported signatures or control flow behavior were changed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 4

❌ Failed checks (4 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning PR title claims to add missing Google Ads proxy domains, but the actual changes only reformat code without adding any domains to allowlists. Update the PR title to reflect that this is a formatting/refactoring change, or verify that the domain additions are actually present in the code changes.
Description check ⚠️ Warning PR description states it adds www.google.com and www.googletagmanager.com to the proxy domain list, but the code changes show only formatting/whitespace modifications with no domain additions. Either update the description to match the actual code changes (formatting only), or ensure the domain additions are included in the changeset.
Linked Issues check ⚠️ Warning Linked issue #677 requires adding www.google.com and www.googletagmanager.com to the proxy domain allowlist, but the changeset contains only formatting changes without adding these domains. Add www.google.com and www.googletagmanager.com to the Google Analytics registry's proxy domain allowlist to resolve the requirements in issue #677.
Out of Scope Changes check ⚠️ Warning The PR contains extensive formatting and refactoring changes (308 lines added, 50 removed) that are unrelated to the stated objective of adding proxy domains. Separate formatting changes into a distinct PR, or clarify why extensive reformatting is necessary for adding the missing proxy domains.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/script/src/registry.ts (1)

1-1101: ⚠️ Potential issue | 🟠 Major

Fix widespread formatting violations introduced by this change.

The entire file has been reformatted with semicolons and 4-space indentation, which violates the project's ESLint configuration. Static analysis reports over 1000 style violations including:

  • Extra semicolons (project expects none)
  • 4-space indentation (project expects 2 spaces)
  • Incorrect member delimiters in type definitions
  • Various operator placement and bracket style issues

This large formatting change obscures the small functional fix (adding two domains) and will likely cause CI/CD failures.

🔧 Recommended fix

Revert the formatting changes and keep only the functional modification:

  1. Discard all formatting changes
  2. Add only the two new domains to the googleAnalytics proxy configuration:
    • 'www.google.com'
    • 'www.googletagmanager.com'
  3. Run the project's configured formatter/linter (npm run lint:fix or equivalent) to ensure compliance

Alternatively, if you have uncommitted changes, use:

git checkout HEAD -- packages/script/src/registry.ts
# Then manually add only lines 963-964 with proper formatting
npm run lint:fix

This will preserve the functional fix while maintaining code style consistency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/script/src/registry.ts` around lines 1 - 1101, Revert the wholesale
formatting changes and keep only the functional change: in the registry()
definition for 'googleAnalytics' (the def('googleAnalytics') entry in this file)
add the two domains 'www.google.com' and 'www.googletagmanager.com' to its
proxy.domains array, restore original project formatting (2-space indentation,
no semicolons, original member delimiters) and then run the project's
formatter/linter (e.g. npm run lint:fix) before committing; if you have local
formatting changes to discard, reset the file to HEAD and reapply only the two
domain additions to the googleAnalytics proxy block.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@packages/script/src/registry.ts`:
- Around line 1-1101: Revert the wholesale formatting changes and keep only the
functional change: in the registry() definition for 'googleAnalytics' (the
def('googleAnalytics') entry in this file) add the two domains 'www.google.com'
and 'www.googletagmanager.com' to its proxy.domains array, restore original
project formatting (2-space indentation, no semicolons, original member
delimiters) and then run the project's formatter/linter (e.g. npm run lint:fix)
before committing; if you have local formatting changes to discard, reset the
file to HEAD and reapply only the two domain additions to the googleAnalytics
proxy block.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9aa0a0ad-95b7-4dc3-8967-a98dd869b7d9

📥 Commits

Reviewing files that changed from the base of the PR and between fc6efd3 and 55b03a1.

📒 Files selected for processing (1)
  • packages/script/src/registry.ts

harlan-zw added a commit that referenced this pull request Mar 29, 2026
@harlan-zw
Copy link
Copy Markdown
Collaborator

Sounds good. There were some formatting issues, so I just merged the domain fix on main to expedite this.

@harlan-zw harlan-zw closed this Mar 29, 2026
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.

Proxy domain allowlist missing www.google.com (Google Ads gtag conversion endpoints)

2 participants