The simplest method for integrating Google Preferred Sources is zero-configuration automatic initialization using a standard <button> element.
Below is a live interactive Add Preferred Source button rendered automatically by publisher.js:
publisher.js client library in your HTML page using async or defer.<button google-add-preferred-source-btn></button> tag anywhere you want the interaction button to render.<!DOCTYPE html>
<html>
<head>
<script async src="https://news.google.com/swg/js/v1/publisher.js"></script>
</head>
<body>
<button google-add-preferred-source-btn></button>
</body>
</html>