> MODIFICA RILEVATA ·
Rinomina 'Preferred Sources' in 'Favorites'
Google ha rinominato completamente la feature da 'Preferred Sources' a 'Favorites' in tutta la documentazione. Cambiano i testi dei badge, gli URL dei deeplink (da /preferences/source a /preferences/favorites), i nomi delle classi HTML e le istruzioni di implementazione. È aggiunto un avviso importante: chi ha asset custom con branding 'Preferred Sources' deve aggiornare il testo a 'Add to favorites'.
- Documento:
- Google Preferred Sources
- Righe:
- +27 −25
- Importanza:
- ★★★★☆
- Edizione:
- feed del 2 dicembre 2026
> PRIMA E DOPO
testo aggiunto
testo tolto
in grigio il contesto invariato
riga 5
Send feedback
# Help your readers find your site through preferred sourcesfavorites in Google Search
If you're a website owner, you can help your audience find your publication as a preferred sourcefavorite in Google Search. When a user selectsadds your site asto atheir preferred sourcefavorites, your content is more likely to appear in "Top Stories", highlighted with a "preferredFavorite" badge. In AI Mode and AI Overviews, your content canis bemore likely to appear as a supporting link, highlighted with a "preferredFavorite" badge for users who have selected your site as a preferred sourcefavorite.
## Feature availability
The preferred sourcesfavorites feature is available globally for the "Top Stories" feature in all languages where Google Search is available.
Only domain-level and subdomain-level sites are eligible to appear in the source preferencesfavorites tool. For example, `https://www.example.com/` and `https://code.example.com/` are eligible for preferred sourcesfavorites, but the subdirectory `https://www.example.com/blog` isn't eligible.
## How to help users find your site as a preferred sourcefavorite
If your site appears in the source preferencesfavorites tool (to check, enter your site in the tool's search box), you can use the following methods to guide your readers to select your site as a preferred sourcefavorite:
**Important** : If you have a custom design asset or deeplink implementation with "Preferred Sources" branding, update your implementation to use the "Add to favorites" text.
* **Standard JavaScript implementation** **(recommended)** : Embed an interactive button to your web pages, which lets readers seamlessly add your site to their favorites and returns them to your page. By adding only two lines to your HTML, this option renders an automatically localized, Google-styled button that supports device and language customization.
* **Advanced JavaScript implementation with custom design assets**: If you want to use your own design assets and customize the standard JavaScript button, follow the advanced JavaScript implementation instructions. The end-user UI flow remains the same as the standard JavaScript implementation.
* **Deeplink implementation**: If you can't implement the interactive button (for example, your CMS doesn't support it), you can use a deeplink to direct people to adding your site asto atheir preferred sourcefavorites. You can do this by adding a text link or a clickable image on your web pages. You can also use the deeplink in your social posts, email newsletters, or promotions.
These methods are examples of how you can build your audience and help people find your site as a preferred sourcefavorite. It's not required to do them in order to appear as a preferred sourcefavorite.
### Standard JavaScript implementation (recommended)
By adding only two lines to your HTML, you can add an automatically translated, interactive button, which lets readers seamlessly add your site asto atheir preferred sourcefavorites and return to where they left off on your page. You can also set the theme of the button (dark or light), plus override the button language. We recommend this implementation because it provides the best user experience for readers.
Here's how it'll looklooks:
To embed the JavaScript button on your web page, do the following:
1. Add the following `<script>` tag to your web page (preferably in the `<head>` element), which loads the preferred sourcesfavorites library.
<script async src="https://news.google.com/swg/js/v1/publisher.js"></script>
riga 47
#### Set the button theme
By default, the "Add to preferred sourcesfavorites" button appears in a light theme. To adjust the theme, add the `data-theme` data attribute to your `<div>` element and set it to either `light` or `dark`:
riga 54
#### Override the button language
By default, the "Add to preferred sourcesfavorites" button displaysappears in the user's language based on their browser settings. To override this behavior, add the `data-lang` data attribute to your `<div>` element and set it to the language code you'd prefer (download the list of supported language codes):
riga 65
By default, the standard JavaScript button automatically scans the DOM for elements with the `google-add-preferred-source-btn` attribute and renders the standard badge. However, for custom integrations where you want to trigger the flow from your own UI elements or application milestones, you can initialize the client programmatically and bind the flow to custom triggers.
When integrating the preferred sourcesfavorites library into custom user interfaces, application milestones, or modern framework applications, you can take full programmatic control over runtime settings and flow initiation using our JavaScript SDK. We provide two distinct integration approaches depending on your tooling and architecture: ES Module imports (ESM) and standard script callback queues (IIFE). Both distribution models expose identical capabilities and methods.
#### ES Module imports
riga 94
<script async preferred-sources-control="manual" src="https://news.google.com/swg/js/v1/publisher.js"></script>
**Note** : If the `preferred-sources-control="manual"` attribute is omitted, it'llthe searchlibrary searches for and immediately initializeinitializes any elements with the `google-add-preferred-source-btn` attribute.
Then use the global `PREFERRED_SOURCE` callback queue to initialize options and bind custom triggers:
riga 116
</script>
For interactive frontend and backend implementations showcasing live usage across buttons, declarative containers, IIFE scripts, and ES Module bundles, explore the preferred sourcesfavorites demo.
### Deeplink implementation
If you can't use JavaScript on your website, you can alternatively use a deeplink to direct your users to the source preferencesfavorites tool, where they can add your site asto atheir preferred sourcefavorites and confirm their selection.
Use the following URL format and replace `example.com` with your publication's domain name, which takes users directly to your site in the source preferencesfavorites tool:
https://www.google.com/preferences/sourcefavorites?q=Your_Website's_URL
#### Example text link
riga 131
<a
href="https://www.google.com/preferences/sourcefavorites?q=example.com">
Add to favorites
</a>
riga 139
<a
href="https://www.google.com/preferences/sourcefavorites?q=example.com">
<img src="path/to/your/button.png" alt="Add asto Preferred Sourcefavorites">
</a>
Il testo nel confronto è tratto da developers.google.com, pubblicato da Google in licenza CC BY 4.0, convertito in testo semplice. Il riassunto è generato con l'AI a partire dal diff e non è rivisto editorialmente.