Linux 软件免费装
Banner图

SourceCue Button for Google Preferred Sources

开发者 souravpan
更新时间 2026年8月30日 15:25
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

analytics google search publisher tools google preferred sources preferred source button

下载

1.6.21

详情介绍:

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: 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. Official Google Preferred Sources badges 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. 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: 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: 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: Inline button alignment can be set independently to: 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: 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: 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. Display triggers 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. Desktop, tablet, and mobile visibility 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. Banner and alert dismissal controls 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. Public Preferred Sources click counter 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. 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: 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. 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: 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: 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: 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: 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: 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.

安装:

  1. Upload the plugin ZIP from Plugins > Add New > Upload Plugin, or install it from WordPress.org after publication.
  2. Activate "SourceCue Button for Google Preferred Sources".
  3. Go to Settings > Preferred Sources.
  4. Confirm the source domain or subdomain and choose an implementation method.
  5. Configure display rules, presentation, and optional analytics.
  6. Save the settings and test the result on the front end.

常见问题:

Is this plugin affiliated with Google?

No. It is an independent WordPress plugin that implements Google's publicly documented Preferred Sources methods.

Does the plugin make my site eligible for Preferred Sources?

No. Google controls eligibility. Preferred Sources eligibility is domain/subdomain based, and a subdirectory such as example.com/blog is not a separately eligible source.

Which implementation should I use?

Google recommends the Standard JavaScript implementation. Use Advanced when you need a custom button design, or Deeplink when you want a regular link or locally served official badge.

Does this improve search rankings?

The plugin does not guarantee rankings or traffic. It only provides controls that help readers access Google's Preferred Sources feature.

Does the plugin track visitors?

Optional analytics is disabled by default and uses aggregate local counters only. It does not build visitor profiles. Standard and Advanced modes do load Google's documented external SDK when rendered; see External services for details.

Does the public counter show confirmed preferred-source selections?

No. It counts clicks on the Preferred Sources action. Google does not provide this plugin with a confirmed-completion callback for a successful selection.

Does the plugin use cookies for banner dismissal?

No. Dismissal settings use browser sessionStorage/localStorage.

Does it work with caching plugins?

The front-end visibility rules are designed to be cache friendly. The plugin also offers an optional cache purge after its settings are saved when a supported cache plugin is detected.

Does it require jQuery?

No.

What happens to plugin data when I uninstall it?

Full cleanup is enabled by default. Deleting the plugin removes its settings, public click counter, analytics database-version option, custom analytics table, and scheduled plugin events. You can turn off database cleanup in Advanced & Usage > Data Management if you intentionally want to keep the stored settings and analytics for a later reinstall. Scheduled plugin events are always removed because the plugin code will no longer be present.

更新日志:

1.6.21 1.6.20 1.6.19 1.6.18 1.6.16 1.6.15 1.6.13 1.6.12 1.6.11 1.6.10 1.6.9 1.6.8 1.6.7 1.6.6 1.6.5 1.6.4 1.6.1 1.6.0 1.5.1 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0