
Google just posted an update to the new Favorites documentation, offering more customization and updated JavaScript code (though you can still use the old code if you want). A reminder: Google combined Preferred Sources and the Follow feature into a single Google Favorites feature earlier this week.
The updated docs say there is a new section about customizing the "Add to favorites" button label with the data-label attribute (default, source, or creator). Google also updated the JavaScript button examples to use the new google-favorites-btn attribute but the old code will work fine.
Google wrote, "You can now choose a button label that better describes whether readers are adding a publication or a creator to their favorites. If you already use the google-add-preferred-source-btn attribute, your button continues to work and you don't need to change your code."
The docs now say:
- That you can customize the button label
- Google updated the div google-favorites-btn
- Google noted "If you already added the button with the google-add-preferred-source-btn attribute, your existing implementation continues to work and automatically displays the updated "Add to favorites" branding. You don't need to change your code."
- By default, the button displays "Add to favorites". To clarify whether readers are adding a publication, author, or creator, add the data-label attribute to your div element and set it to default, source, or creator. Choose the button label that makes sense for your site: default: "Add to favorites", source: "Add source to favorites" and creator: "Add creator to favorites".
- And misc code updates are in the updated docs
Add us as a favorite please:
Google is also still migrating to this new feature, and follower counts should return next week.
Forum discussion at X.

