Title: Add as Preferred Source on Google
Author: Mathew
Published: <strong>Onwa-atö 9, 2025</strong>
Last modified: Onwa-atö 7, 2026

---

Search plugins

![](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

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

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

 * [Details](https://ibo.wordpress.org/plugins/add-as-preferred-source/#description)
 * [Reviews](https://ibo.wordpress.org/plugins/add-as-preferred-source/#reviews)
 *  [Installation](https://ibo.wordpress.org/plugins/add-as-preferred-source/#installation)
 * [Development](https://ibo.wordpress.org/plugins/add-as-preferred-source/#developers)

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

## Description

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 for the banner (show it on mobile, 
   desktop, or both)
 * 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
 * Controls what happens after a visitor closes the banner – hide it for a configurable
   number of days, or show it again on every page view
 * Tracks impressions, clicks, and dismissals with a built-in 30-day analytics dashboard
 * **Shortcode** – drop [preferred_source] anywhere you want the button: mid-article,
   in a widget, or in a page builder
 * **Block editor block** – an “Add as Preferred Source” block with style, alignment,
   text, and color controls in the sidebar and a live preview as you type
 * **Template tag** – call adasprso_preferred_source() from a theme file for spots
   a shortcode cannot reach
 * **Its own Shortcode settings tab** – manual placements have their own style, 
   wording, and colors, separate from the automatic inline button
 * **Localized Google badge** – the official badge ships in 17 languages, with an
   Auto mode that matches your site language
 * **Dark and Light badge themes** – pick the badge variant that best fits your 
   design
 * **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 from six layouts: Default (full card),
   Simple (badge only), Strip (slim single line), Pill (compact rounded chip), Link(
   editorial text with inline badge), or Boxed (icon tile with an action button)
 * Inline button with its own position (above content, below content, or both), 
   post type targeting, color pickers, and customizable title and subtitle
 * Automatically clears page caches from popular caching plugins when you save settings,
   so changes go live immediately

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

**3 Ways to Let Visitors Add Your Site:**

On the Implementation Method tab, pick whichever of these fits you best. You can
switch anytime, and it takes one click.

 * **Simple Link** – The classic option. We show your badge or banner, and it links
   straight to Google’s page where the visitor adds your site. Nothing to load, 
   nothing to set up.
 * **Your Own Design** _(recommended)_ – Keep the exact look you already have – 
   your colors, your text, your badge – but have it talk to Google the “official”
   way behind the scenes, instead of just a plain link.
 * **Google’s Own Button** – Let Google handle it completely. Google shows its own
   ready-made button on your site, in light or dark, in the visitor’s own language.
   The fastest option if you don’t want to fuss with any design at all.

**Place the Button Exactly Where You Want:**

The banner and the inline button are placed for you automatically. When you want
to decide the spot yourself, there are three separate ways to do it – all of them
share the settings on the **Shortcode** tab, so they look identical wherever you
use them.

 * **1. Shortcode** – `[preferred_source]` works anywhere shortcodes run: the post
   editor, a Shortcode block, a text widget, or most page builders. Attributes let
   you override any setting for that one placement, for example `[preferred_source
   style="pill" align="left"]`.
 * **2. Block** – the **“Add as Preferred Source”** block for the block editor (
   Gutenberg). Search for it in the block inserter, drop it in, and set the style,
   alignment, text, and colors in the block sidebar. The block previews the real
   button right in the editor, so you see the result before you publish. Nothing
   to type and no shortcode syntax to remember.
 * **3. Template tag** – `<?php adasprso_preferred_source(); ?>` in a theme file,
   for a sidebar, header, footer, or custom template where a shortcode cannot go.

Manual placements are independent: they ignore the “Enable inline button” toggle,
the post type list, and the banner Display Rules. Where you put the button is where
it appears.

**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 for the banner (mobile, desktop, or both) – the inline
   button is not affected by these settings and appears on all devices
 * Cookie-based dismissal with a configurable hide duration (1-365 days, default
   7), or switch to showing the banner again on every page view
 * 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
 * **Badge Language** – choose from 17 official badge 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
 * **Badge Theme** – switch between the Dark (default) and Light versions of the
   official Google badge, with a live preview in the settings
 * **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 Button** – an in-content card with its own enable toggle, position (
   above content, below content, or both), post type targeting (posts, pages, and
   custom post types), background and text color pickers, and customizable title
   and subtitle
 * **Inline Badge Style** – switch the inline button between “Default” (full card),“
   Simple” (badge image only), “Strip” (slim single line), “Pill” (compact rounded
   chip), “Link” (editorial text with inline badge), or “Boxed” (icon tile, headline,
   and action button)
 * **[preferred_source] Shortcode** – place the button by hand anywhere shortcodes
   run, with per-placement attributes for style, alignment, text, subtitle, colors,
   and CSS class; `[adasprso_preferred_source]` is available as an alias if another
   plugin already uses the short tag
 * **“Add as Preferred Source” Block** – a native block editor block with sidebar
   controls for style, alignment, text, and colors, and a live server-rendered preview
   inside the editor
 * **Template Tag** – `adasprso_preferred_source()` for theme files, taking the 
   same options as an array
 * **Shortcode Settings Tab** – manual placements get their own badge style, alignment,
   wording, and colors, kept separate from the inline button, plus a live preview,
   copy-to-clipboard snippets, and a full attribute reference
 * **Avoid Duplicates** – optionally skip the automatic inline button on posts that
   already place the button by hand
 * **Automatic Cache Clearing** – saving settings purges page caches from popular
   caching plugins (WP Rocket, W3 Total Cache, WP Super Cache, LiteSpeed Cache, 
   and more) so changes go live immediately
 * **Lightweight and Accessible** – CSS and JavaScript load only on pages that actually
   show the banner or button, assets are minified, and the banner is fully keyboard
   accessible

**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”
 * **Badge Language:** Choose which language to use for the Google badge image. “
   Auto” detects your site’s language automatically and falls back to English if
   the language is not available. 17 languages are included: Danish, German, Spanish,
   Estonian, Finnish, French, Hindi, Hebrew, Japanese, Korean, Norwegian, Brazilian
   Portuguese, Russian, Swedish, Turkish, Ukrainian, and English. **If your language
   is not listed, select “Custom text (my language is not listed)”** – this lets
   you type your own button label, and a badge will be generated with the Google
   logo and your text, styled to match the official badges.
 * **Badge Theme:** Choose between the Dark (default) and Light versions of the 
   badge. Dark works best on light-colored banner backgrounds; Light works best 
   on dark-colored backgrounds.
 * **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)
 * **After Visitor Closes Banner:** Decide what happens when a visitor clicks the
   close (x) button:
    - **Hide it for a number of days (uses a cookie):** The banner stays hidden 
      for the duration you set in the **Hide Duration (days)** field (1-365 days,
      default 7). This matches the behaviour of earlier versions and remains the
      default for sites updating from an older version.
    - **Show it again on every page view (ignores the cookie):** Closing the banner
      only hides it for the current page. It appears again on the next page view,
      wherever your Display Rules allow it. This is the default for new installs.

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

**Notes on device detection:**

 * These settings apply to the banner only. The inline button appears on all devices
   regardless of these checkboxes.
 * Device detection is user-agent based (WordPress’s `wp_is_mobile()` function),
   so tablets are treated as mobile devices.
 * On sites with full-page caching, a cached page may have been generated for a 
   different device type, so the banner can occasionally appear or stay hidden on
   the “wrong” device until the cache refreshes.

**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 after a user
closes it for the number of days you set (7 by default), unless you choose the “
every page view” option

**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 …

## Screenshots

[⌊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 card settings page with customization options and live preview⌉[

Inline button card settings page with customization options and live preview

[⌊Inline button display on website frontend⌉⌊Inline button display on website frontend⌉[

Inline button display on website frontend

## Blocks

This plugin provides 1 block.

 *   Add as Preferred Source Invite readers to add your site as a preferred source
   on Google. Place it anywhere; anything you leave blank uses your Shortcode tab
   settings.

## Installation

**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 5. Optional:
open the **Shortcode** tab if you would rather place the button yourself with `[
preferred_source]`, the “Add as Preferred Source” block, or the template tag

## FAQ

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

### What if my site is not showing on Google’s preferences page?

The plugin only opens Google’s preferred sources page with your domain pre-filled–
whether your site can actually be selected there is decided entirely by Google. 
If your site does not appear, check the following:

 1. **Verify the domain the plugin is sending.** If you use the Custom Domain setting,
    make sure it exactly matches your site’s canonical domain (including the correct
    subdomain, such as www). Leave it empty to use your site’s domain automatically.
 2. **Make sure your site is indexed by Google.** Search for `site:yourdomain.com` 
    on Google. If nothing appears, your site is not indexed yet – set up [Google Search Console](https://search.google.com/search-console)
    and submit your sitemap.
 3. **Check feature availability in your region.** Google’s preferred sources feature
    is only available in certain countries and languages, so some visitors may not 
    be able to use it even when your site is eligible.
 4. **Sign in to a Google account.** Visitors must be signed in to Google for the preferences
    page to work.
 5. **Be patient with newer sites.** Google generally surfaces established, regularly
    publishing sites in this feature. If your site is new or rarely indexed in Google’s
    news surfaces, it may take time before it becomes selectable.

If your site is indexed and the domain is correct but it still cannot be added, 
the limitation is on Google’s side – there is unfortunately nothing the plugin can
change about that.

### What’s the difference between Simple Link, Your Own Design, and Google’s Own Button?

They’re three ways to let a visitor add your site, and you pick one on the Implementation
Method tab:

 * **Simple Link** just shows your badge/banner as a link to Google’s page – the
   original, no-frills option.
 * **Your Own Design** keeps your exact look (colors, text, badge) but connects 
   to Google the official way behind the scenes.
 * **Google’s Own Button** hands the whole button over to Google – it draws its 
   own, ready-made button for you.

If you’re not sure which to pick, “Your Own Design” is a safe default – you keep
the look you already have.

### 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?

That depends on the “After Visitor Closes Banner” setting. New installs show the
banner again on every page view, so closing it only hides it for the current page
and no dismissal cookie is stored. Sites that updated from an older version keep
the cookie-based behaviour: the banner stays hidden for 7 days by default, and you
can change this duration to anything between 1 and 365 days.

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

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

### Does the plugin send any data to external services?

The banner, inline button, and analytics features run entirely on your site – no
visitor data ever leaves your WordPress database.

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

### Why does the banner show (or not show) on the wrong device?

Device detection is based on the visitor’s user agent, so tablets are treated as
mobile devices. Also note that the “Show on Mobile” and “Show on Desktop” settings
apply to the banner only – the inline button appears on all devices. If you use 
a full-page caching plugin, a page cached for one device type may be served to another,
which can make the banner appear or stay hidden on the wrong device until the cache
refreshes. Caching plugins that support separate mobile caches avoid this.

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

### How do I put the button in a specific place?

Three ways, and they all share the same settings under **Settings > Add as Preferred
Source > Shortcode**:

 1. **Shortcode** – paste `[preferred_source]` where you want it, in the editor, a 
    Shortcode block, a text widget, or a page builder.
 2. **Block** – insert the “Add as Preferred Source” block in the block editor.
 3. **Template tag** – call `<?php adasprso_preferred_source(); ?>` in a theme file.

### How do I use the shortcode?

Set your defaults on the Shortcode tab, then paste `[preferred_source]` at the exact
spot you want the button. To change just that one placement, add attributes: `[preferred_source
style="pill" align="left" text="Follow us on Google"]`.

Optional attributes: `style` (default, simple, strip, pill, link, boxed), `align`(
left, center, right), `text`, `subtitle`, `prefix`, `suffix`, `bg_color`, `text_color`,
and `class`. Anything you leave out uses your saved settings.

### How do I use the block?

In the block editor, click the **+** inserter where you want the button, search 
for **“Add as Preferred Source”**, and insert it. The block renders the real button
right away using your Shortcode tab settings, and the block sidebar lets you change
the style, alignment, text, and colors for that one placement. Leave a sidebar field
blank and it keeps following your saved settings.

### What is the difference between the block and the shortcode?

Nothing, in the output – both use the same renderer and produce the same button.
The block is the friendlier option in the block editor: you pick options from menus
and color pickers instead of typing attributes, and you see the result while you
edit. The shortcode is the portable option: it also works in the classic editor,
text widgets, and page builders, and it can be pasted into content that is generated
elsewhere.

### Can I use it more than once on the same page?

Yes. Use as many shortcodes or blocks as you like, and give each one its own attributes
if you want them to differ.

### Does the shortcode or block need the inline button enabled?

No. The shortcode, the block, and the template tag are independent of the “Enable
inline button” toggle, the post type list, and the banner Display Rules – they render
wherever you place them. If you use both and a post ends up showing the button twice,
turn on **Avoid Duplicates** on the Shortcode tab.

### Does it work with Elementor, Divi, and other page builders?

Yes. Use the builder’s own shortcode or text widget and paste `[preferred_source]`
into it. The stylesheet loads automatically wherever the button is rendered, including
inside builders and widgets.

### My shortcode prints the text instead of the button. What happened?

That means the shortcode was not executed. Check that you pasted it into a field
that runs shortcodes (a Shortcode block, a Text widget, or a builder’s shortcode
element – not a “plain text” or code field), that the brackets are straight `[` `]`
rather than smart quotes copied from a document, and that the plugin is active.

### Another plugin already uses [preferred_source]. What now?

Use `[adasprso_preferred_source]` instead – it is the same shortcode under a prefixed
name.

### Can I style the button myself?

Yes. Add `class="my-class"` to the shortcode and target it in your theme’s CSS. 
The wrapper also carries `adasprso-inline-container`, plus `adasprso-manual-container`
on every manual placement and an `adasprso-align-left|center|right` class.

## Reviews

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

### 󠀁[I Like It](https://wordpress.org/support/topic/i-like-it-1092/)󠁿

 [CuriousIndividual](https://profiles.wordpress.org/paramime/) Onwa-atö 26, 2026

Well it's certainly faster than trying to implement this myself.

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

### 󠀁[Good](https://wordpress.org/support/topic/good-9204/)󠁿

 [DEVOPIAX TEAM](https://profiles.wordpress.org/devopiax/) Onwa-atö 14, 2026

Good

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

### 󠀁[Good plugin](https://wordpress.org/support/topic/good-plugin-7364/)󠁿

 [](https://profiles.wordpress.org/orelweb/) Onwa-mbu 31, 2026 1 reply

Tiny but effective. I'd recommend to others to use. They can help others to find
your articles faster and more often.

![](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/) Onwa-iri na otu 
1, 2026 1 reply

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

 [ Read all 4 reviews ](https://wordpress.org/support/plugin/add-as-preferred-source/reviews/)

## Contributors & Developers

“Add as Preferred Source on Google” is open source software. The following people
have contributed to this plugin.

Contributors

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

[Translate “Add as Preferred Source on Google” into your language.](https://translate.wordpress.org/projects/wp-plugins/add-as-preferred-source)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/add-as-preferred-source/),
check out the [SVN repository](https://plugins.svn.wordpress.org/add-as-preferred-source/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/add-as-preferred-source/)
by [RSS](https://plugins.trac.wordpress.org/log/add-as-preferred-source/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.3.0

 * New: “Implementation Method” setting (new first tab in Settings) – choose how
   the “add as preferred source” flow works: “Simple Link” (the classic link, unchanged),“
   Your Own Design” (recommended – keeps your banner/badge design, now backed by
   Google’s official integration), or “Google’s Own Button” (Google renders and 
   styles its own button; you choose theme, language, and whether it appears in 
   the banner area or inline in your content).
 * New installs start on “Your Own Design”. Existing installs keep “Simple Link”
   automatically after updating – nothing changes until you choose to switch.
 * New: [preferred_source] shortcode – place the button exactly where you want it,
   in a post, a page, a text widget, or a page builder. Every option is available
   as an attribute: style, align, text, subtitle, prefix, suffix, bg_color, text_color,
   and class.
 * New: “Add as Preferred Source” block for the block editor, with style, alignment,
   text, and color controls in the sidebar and a live preview.
 * New: adasprso_preferred_source() template tag for theme files, for spots a shortcode
   cannot reach.
 * New: “Shortcode” settings tab – its own style, alignment, text, and colors for
   manual placements, kept separate from the Inline Button tab, plus a live preview,
   copy-to-clipboard snippets, and an attribute reference.
 * New: “Avoid Duplicates” setting – skip the automatic inline button on posts that
   already place the button by hand.
 * Manual placements ignore the “Enable inline button” toggle, the post type list,
   and the banner display rules: where you put the button is where it appears.
 * Fix: The inline button banner no longer leaks into auto-generated excerpts and
   SEO meta descriptions (e.g. Yoast, RankMath) when a post has no manually set 
   excerpt.

#### 1.2.4

 * New: Four new Inline Button styles – “Strip” (a slim single-line bar), “Pill”(
   a compact rounded chip), “Link” (an editorial sentence with the badge inline),
   and “Boxed” (an icon tile with headline, subtext, and a solid action button) –
   joining the existing Default and Simple styles.
 * Accessibility: Fixed a nested-interactive-control issue on the banner – the clickable“
   open Google preferences” area is now scoped to the banner content instead of 
   the whole banner, so the close (x) button is no longer nested inside another 
   element exposing button semantics to assistive technology.
 * Accessibility: Added a visible keyboard focus outline on the banner’s close button,
   so it stays visible regardless of your chosen banner colors.
 * Performance: Saving settings no longer triggers a cache-plugin purge when nothing
   actually changed, avoiding unnecessary cache clears from repeated saves.

#### 1.2.3

 * New: Badge Theme setting – choose between the Dark (default) and Light versions
   of the official Google badge. The light badge works best on dark backgrounds.
 * New: Light badge images added for all 17 supported languages, with live preview
   in the settings page when switching theme or language.
 * New: “After Visitor Closes Banner” setting – control what happens when a visitor
   dismisses the banner. Keep the cookie-based behaviour with a configurable hide
   duration (1-365 days), or show the banner again on every page view.
 * New: “Hide Duration (days)” setting – the dismissal period is no longer fixed
   at 7 days; choose any duration between 1 and 365 days.
 * Performance: Analytics impressions are now counted once per visitor per day instead
   of on every page view, dramatically reducing server requests on busy sites. Clicks
   and dismissals are still tracked every time.
 * Performance: Tracking requests now use sendBeacon, so they never delay page rendering
   or the click-through to Google.
 * Performance: Banner CSS and JavaScript only load on pages where the banner or
   inline button will actually appear, respecting Display Rules, device settings,
   and inline post type selections.
 * Performance: Admin code is no longer loaded on front-end requests.
 * Performance: Front-end CSS and JavaScript are now served minified (about 50% 
   smaller).
 * Fix: The inline button card no longer stretches across the full screen width 
   on pages built with Elementor – it is now capped at a readable width and centered.
   
   You can consider a domation to support the project and new features.

#### 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 (my language is not listed)” 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

## Meta

 *  Version **1.3.0**
 *  Last updated **3 weeks ago**
 *  Active installations **700+**
 *  WordPress version ** 5.0 or higher **
 *  Tested up to **7.1.2**
 *  PHP version ** 7.2 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/add-as-preferred-source/)
 * Tag
 * [google search](https://ibo.wordpress.org/plugins/tags/google-search/)
 *  [Advanced View](https://ibo.wordpress.org/plugins/add-as-preferred-source/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  4 5-star reviews     ](https://wordpress.org/support/plugin/add-as-preferred-source/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/add-as-preferred-source/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/add-as-preferred-source/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/add-as-preferred-source/reviews/?filter=2)
 *  [  0 1-star reviews     ](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)

[See all reviews](https://wordpress.org/support/plugin/add-as-preferred-source/reviews/)

## Contributors

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

## Support

Issues resolved in last two months:

     1 out of 1

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

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://seoactionplan.com/extdonate)