Description
Need to audit a live implementation first? Install the free Preferred Source Checker for Chrome to check eligibility, the publisher SDK, button rendering and the fallback link.
Add Google’s hosted Preferred Sources popup button to a WordPress site. Readers can choose a source in Google’s own flow without leaving the page. Custom button presets use Google’s direct preferences link if the script cannot load; the native style includes a no-JavaScript fallback.
Google Preferred Sources for WordPress
Google Preferred Sources is a reader choice, not a site-wide ranking factor. Google says selected fresh, relevant content may appear more often in Top Stories and receive a preferred badge in AI Overviews and AI Mode. No traffic, AI citation or visibility is guaranteed. See publisher guidance and click-through finding.
Add as Preferred Source with a Preferred Source Button
Give readers a way to add your publication as a Preferred Source in Google’s popup. Show a Preferred Source Button in an article, footer, widget or floating banner; custom presets use a direct-link fallback if the script cannot load.
Preferred Source Button placement and controls
- Place the button with the Gutenberg block,
[opace_preferred_source],[opace_preferred_source_button]or[opsrc_button]shortcode, classic widget, floating banner, footer, after the first H2 or at the end of content. - Use Smart placement to rotate five supported positions, then favour the highest measured click-through rate with continued exploration. It measures clicks, not completed additions.
- Show a banner immediately, after scroll depth or delay, or on desktop exit intent. Include returning-visitor and post-click or dismissal suppression controls.
- Choose Google’s native button or custom Google-colours and neutral presets, with light, dark and language settings.
Analytics, eligibility and consent
- Record anonymous aggregate impressions, clicks and click-through rate for 30 or 90 days, with a per-placement table. Optional GA4/dataLayer events record clicks only.
- Check whether the WordPress address is a domain or subdomain. Google has no eligibility API, so the plugin links to its preferences tool for the owner to check manually. Subdirectories are not eligible.
- Enable GDPR two-click mode to defer the Google script until a reader agrees. Declining uses the direct preferences link.
- Use network activation-safe defaults, per-site settings, optional network settings locking and a documented white-label filter for agency installations.
External services and privacy
The plugin loads Google’s publisher.js from news.google.com only on pages where a button or banner renders, so Google’s popup can open. The plugin itself sends no personal data to Google. A browser request to Google may involve IP address and browser data under Google’s Terms of Service and Privacy Policy.
The fallback link and eligibility panel point to google.com/preferences/source but make no automatic request. The two-click mode prevents a Google request until the reader agrees. Plugin analytics are anonymous aggregate counts in the WordPress database. Optional GA4/dataLayer events send placement, style and popup-or-deeplink mode to an existing setup; the plugin does not load GA4. Browser local storage supports consent, banner suppression and returning-visitor behaviour. A short-lived transient based on an anonymised IP hash rate-limits public analytics events.
Measurement limit
Google’s SDK has no completion callback, promise or event. Analytics record impressions and clicks on the trigger, never confirmed Preferred Source additions, conversions, rankings or visibility results.
Related Preferred Sources tools
- Preferred Sources suite hub
- Eligibility checker
- Button and code generator
- Preferred Sources framework packages for React, Vue, Svelte and Astro
- Install the Preferred Source Checker Chrome extension or inspect its source
- Opace SEO services
- Opace Digital Agency on GitHub
Independently developed by Opace Digital Agency and not affiliated with, endorsed by or sponsored by Google.
Screenshots








Blocks
This plugin provides 1 block.
- Preferred Source Button Invite readers to add your site as a preferred source on Google.
Installation
- In your WordPress admin, go to Plugins Add New and search for “Opace Preferred Source”, or upload the plugin ZIP via Plugins Add New Upload Plugin.
- Install and activate the plugin.
- Complete the setup wizard to review address guidance, choose a button style and enable a placement.
- Open Preferred Source Settings to refine placement, triggers, analytics and consent mode.
FAQ
-
Can the plugin confirm that my site is eligible?
-
No. It checks whether the current address is a supported domain or subdomain format and links to Google’s source preferences tool. Google provides no automated eligibility API. Subdirectories such as
example.com/blogare not eligible. -
Are the analytics confirmed additions or conversions?
-
No. Google’s SDK does not report whether a reader completed the popup. The plugin records impressions and clicks, and Smart placement uses click-through rate only.
-
No. Preferred Sources is a reader-level personalisation feature. The button is an invitation for readers to use Google’s flow; it does not change general rankings or guarantee inclusion in any Google surface.
-
What happens if Google’s script is blocked?
-
Custom button presets open Google’s direct source-preferences link. With JavaScript disabled, every style renders a plain link. The native style relies on Google’s rendered button when JavaScript is available.
-
Does the plugin load data from Google?
-
It loads Google’s hosted
publisher.json pages where a button or banner renders. Enable two-click mode to wait for reader agreement. The script tag also includesdata-opsrc-sdk="1"for consent-management tools that target scripts by attribute. -
What are the shortcodes?
-
Use
[opace_preferred_source],[opace_preferred_source_button]or[opsrc_button]. All acceptstyle,label,theme,langandalign. Use Preferred Source Help & shortcodes for examples and developer-filter guidance. -
Yes. The plugin documents filters including
opsrc_render_button_html,opsrc_render_banner_htmlandopsrc_white_labelon its Help & shortcodes screen. -
Is this plugin affiliated with Google?
-
No. It integrates Google’s publicly documented Preferred Sources button. Google is a trademark of Google LLC.
Reviews
There are no reviews for this plugin.
Contributors and Developers
“Opace Preferred Source Button & Analytics for Google” is open source software. The following people have contributed to this plugin.
Contributors“Opace Preferred Source Button & Analytics for Google” has been translated into 1 locale. Thank you to the translators for their contributions.
Translate “Opace Preferred Source Button & Analytics for Google” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Change Log
1.1.5
- Bundled an English (UK) translation and now load the plugin text domain from the languages folder.
- Regenerated the translation template from the published 1.1.4 strings.
- Removed line-break tags from the help page and setup wizard markup in favour of list and paragraph elements.
- Updated the activation notice to use the approved plugin name.
1.1.4
- Aligned the plugin directory, main file and translation domain with the approved
opace-preferred-source-button-for-googleslug. - Made the existing field-by-field settings sanitisation callback explicit on the registered settings instance.
- Standardised the remaining developer filters and uninstall helpers on the unique
opsrcprefix before publication. - Restored WordPress’s confirmation notice after settings are saved.
1.1.3
- Renamed the plugin to Opace Preferred Source Button & Analytics for Google.
- Replaced short internal prefixes with unique
opsrc/opaceidentifiers and updated the directory installation instructions.
1.1.2
- Refreshed the directory documentation with the complete shortcode list and clearer multisite and agency deployment guidance; no runtime behaviour changed.
1.1.0
- Added Smart and content-aware placement, per-placement analytics and the Help & shortcodes screen.
1.1.1
- Fixed index-permalink REST URLs and block editor dependencies.
1.0.0
- Initial release.
