SourceCue Button for Google Preferred Sources is a complete Google Preferred Sources WordPress plugin that helps publishers add a Preferred Source button, official Google badge, inline call-to-action, sticky banner, or floating alert to their WordPress website.
Readers can use these Google Preferred Sources buttons to open Google’s Preferred Sources experience and add an eligible domain or subdomain as one of their preferred sources in Google Search.
SourceCue supports all three Preferred Sources implementation approaches documented by Google: the Standard JavaScript button, an Advanced customizable interactive button, and a Deeplink to Google’s source preferences page. You can choose the method that fits your site, customize how the Preferred Source prompt looks, control exactly where and when it appears, and optionally measure engagement with privacy-conscious local analytics.
No coding is required for normal use. SourceCue can automatically display the Preferred Sources promotion, or you can place it manually with the Gutenberg block, shortcode, action hook, or PHP helpers.
SourceCue is an independent WordPress plugin and is not affiliated with, endorsed by, or sponsored by Google.
Choose how visitors access Google’s Preferred Sources feature.
1. Standard Google button
Use Google’s documented Standard JavaScript implementation. Google renders the interactive Preferred Sources button and handles its supported localization.
2. Advanced custom interactive button
Create your own Preferred Source call-to-action while still starting Google’s documented interactive Preferred Sources flow.
SourceCue provides six ready-to-use design presets:
Each preset is only a starting point. You can customize the button label, solid or gradient background, text color, border color, gradient colors, gradient angle, font size, font weight, horizontal and vertical padding, border radius, border width, and border style.
Button labels support the dynamic variables {site_name} and {domain}.
3. Deeplink
Use a regular link to Google’s source preferences page without requiring the Google Preferred Sources JavaScript SDK for that element.
The Deeplink can be displayed as:
You can also choose whether the Deeplink opens in a new browser tab.
SourceCue includes the translated Preferred Sources badge assets supplied through Google’s Preferred Sources documentation.
Features include:
The appropriate high-density asset is automatically available for Retina displays.
This makes it easy to add an official Preferred Sources badge without manually downloading, uploading, resizing, or managing multiple translated badge files.
SourceCue can automatically display your Add as Preferred Source promotion without editing your theme or inserting a shortcode into every article.
Automatic targeting options include:
For custom rules, you can select the post types that should be included and then apply additional exclusions.
Need more control?
SourceCue includes searchable selectors that let you exclude:
This allows large publishers to show the Google Preferred Sources button only where it makes sense instead of applying one global rule to every URL.
Automatically insert a Preferred Sources button, badge, or CTA directly into eligible content.
Available placements are:
Inline button alignment can be set independently to:
Inline content can run by itself or together with one global sticky banner or floating alert.
SourceCue provides two inline presentation styles.
Simple
Display only the Preferred Sources button or official badge.
Card
Create a complete in-content Preferred Sources call-to-action with:
Titles and promotional text can use {site_name} and {domain} variables.
This makes it possible to build calls to action such as:
Stay connected with {site_name}
and:
Add {domain} as a preferred source in Google Search.
SourceCue is not limited to buttons inside article content.
You can also promote Google Preferred Sources using:
Only one global banner or alert is enabled at a time, but it can operate together with automatic inline content.
Banner and alert buttons have independent Left, Center, and Right alignment controls.
Floating alerts can be placed at:
You can also configure the maximum alert width.
Control when a Sticky Banner or Floating Alert appears.
Available triggers include:
This makes it possible to wait until a reader has engaged with an article before displaying the Preferred Sources invitation.
Inline article content is rendered with the content and is not delayed by these banner/alert triggers.
Choose which device classes can see your Preferred Sources promotion:
Device visibility uses responsive CSS rather than server-side user-agent detection, helping the display rules remain compatible with page caching.
Sticky banners and floating alerts can include a close button.
After a visitor dismisses the promotion, SourceCue can:
Dismissal preferences use browser sessionStorage or localStorage rather than dismissal cookies.
SourceCue can optionally display a public counter showing how many times visitors have clicked your Preferred Sources actions.
Customize:
Use {count} inside the counter text, for example:
{count} readers clicked to add us
The counter can appear:
The counter records button usage. It does not claim that Google confirmed a visitor completed the Preferred Source selection because Google does not provide the plugin with such a completion callback.
SourceCue includes optional local analytics for Google Preferred Sources buttons.
Analytics is disabled by default.
When enabled, the plugin records aggregated daily statistics inside your own WordPress database rather than creating individual visitor profiles.
The 30-day analytics dashboard reports:
Analytics can also be broken down by placement:
By implementation:
And by integration source:
SourceCue does not store IP addresses, visitor IDs, WordPress user IDs, cookies, or individual page-view records for its local analytics.
SourceCue includes a dedicated Gutenberg block.
Search for:
SourceCue Button for Google Preferred Sources
inside the WordPress Block Editor and place the Preferred Sources action wherever you need it.
The block uses the same central plugin configuration while allowing manual placement inside posts, pages, templates, and other block-supported content.
Use the shortcode:
[psbgs_preferred_source]
for manual placement in content, widgets, builders, or other shortcode-compatible areas.
Examples:
[psbgs_preferred_source mode="standard" theme="dark" align="center"]
[psbgs_preferred_source mode="custom" label="Add {site_name} as a Preferred Source"]
[psbgs_preferred_source mode="deeplink" deeplink_style="official_badge" badge_theme="dark" badge_lang="hi" badge_width="160"]
[psbgs_preferred_source mode="standard" presentation="alert" alert_position="bottom_right" trigger="scroll" scroll="35"]
[psbgs_preferred_source inline_style="card" inline_title="Stay connected with {site_name}" inline_subtitle="Add {domain} as a preferred source in Google Search."]
SourceCue includes a live admin preview so publishers can see their Preferred Sources presentation while configuring it.
Separate previews are available for:
Changes update immediately in the settings interface.
The Standard Google button is represented by a preview placeholder, while official badge previews use the bundled badge asset.
SourceCue includes several features designed for WordPress sites that use page caching.
Device visibility uses responsive CSS rather than server-side device detection.
The optional Main-query protection helps prevent automatic inline buttons from accidentally appearing in secondary loops, related-post sections, widgets, and many page-builder loops.
You can also hide automatic Preferred Sources promotions from logged-in users while editors and administrators work on the site.
When a supported WordPress caching plugin is detected, SourceCue can optionally request a cache purge after Preferred Sources settings are saved.
This allows presentation changes to become visible without manually clearing the page cache.
No caching plugin is required to use SourceCue.
SourceCue keeps its front-end footprint controlled.
Features include:
Google’s Preferred Sources JavaScript SDK is loaded only when the selected implementation requires an interactive Google element.
Text Deeplink and locally served official-badge output do not require that SDK unless another interactive Preferred Sources element on the same page requires it.
SourceCue provides dedicated controls for managing plugin data.
Administrators can:
Full cleanup is enabled by default.
When cleanup is enabled and SourceCue is deleted, the plugin removes its settings, public click counter, analytics database-version option, custom analytics table, and scheduled plugin events.
If an administrator intentionally wants to retain settings and analytics for a later reinstall, database cleanup can be disabled before uninstalling.
Scheduled plugin events are always removed when the plugin is uninstalled.
For troubleshooting, SourceCue includes an optional Frontend Debug Mode.
When enabled, it can log Preferred Sources rendering decisions using the [PSBGS] prefix and provide a browser-console diagnostic snapshot.
If WordPress debug logging is configured, related PHP diagnostic messages can also appear in the WordPress debug log.
Debug Mode is intended for temporary troubleshooting and can be disabled during normal operation.
Developers can integrate SourceCue into themes and custom plugins without relying exclusively on automatic placement.
Available integration methods include:
PHP echo helper
psbgs_preferred_source_button( array( 'mode' => 'standard', 'align' => 'center' ) );
PHP return helper
$html = psbgs_get_preferred_source_button( array( 'mode' => 'deeplink' ) );
Action hook
do_action( 'psbgs_preferred_source_button', array( 'presentation' => 'sticky_bottom' ) );
SourceCue also provides filters for settings, button arguments, generated markup, Deeplink URLs, badge language and assets, supported post types, automatic-display decisions, and analytics retention.
Selected filters include:
psbgs_default_settingspsbgs_settingspsbgs_button_argspsbgs_button_htmlpsbgs_deeplink_urlpsbgs_badge_languagepsbgs_badge_asset_urlspsbgs_supported_post_typespsbgs_should_auto_displaypsbgs_analytics_retention_daysLocal analytics is optional and disabled by default.
SourceCue’s own analytics does not build visitor profiles or store IP addresses, visitor identifiers, WordPress user IDs, analytics cookies, or individual page-view records.
Banner dismissal uses browser session or local storage rather than dismissal cookies.
When Standard or Advanced implementation is rendered, Google’s documented Preferred Sources publisher library is requested from Google. Deeplink mode can be used when a regular link or locally served official badge is preferred.
Full external-service and privacy information is included in the plugin documentation.
SourceCue is designed for WordPress:
Whether you need a simple Add as Preferred Source button, an official translated Google Preferred Sources badge, an in-content CTA, a sticky promotion, a floating alert, or a complete Preferred Sources engagement setup with targeting and analytics, SourceCue provides these options from one WordPress settings screen.
Google controls which websites are eligible for Preferred Sources.
SourceCue does not make a website eligible for the feature and does not guarantee Google Search rankings, impressions, traffic, Top Stories visibility, AI visibility, or other search-performance improvements.
Preferred Sources eligibility applies to eligible domains or subdomains. A path or subdirectory such as example.com/blog cannot be configured as a separately eligible source.
SourceCue’s purpose is to give WordPress publishers a flexible way to implement and promote Google’s publicly documented Preferred Sources functionality on their websites.
Basic usage:
[psbgs_preferred_source]
Examples:
[psbgs_preferred_source mode="standard" theme="dark" align="center"]
[psbgs_preferred_source mode="custom" label="Add {site_name} as a Preferred Source"]
[psbgs_preferred_source mode="deeplink" deeplink_style="official_badge" badge_theme="dark" badge_lang="hi" badge_width="160"]
[psbgs_preferred_source mode="standard" presentation="alert" alert_position="bottom_right" trigger="scroll" scroll="35"]
[psbgs_preferred_source inline_style="card" inline_title="Stay connected with {site_name}" inline_subtitle="Add {domain} as a preferred source in Google Search."]<h3>External services</h3>
This plugin integrates with Google’s Preferred Sources service. The external service is required only for the Google functionality selected by the site administrator.
When the Standard or Advanced JavaScript implementation is rendered, the visitor’s browser loads Google’s Preferred Sources publisher library from:
https://news.google.com/swg/js/v1/publisher.js
This browser request is made to Google and may transmit information normally included in a web request, such as the visitor’s IP address, user agent, and referrer, according to Google’s policies. The plugin does not proxy or store that request.
The SDK is not loaded for the text-deeplink or locally served official-badge implementation unless another interactive Preferred Sources element on the same page requires it.
Preferred Sources actions ultimately use Google’s source preferences service at:
https://www.google.com/preferences/source
For deeplink mode, the configured source domain is included in the q query parameter when the visitor follows the link. Standard and Advanced modes use Google’s documented interactive flow.
Service documentation: https://developers.google.com/search/docs/appearance/preferred-sources
Google Privacy Policy: https://policies.google.com/privacy
Google Terms of Service: https://policies.google.com/terms
Local analytics is disabled by default. When enabled, the plugin stores aggregated daily counters in the site’s WordPress database. It does not store IP addresses, visitor IDs, WordPress user IDs, cookies, or individual page-view rows for analytics.
The optional public click counter stores one aggregate integer. A click is not presented as proof that the visitor completed the selection inside Google.
Dismissal preferences use browser sessionStorage or localStorage, depending on the configured behavior.
The Google external-service behavior is described in the External services section above.
By default, uninstalling/deleting the plugin removes its settings, public click …