Skip to content

Conversation

nexoscreator
Copy link
Contributor

This PR improves the Google Adsense registry script by simplifying initialization, fixing auto ads issues, and ensuring a cleaner implementation.

πŸ”— Linked issue

No

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

  • Removed dynamic client query param from adsbygoogle.js URL (redundant and unnecessary).
  • Improved script injection logic to ensure proper useHead usage.
  • Fixed auto ads initialization issue (enable_page_level_ads now properly handled).
  • Standardized TypeScript typings and comments for better maintainability.
  • Ensured compatibility with future registry script updates.

Copy link

vercel bot commented Feb 13, 2025

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

A member of the Team first needs to authorize it.

@harlan-zw
Copy link
Collaborator

harlan-zw commented Feb 14, 2025

Thank you! Your expertise is appreciated

@harlan-zw harlan-zw changed the title Refactor: Google Adsense Script Initialization & Auto Ads Handling fix(googleAdsense): improve initialization & auto ads handling Feb 14, 2025
@harlan-zw harlan-zw merged commit 1ec5ec3 into nuxt:main Feb 14, 2025
1 of 3 checks passed
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