Grants Matcher Plug-in Developer Guide
Before the plug-in becomes enabled for your website it must first be configured using the Grants Matcher Configurator. You can access the configurator by visiting the Grants Matcher Plug-in area of the My Account page. If you are not the website owner but, for example, a developer who’s been asked to configure the plug-in then you should have received a link to the configurator when the owner shared access with you. If you don’t have the link then please ask the website owner to share access with you.
The configurator allows you to setup the plug-in to match your website. You can change the text, colours and various features to your requirements. At a bare minimum you must set the Website Address that the plug-in will be displayed on, for example, https://example.com
Once you’ve set and saved the Website Address, the plug-in will be enabled for that domain and any of its sub-domains, for example, https://dev.example.com or https://testing.example.com
Adding the plug-in to your site
The plug-in is loaded using a <script> tag pointing to https://cdn.getbusinessgrants.com/grantsmatcher/stable/grantsmatcher.js
The script will then look for a <div> tag with the id gbg-matcher and load the matcher into that <div>. For example:
<script type="module" crossorigin src="https://cdn.getbusinessgrants.com/grantsmatcher/stable/grantsmatcher.js"></script> <div id="gbg-matcher"></div>
You can either place the <script> and <div> tags together on a page, as above, or separately load the <script> in the <head> of your page and place the <div id=”gbg-matcher”></div> anywhere on your page you’d like the Grants Matcher to appear. Here’s a simple full page example:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Get Business Grants - Grants Matcher</title> <script type="module" crossorigin src="https://cdn.getbusinessgrants.com/grantsmatcher/stable/grantsmatcher.js"></script> </head> <body> <h1>This is your standard basic HTML page</h1> <p>You normal page content will be here.</p> <!-- The Grants Matcher Plug-in will load inside this div with the ID gbg-matcher --> <div id="gbg-matcher"></div> <p>You rest of the page is here.</p> </body> </html>
Cookies, Security and Privacy
The plug-in only makes requests to https://getbusinessgrants.com to initialise the plug-in, fetch the grant results and submit any form posts. If you are using a Content Security Policy then you should allow it to make requests to https://getbusinessgrants.com
The plug-in uses no cookies, stores no personal information submitted by a user and shares no personal information with any third-party sites.
Help and Support
For help and support with your plug-in please contact [email protected]