Implementing the Take Action Button

What is it?

The Take Action Button (TAB) empowers readers to take action on the news by connecting readers with relevant nonprofits working on the issues in the articles. It uses sophisticated artificial intelligence to automatically identify the "causes" in news articles and matches readers with local nonprofit campaigns where readers can get involved. The Public Good platform has 1.1 million nonprofits nationwide in which readers can connect to any nonprofit in their local community. 

You can start using the Public Good Take Action button right now! We offer two ways to implement the button: if you have a WordPress blog, you can install our Wordpress plugin or you can embed a small snippet of JavaScript in your site.

Both options enable full data reporting including sessions, click through rate and conversion rate.


Create a profile for your organization

First you'll have to create a profile for your organization at After your profile has been created, it will need to be approved by a member of our staff (which should be a very quick process). Take note of your organization's slug - the slug is the part of your Public Good url which follows "".

If you run into any issues creating your profile, send us a note at


Add the TAB using the standard implementation

Include the script tag

Add the Take Action Button code to your website by inserting the following script tag.  This script tag will need to be included on any page where the Take Action Button will be shown.

<script async type="text/javascript" src=""></script>

Insert the button tag

Add the following HTML tag anywhere you want a button to appear.  

<div class="pgs-dpg-btn" data-pgs-partner-id="my-organization"></div>

You must be sure to put your organization’s unique slug in the data-pgs-partner-id attribute of the button <div>. The slug is the part of your Public Good URL that follows "". For example, if your Public Good profile is at, use data-pgs-partner-id="my-organization".

If you run into any issues finding your organization's slug, send us a note at

This default HTML snippet will direct the reader to a Take Action cause page on Public Good related to the cause of the article in which the button was placed. Magical analysis of the article will be performed to determine the best results to be shown to users. For a more curated experience see the "Customizing the Button Results" section below.


Customizing the button experience

You can customize the results of the button by accessing the Take Action button builder through your organization's Public Good profile (e.g. If you have trouble accessing your profile, send us a note at and we'll help you right out!

To access the Take Action button builder, log onto your profile and click on Settings > Take Action Button. Then click on the orange "Take Action Button Builder" link on that page.

For "Magic" (automatic cause matching)
  • In Step 2, select "Use magic to automatically determine results" - this will generate the same code as listed above
  • (Optional) You can narrow the results to a specified location in the "Location" field.
  • (Optional) You can add a custom "descriptor" message to appear above the button by adding it in the "Descriptor text" field. The default message is "Make a difference on the topic in this article".
For curated results (a specific cause page, campaign or nonprofit organization)
  • In Step 2, select the type of destination you'd like the button to take the user. For example, to point an article to our Animal Protection & Welfare page, select "Take users directly to a cause", type "Animal" in the search field and select "Animal Protection & Welfare" in the drop down. 
  • (Optional) You can narrow the results to a specified location in the "Location" field.
  • (Optional) You can add a custom "descriptor" message to appear above the button by adding it in the "Descriptor text" field. The default message is "Make a difference on the topic in this article".
Please note, in Step 2 -
  1. Public Good campaign generally refers to campaigns that we create in response to breaking news (i.e. Zika, Syrian refugee crisis, Hurricane Matthew, etc.)
  2. A cause is generally what we consider "evergreen" i.e. global warming, cancer research, etc. If you'd like us to create one, just let us know!


WordPress Plugin

We offer a free WordPress plugin that you can install and use immediately. This plugin will automatically ensure that all Take Action Button code is loaded on your website.  It also enables the use of a Wordpress Shortcode to easily add the TAB to any article.

Your source-ID, found in the plugin's settings panel, will be your organization's slug. 


Javascript API

The instructions above handle the most common usecases. If you need more control over when and how the button is displayed, consider using the PGM Javascript API. The Javascript API allows clients to show, hide, and alter the appearance of the button using a small set of Javascript functions.

Get started with the PGM Javascript API here:

Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk