What would you like to know more about?

Show Page Sections

Enabling Widgets

Instructions to enable widgets on your website, including how to add the shared widget script, permitted URLs, and more.

You can add widgets to a website with very little coding knowledge, but widgets do live on websites! You must work with your web staff or vendor to successfully integrate widgets into your existing website.

To enable widgets on your website, do the following:

  1. Complete the shared widget configuration (script and permitted URLs).
  2. Configure each widget you want with its code snippet and attributes. See Quick Start.

Permitted URLs

Important: Permitted URLs are case-sensitive, so make sure you add both uncapitalized and capitalized versions of your URLs to your permitted URL list. For example, both www.ministryplatform.com and www.MinistryPlatform.com are both permitted URLs.

In your permitted URLs list, you must include any website where you want to place a widget. For example, if you place the Group Finder and Opportunity Finder widgets on your main website at https://example-church.com/groups and https://example-church.com/serve, then you must add the URL https://example-church.com (with no trailing slash) to the permitted URLs list. You may have multiple permitted URLs.

The key for each permitted URL must be unique.

For example:

<permittedUrls>
    <add key="website" value="http://example-church.com" />
    <add key="websiteSSL" value="https://example-church.com" />
    <add key="websiteWww" value="http://www.example-church.com" />
    <add key="websiteWwwSSL" value="https://www.example-church.com" />
</permittedUrls>

After changing your permitted URLs, you must to recycle the widgets application pool for any updates to take effect. If you don't have access to your server, coordinate your changes with someone who does or contact Support.

Note: A SPoC can contact Support to add, change, or remove permitted URLs. We're here to help!

Best Practices

  • "Http" and "https" are different. Add both versions as permitted URLs.
  • "www.domain.com" and "domain.com" are different. Add both versions as permitted URLs.
  • Do not include a slash at the end of any permitted URLs.
  • Have an SSL certificate installed on any website that uses widgets. You may be able to use widgets without the certificate, but we do not recommend it.

Important Considerations

  • The administrator's security role needs to have permission to many API Procedures. If API Procedures are missing, contact to Support for help. If a procedure is missing, you'll receive an error in the widget that Procedure "X" does not exist, or User "Y" does not have access to it.
  • Shared Cloud churches: Contact Support to configure additional sites. We have already configured the church website we have on record for you.
  • Self-Hosted and Dedicated Cloud churches:
    • Contact Support to configure additional sites.
    • If needed, you can manage this list in the SaaS configuration file under: \widgets\wwwroot\_DomainData\saasdomains\customer.config
      • Each permitted URL must have a unique key. If there are duplicate keys, the system will only permit the last URL for each key.
      • If you are configuring a domain starting with www, it's a good idea to also include the version without the "www" prefix.

Add Shared Widget Script

Diagram showing a figure labeled "app" pointing to two separate pages labeled "script" that each contain a box labeled "widget"

All widgets are powered by a shared script. This script contains all the logic for widgets powered by your widgets application. You must add the script to any page which will contain widgets. For example, here is the required script element configured for example-church.com:

<script id="MPWidgets" src="https://example-church.com/widgets/dist/MPWidgets.js"></script>
Tip: Add the shared script to your website header to make widgets available on all pages of your website!
  1. Review the sample script.
  2. Copy the shared script for your widgets and replace the URL with your base MinistryPlatform URL.
    Your base URL would be https://example-church.ministryplatform.net.
  3. From your CMS (website management software), add this script to your website header. If this is not possible in your CMS, add the script to any page which will have widgets.