How to auto-generate share pages

If you have a large number of action pages, and don’t want to manually set up a share page for each petition, there’s a way to automate the process. Here's what you need to do to auto-generate and embed ShareProgress pages on your website:

  1. Ensure that the ShareProgress code snippet (sp.js) is being loaded on all pages. You can do this by embedding the ShareProgress code snippet into the header or footer of your template.
  2. On the post-action thank-you page, where you want the ShareProgress share page to load, include the following HTML tag, replacing the bold PETITION_PAGE_URL with the URL for the action page.
    <div id="sp_share_page" page_url="PETITION_PAGE_URL"></div>

The first time that someone lands on this page, a ShareProgress page will be created for the petition. For subsequent visitors, the same page will be shown.

You can access the share page through the normal ShareProgress dashboard. It’ll have the same name as the action page that it’s linked to. From there, you can edit the share language and set up A/B testing.

When you use an embedded page, it doesn't include any page wrapper, so you'll want to keep your standard header and footer for the page.