SourceCue Button for Google Preferred Sources

SourceCue Button for Google Preferred Sources

Details
View on WordPress

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.

Three Google Preferred Sources implementation methods

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:

  • Outline
  • Solid black
  • Dark gradient
  • Orange gradient
  • Dashed action
  • Pill

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:

  • Custom text/button
  • Official Google Preferred Sources badge

You can also choose whether the Deeplink opens in a new browser tab.

Official Google Preferred Sources badges

SourceCue includes the translated Preferred Sources badge assets supplied through Google’s Preferred Sources documentation.

Features include:

  • 17 supported badge languages
  • Automatic language selection
  • Manual badge-language selection
  • Light badge theme
  • Dark badge theme
  • Standard and Retina/high-density assets
  • Adjustable badge width from 40 to 676 pixels

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.

Automatic Preferred Source button placement

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:

  • Entire website
  • Posts only
  • Pages only
  • Front page only
  • Selected public post types
  • Custom targeting rules

For custom rules, you can select the post types that should be included and then apply additional exclusions.

Category and content exclusions

Need more control?

SourceCue includes searchable selectors that let you exclude:

  • Specific categories
  • Individual posts
  • Individual pages
  • Eligible custom-post-type entries

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.

Inline Preferred Sources buttons

Automatically insert a Preferred Sources button, badge, or CTA directly into eligible content.

Available placements are:

  • Before content
  • After content
  • Before and after content

Inline button alignment can be set independently to:

  • Left
  • Center
  • Right

Inline content can run by itself or together with one global sticky banner or floating alert.

Simple inline output or customizable card

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:

  • Custom title
  • Custom subtitle
  • Preferred Sources button or badge
  • Card background color
  • Text color
  • Border color
  • Spacing controls
  • Card alignment

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.

Sticky banners and floating alerts

SourceCue is not limited to buttons inside article content.

You can also promote Google Preferred Sources using:

  • Sticky top banner
  • Sticky bottom banner
  • Floating alert

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:

  • Top left
  • Top right
  • Bottom left
  • Bottom right

You can also configure the maximum alert width.

Display triggers

Control when a Sticky Banner or Floating Alert appears.

Available triggers include:

  • Immediately
  • After a configurable time delay
  • After the visitor reaches a configurable scroll percentage

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.

Desktop, tablet, and mobile visibility

Choose which device classes can see your Preferred Sources promotion:

  • Desktop
  • Tablet
  • Mobile

Device visibility uses responsive CSS rather than server-side user-agent detection, helping the display rules remain compatible with page caching.

Banner and alert dismissal controls

Sticky banners and floating alerts can include a close button.

After a visitor dismisses the promotion, SourceCue can:

  • Show it again on the next page view
  • Hide it for the current browser session
  • Hide it for a configurable number of days
  • Never show it again in that browser

Dismissal preferences use browser sessionStorage or localStorage rather than dismissal cookies.

Public Preferred Sources click counter

SourceCue can optionally display a public counter showing how many times visitors have clicked your Preferred Sources actions.

Customize:

  • Counter text
  • Counter position
  • Counter alignment
  • Counter color
  • Counter spacing
  • Whether zero should remain hidden

Use {count} inside the counter text, for example:

{count} readers clicked to add us

The counter can appear:

  • Above the button or badge
  • Below the button or badge
  • Beside the button or badge

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.

Optional local Preferred Sources analytics

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:

  • Impressions
  • Clicks
  • Dismissals
  • Click-through rate (CTR)

Analytics can also be broken down by placement:

  • Inline
  • Inline Card
  • Sticky Banner
  • Floating Alert

By implementation:

  • Standard Button
  • Custom Button
  • Official Badge
  • Text Deeplink

And by integration source:

  • Automatic placement
  • Shortcode
  • Gutenberg Block
  • Action Hook
  • PHP Helper
  • Manual / Other

SourceCue does not store IP addresses, visitor IDs, WordPress user IDs, cookies, or individual page-view records for its local analytics.

Gutenberg Preferred Source block

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.

Preferred Sources shortcode

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."]

Live Preview

SourceCue includes a live admin preview so publishers can see their Preferred Sources presentation while configuring it.

Separate previews are available for:

  • Inline content
  • Banner / alert presentation

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.

Cache-friendly display controls

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.

Automatic cache purge integration

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.

Performance-focused front-end assets

SourceCue keeps its front-end footprint controlled.

Features include:

  • Conditional front-end assets
  • Minified production CSS and JavaScript
  • CSS loaded only when plugin output is expected
  • No jQuery dependency
  • Option to disable SourceCue front-end CSS when your theme provides all required styling

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.

Data Management

SourceCue provides dedicated controls for managing plugin data.

Administrators can:

  • Clear all aggregated analytics data
  • Reset the public click counter
  • Reset plugin settings to their defaults
  • Choose whether plugin database data should be removed during uninstall

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.

Frontend Debug Mode

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.

Developer-friendly Preferred Sources API

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_settings
  • psbgs_settings
  • psbgs_button_args
  • psbgs_button_html
  • psbgs_deeplink_url
  • psbgs_badge_language
  • psbgs_badge_asset_urls
  • psbgs_supported_post_types
  • psbgs_should_auto_display
  • psbgs_analytics_retention_days

Privacy-conscious by design

Local 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.

Who is SourceCue for?

SourceCue is designed for WordPress:

  • News publishers
  • Online magazines
  • Independent publishers
  • Bloggers
  • Educational websites
  • Editorial websites
  • Content creators
  • Media organizations
  • SEO teams
  • Website owners who publish content eligible for Google’s Preferred Sources feature

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.

Important Google Preferred Sources eligibility note

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.

Shortcode

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.

Google Preferred Sources JavaScript SDK

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.

Google source preferences

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

Privacy

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 …

Details

Plugin code:
sourcecue-button-for-google-preferred-sources
Plugin version:
1.6.21
Author:
Outdated:
No
WP version:
6.3 or higher
PHP version:
7.4 or higher
Test up to WP version:
7.1
Total installations:
0
Last updated:
2026-08-30
Rating:
Times rated:
0
analytics
google-preferred-sources
google-search
preferred-source-button
publisher-tools