Title: Add as Preferred Source on Google
Author: Mathew
Published: <strong>2025 年 9 月 9 日</strong>
Last modified: 2026 年 6 月 8 日

---

搜索插件

![](https://ps.w.org/add-as-preferred-source/assets/banner-772x250.png?rev=3445686)

![](https://ps.w.org/add-as-preferred-source/assets/icon-256x256.png?rev=3445686)

# Add as Preferred Source on Google

 作者：[Mathew](https://profiles.wordpress.org/mathewt/)

[下载](https://downloads.wordpress.org/plugin/add-as-preferred-source.1.2.2.zip)

 * [详情](https://cn.wordpress.org/plugins/add-as-preferred-source/#description)
 * [评价](https://cn.wordpress.org/plugins/add-as-preferred-source/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/add-as-preferred-source/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/add-as-preferred-source/#developers)

 [支持](https://wordpress.org/support/plugin/add-as-preferred-source/)

## 描述

Add as Preferred Source on Google plugin displays a banner and inline button on 
your website that directs visitors to Google’s preferred sources feature. When clicked,
the banner takes users to Google’s preferences page where they can add your site
as a preferred source for their personalized search results.

**What it does:**

 * Displays a customizable banner on your website
 * Links to Google’s preferred sources feature
 * Allows users to set your site as a preferred source in their Google Search settings
 * Provides banner customization options (colors, text, position)
 * Includes device-specific display controls
 * Controls exactly where the banner appears with Display Rules (all pages, posts
   only, pages only, or front page only)
 * Excludes specific categories or individual posts/pages from showing the banner
 * Triggers the banner immediately on page load, after the visitor scrolls a set
   percentage, or after a time delay
 * Tracks impressions, clicks, and dismissals with a built-in 30-day analytics dashboard
 * **Custom text badge** — type your own button label for any language not in the
   built-in list; the badge renders with the Google logo in the same style as the
   official badges
 * **Inline badge style switcher** — choose between the full card layout (title,
   subtitle, badge) or a clean simple style that shows only the badge

**About Google Preferred Sources:**

Google’s preferred sources is a feature that allows users to indicate which sources
they want to see more of in their search results. This is a Google feature, not 
affiliated with this plugin. Users who add your site as a preferred source may see
your content more frequently in their personalized search results.

**DISCLAIMER:** This plugin is not associated with Google and was created to help
website owners make a banner and inline card for adding their sites to Google’s 
Preferred Source. The term “Google” is used solely to convey the plugin’s function,
and we are not related to Google in any way.

Thank you for using the Add as Preferred Source plugin 🙂 If you like it, please
leave a [★★★★★ rating](https://wordpress.org/support/plugin/add-as-preferred-source/reviews/#new-post)
to support us on WordPress.org to help us spread the word to the community.

**Plugin Features:**

 * Custom domain override for the Google Preferred Source link
 * Customizable banner text with website name variable
 * Color customization for background and text
 * Position control (top or bottom of page)
 * Device-specific display (mobile, desktop, or both)
 * Cookie-based dismissal (banner stays hidden for 7 days after user closes it)
 * Responsive design
 * Translation ready
 * **Display Rules** – show the banner everywhere, on posts only, pages only, or
   the front page only; exclude specific categories or individual post/page IDs
 * **Display Trigger** – show immediately on page load, after the visitor scrolls
   a configurable percentage of the page (10-90%), or after a set time delay (1-
   60 seconds)
 * **Click-Through Analytics Dashboard** – view 30-day impressions, clicks, dismissals,
   and click rate with a visual bar chart directly in the admin
 * **Custom Badge Text** – type your own button label for any language not in the
   built-in list; the badge renders with the Google “G” logo matching the official
   badge style
 * **Inline Badge Style** – switch the inline button between “Default” (full card
   with title and subtitle) and “Simple” (badge image only, no card)

**Technical Requirements:**

 * WordPress 5.0 or higher
 * PHP 7.2 or higher
 * Modern web browser with JavaScript enabled

### Configuration

After installation, go to **Settings > Add as Preferred Source** in your WordPress
admin to configure the plugin.

**Step 1: Basic Settings**

 * **Enable Banner:** Check this box to activate the banner on your website. The
   banner will not appear until this is enabled.
 * **Website Name:** Enter your website or publication name. This defaults to your
   WordPress site title but can be customized. This name will replace the {website_name}
   placeholder in your banner text.
 * **Custom Domain:** Override the URL used in the Google Preferred Source link.
   Leave this empty to use your site’s domain automatically (recommended). Only 
   set this if the link should point to a different URL – for example, if your WordPress
   site lives on a subdomain but your canonical domain is `https://example.com`.
 * **Banner Text:** Customize the message displayed to visitors. Default text is“
   Add as a preferred source on Google”. You can use the placeholder {website_name}
   anywhere in your text, and it will be automatically replaced with the website
   name you specified above.
    - Example: “Add {website_name} as your preferred source on Google”
    - Example: “Get more content from {website_name} – add us as a preferred source”
 * **Banner Position:** Choose where the banner appears on your website:
    - **Top:** Banner appears at the top of the page, above all content
    - **Bottom:** Banner appears at the bottom of the page (recommended for better
      user experience)

**Step 2: Appearance Customization**

 * **Banner Background Color:** Click the color picker to choose a background color
   that matches your website design. Default is dark gray (#1a1a1a).
 * **Text Color:** Select the color for the banner text and close button. Ensure
   good contrast with your background color for readability. Default is white (#
   ffffff).

**Step 3: Display Options**

 * **Show on Mobile:** Check this box to display the banner on mobile devices (phones
   and tablets).
 * **Show on Desktop:** Check this box to display the banner on desktop computers
   and laptops.

You can enable both, or choose to show the banner only on specific device types 
based on your audience preferences.

**Step 4: Save and Test**

 1. Click **Save Changes** to apply your settings
 2. Visit your website to see the banner in action
 3. Click the banner to test the Google redirect functionality
 4. Use the close (x) button to test the dismissal feature

**Testing Tips:**
 * Clear your browser cache and any server/plugin caches after
making changes * Test in incognito/private browsing mode to see the banner fresh*
Add a parameter to your URL (e.g., ?test=1) to bypass cache * Check on different
devices based on your display settings * The banner will stay hidden for 7 days 
after a user closes it

**Preview Feature:**
 The settings page includes a live preview that updates as 
you modify colors, text, and position. This helps you see how the banner will look
before saving changes.

**Step 5: Display Trigger**

Control when the banner appears to a visitor:

 * **Immediately on page load** – the banner shows as soon as the page finishes 
   loading (default behaviour).
 * **After user scrolls** – the banner only appears once the visitor has scrolled
   a set percentage of the page. You can choose any value between 10% and 90% in
   5% increments. Useful for keeping the banner out of the way until the reader 
   is engaged with your content.
 * **After a time delay** – the banner waits a number of seconds (1-60) before appearing.
   This lets visitors settle in before the prompt is shown.

**Step 6: Display Rules**

Target exactly which pages show the banner:

 * **Everywhere** – the banner appears on all pages and posts across your site (
   default).
 * **Posts only** – restricts the banner to single post pages.
 * **Pages only** – restricts the banner to static WordPress pages.
 * **Front page only** – shows the banner exclusively on your site’s home/front 
   page.

You can further refine visibility with two exclusion options:

 * **Exclude Categories** – search for and select any categories whose posts should
   never show the banner. The picker supports live search so you can find categories
   quickly without loading a long list.
 * **Exclude Post/Page IDs** – enter a comma-separated list of post or page IDs 
   to suppress the banner on specific pieces of content.

**Step 7: Analytics Dashboard**

Open the **Analytics** tab on the settings page to view banner performance over 
the last 30 days:

 * **Impressions** – how many times the banner was displayed to visitors.
 * **Clicks** – how many visitors clicked through to the Google preferences page.
 * **Dismissals** – how many visitors closed the banner without clicking.
 * **Click Rate** – the percentage of impressions that resulted in a click (clicks/
   impressions).

A colour-coded bar chart shows the daily breakdown of all three metrics so you can
spot trends at a glance. Data is stored locally in your WordPress database and requires
no third-party services.

## 屏幕截图

[⌊Plugin settings page with customization options and live preview⌉⌊Plugin settings
page with customization options and live preview⌉[

Plugin settings page with customization options and live preview

[⌊Banner display on website frontend as top⌉⌊Banner display on website frontend 
as top⌉[

Banner display on website frontend as top

[⌊Inline button card settings page with customization options and live preview
.
Inline button display on website frontend⌉⌊Inline button card settings page with
customization options and live preview
. Inline button display on website frontend⌉[

Inline button card settings page with customization options and live preview . Inline
button display on website frontend

[⌊Analytics page showing the impressions, clicks, dismissals, and click-through 
rate over 30 days⌉⌊Analytics page showing the impressions, clicks, dismissals, and
click-through rate over 30 days⌉[

Analytics page showing the impressions, clicks, dismissals, and click-through rate
over 30 days

## 安装

**Automatic Installation:** 1. Log in to your WordPress admin dashboard 2. Go to
Plugins > Add New 3. Search for “Add as Preferred Source” 4. Click “Install Now”
and then “Activate” 5. Go to Settings > Add as Preferred Source to configure

**Manual Installation:** 1. Download the plugin zip file 2. Upload via Plugins >
Add New > Upload Plugin 3. Activate the plugin 4. Go to Settings > Add as Preferred
Source to configure

**Configuration:** 1. Enable the banner in plugin settings 2. Customize banner text
and colors 3. Choose display position and device settings 4. Save settings

## 常见问题

### Is this plugin affiliated with Google?

No. This plugin is not associated with Google. It was created to help website owners
make a banner and inline card for adding their sites to Google’s Preferred Source.
The term “Google” is used solely to convey the plugin’s function, and we are not
related to Google in any way.

### What are Google preferred sources?

Google preferred sources is a feature that lets users indicate which sources they
prefer to see in their search results. This is a Google feature that affects individual
users’ personalized search results.

### Does this guarantee better search rankings?

No. This plugin only provides a way for users to access Google’s preferred sources
feature. It does not guarantee improved search rankings or visibility.

### How does the banner work?

The banner displays on your website according to your settings. When clicked, it
opens Google’s preferences page where users can add your site as a preferred source.

### Can I customize the banner appearance?

Yes. You can customize the text, colors, position, and choose which devices display
the banner.

### How long does the banner stay hidden after someone closes it?

The banner stays hidden for 7 days after a user closes it, using browser cookies
to remember the preference.

### Will this affect my website’s performance?

The plugin uses minimal resources and should not significantly impact website performance.

### Can I translate the plugin?

Yes, the plugin is translation ready and follows WordPress internationalization 
standards.

### Does the plugin work with all themes?

The plugin is designed to work with most WordPress themes. If you experience display
issues, check for theme conflicts or contact support.

### What should I do if the banner doesn’t appear?

 1. Ensure the banner is enabled in settings
 2. Check device display settings match your current device
 3. Clear all browser and server caches
 4. Test in incognito/private browsing mode
 5. Verify there are no JavaScript errors in browser console

### Can I use this on multiple websites?

Yes, you can install this plugin on multiple WordPress sites. Each installation 
has separate settings.

## 评价

![](https://secure.gravatar.com/avatar/6142ea9b7bf3a24ffc02822f4becc199835c1ea1c25ba7745e89413c11eff870?
s=60&d=retro&r=g)

### 󠀁[LOVE IT](https://wordpress.org/support/topic/love-it-4371/)󠁿

 [ahmed elhddad](https://profiles.wordpress.org/ahmed-elhddad/) 2026 年 5 月 1 日
1 回复

It’s simple, smart, and works very well. I only need to make a few adjustments to
my site since it uses Arabic.

 [ 阅读所有1条评价 ](https://wordpress.org/support/plugin/add-as-preferred-source/reviews/)

## 贡献者及开发者

「Add as Preferred Source on Google」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Mathew ](https://profiles.wordpress.org/mathewt/)

[帮助将「Add as Preferred Source on Google」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/add-as-preferred-source)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/add-as-preferred-source/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/add-as-preferred-source/)，或通过
[RSS](https://plugins.trac.wordpress.org/log/add-as-preferred-source/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/add-as-preferred-source/)。

## 更新日志

#### 1.2.2

 * New: Localized Google badge support – the “Add as Preferred Source on Google”
   button now displays in the site’s default language automatically based on the
   site locale.
 * New: Badge Language setting in Banner Settings – choose from 17 supported languages(
   Danish, German, Spanish, Estonian, Finnish, French, Hindi, Hebrew, Japanese, 
   Korean, Norwegian, Brazilian Portuguese, Russian, Swedish, Turkish, Ukrainian,
   and English) or leave it on “Auto” to match your site language.
 * Improvement: More languages will be added with each update! Stay tuned!
 * New: Custom text badge – select “Custom text (for other languages)” in the Badge
   Language setting and type your own button label. The badge renders with the Google“
   G” logo and your text, styled to match the official badge, so any language is
   supported.
 * New: Inline badge style switcher – a new “Badge Style” setting in the Inline 
   Button tab lets you choose between “Default” (full card with title and subtitle)
   and “Simple” (badge image only, no card). The Simple style hides the card-specific
   fields in the admin and shows only the badge on the frontend.

#### 1.2.1

 * New: Custom Domain setting – override the domain used in the Google Preferred
   Source link based on your preference.

#### 1.2

 * New: Analytics dashboard added – track impressions, clicks, dismissals, and click-
   through rate over 30 days.
 * New: Display Rules – restrict the banner to posts only, pages only, or front 
   page only; exclude specific categories or post/page IDs.
 * New: Display Trigger – show the banner immediately on page load, after the visitor
   scrolls a configurable percentage, or after a time delay.
 * Improvement: Public-facing JavaScript rewritten in vanilla JS – jQuery dependency
   removed, script loads in footer.
 * Improvement: Banner is now keyboard-accessible (`role="button"`, `tabindex="0"`,`
   Enter`/`Space` key support).
 * Improvement: Close button selector scoped to the banner element to avoid conflicts
   with other plugins or themes.

#### 1.1

 * New: Refactored Inline Button with a modern card design.
 * New: Added “Post Types” selection for inline button (replacing Content Type).
 * New: Added Background and Text Color pickers for the inline button.
 * New: Added “Inline Subtitle” option.
 * Improvement: Inline button now uses standard Flexbox layout (Layout 2).
 * Improvement: Fixed image display issues.
 * Cleanup: Removed “Alignment” settings.

#### 1.0.0

 * Initial release
 * Banner display functionality
 * Customization options for text, colors, and position
 * Device-specific display controls
 * Cookie-based dismissal system
 * Responsive design
 * Translation support

## 额外信息

 *  版本 **1.2.2**
 *  最后更新：**11 小时前**
 *  活跃安装数量 **100+**
 *  WordPress 版本 ** 5.0 或更高版本 **
 *  已测试的最高版本为 **7.0**
 *  PHP 版本 ** 7.2 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/add-as-preferred-source/)
 * 标签
 * [google search](https://cn.wordpress.org/plugins/tags/google-search/)
 *  [高级视图](https://cn.wordpress.org/plugins/add-as-preferred-source/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/add-as-preferred-source/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/add-as-preferred-source/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/add-as-preferred-source/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/add-as-preferred-source/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/add-as-preferred-source/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/add-as-preferred-source/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/add-as-preferred-source/reviews/)

## 贡献者

 *   [ Mathew ](https://profiles.wordpress.org/mathewt/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/add-as-preferred-source/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://seoactionplan.com/extdonate)