How do you check if your hotel is eligible for the preferred sources button?
Open google.com/preferences/source and enter your domain: if it appears, you can be selected, and if it does not, nothing on this page will help you yet.
Only domain and subdomain level sites are listed. hotelexample.com and blog.hotelexample.com are eligible. groupsite.com/hotelexample is not, which rules out a large number of properties that sit inside a chain or management-company site. That is worth five minutes before it is worth a sprint ticket.
What is the standard install code for the button?
The standard install is two lines: a script that loads Google’s publisher library, and an empty div that becomes the mount point Google replaces with the rendered button.
<script async src="https://news.google.com/swg/js/v1/publisher.js"></script>
<div google-add-preferred-source-btn data-theme="dark" data-lang="en"></div>
data-theme takes light or dark. Pick the one that reads against the surface you are placing it on, not the one that matches your brand colour: this is a Google-branded control, and a reader recognising it as one is the whole reason it converts better than a link.
data-lang overrides the language of the button text. Set it explicitly rather than letting it inherit, because a French-language property page rendering an English button looks like a third-party widget somebody forgot about.
How do you build a custom preferred sources button instead of the standard one?
Load the script in manual mode and call the API from your own click handler, if you want your own markup and your own styling.
<script async preferred-sources-control="manual" src="https://news.google.com/swg/js/v1/publisher.js"></script>
<script>
(self.PREFERRED_SOURCE = self.PREFERRED_SOURCE || []).push(function (preferredSource) {
preferredSource.init({ theme: 'dark', lang: 'en' });
document.querySelector('#myButton').addEventListener('click', function () {
preferredSource.addPreferredSource();
});
});
</script>
Use this sparingly. A button that does not look like Google’s asks the reader to trust an unfamiliar control with something they do not fully understand, and the confirmation step happens on Google’s side either way.
What fallback do you need in case the script gets blocked?
Keep a plain link to the source preferences tool as the floor, because the script is a third-party request that ad blockers, strict privacy settings and corporate networks will stop for some readers, leaving an empty space where your ask was meant to be.
<a href="https://www.google.com/preferences/source?q=hotelexample.com">Add us as a preferred source</a>
Replace hotelexample.com with your own domain. This lands the reader in the same tool with your site pre-filled. It is less polished and it always works.
How do you measure whether the button is actually working?
Fire an analytics event on your button and on the fallback link, because there is no preferred-source dimension in Search Console and no report in Analytics that will do this for you. You cannot see how many people selected you, and nobody can sell you that number either.
What you can own is the click. Label it honestly as intent rather than as a confirmed addition: the reader still has to confirm on Google’s side, and you will never learn whether they did.
That one event turns this from an act of faith into something you can compare across placements, which is the difference between knowing your footer button is dead and assuming it is working.
What should you check once the button is live?
Check four things: it renders on a real device rather than only your local build, the fallback link is present even when the script is blocked, the analytics event fires once per click, and it sits nowhere inside the booking flow.
- The button renders on a real device, not only in your local build, and on the locale variants of the page if you run any.
- The fallback link is present in the DOM even when the script is blocked. Test with an ad blocker on.
- The analytics event fires once per click, not once per page view.
- It is not inside the booking flow. Nothing goes between a guest and a completed reservation.
Where to put it is a longer answer than where to write it: see where to put the preferred sources button, which covers the nine placements worth using and the one we are not recommending yet.
See also: Google Preferred Sources: the publisher’s guide | What is a preferred source | Is it worth it for a small hotel | Where to put the preferred sources button