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:
- Complete the shared widget configuration (script and permitted URLs).
- Configure each widget you want with its code snippet and attributes. See Quick Start.
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.
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
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>