How to Embed a Luminate Online Survey on a WordPress Site
Data is like a treasure map – it guides you to the goldmine of insights! It’s not just numbers and names; it’s the secret sauce for making smart decisions and turning ‘I think’ into ‘I know’! Whether you want to segment your email list or make other data-driven decisions, the data you collect holds endless potential to unveil patterns, trends, and insights. In this post, I’ll go over two ways to get data from your WordPress site into your Luminate Online instance by integrating both tools utilizing a Luminate Online survey.
Option 1 – Hardcoding a Survey
Step 1: View the Source
Once your survey has been built out in LO, you’re going to ‘View the Source’ on the survey in question. While on the survey page (URL should look something like this:
https://give.yourorganizationname.org/site/SSurvey?ACTION_REQUIRED=URI_ACTION_USER_REQUESTS&SURVEY_ID=XXXX), right click on a blank spot of the page and click ‘View the Source’. Here, we’re going to find the <form></form> element on the page and copy the whole element into your text editor. This is the survey that we are going to manually embed.
Step 2: Clean It Up
You can now clean up and remove any elements you don’t need (eg. extra <p> tags, extra <td> tags etc.) but make sure to keep in place any form elements (inputs, hidden inputs etc). From here, you can add any classes you might need to style this accordingly. Also, make sure to keep honeypot fields / CC / JS to make honeypot work.
Step 3: Embed It!
Go to the page or post on your WP site where you’d like the form to live and, in an HTML block, paste in the code you just cleaned up. If you’d like the form to live somewhere other than a page or a post (ie. the footer) then you’ll have to source the proper php template file to paste in the code (such as footer.php).
Step 4: Create a WordPress Thank You Page
Next, you can create a thank you page on your WordPress website and link THAT page as the ‘survey submitted’ page under the survey in the LO backend.
Is hardcoding a survey the right option for you?
Listed below are some benefits and drawbacks to help determine whether or not this is a good choice for you!
Benefits | Drawbacks |
|
|
Option 2 – Using Gravity Forms to embed the survey
It should be noted that in order to use Gravity Forms to embed an LO survey you need to have a few things sorted out. You must:
- Have a licensed and active version of Gravity Forms >= 1.9.3
- Have a working Luminate Online instance and Luminate API credentials (API key, username, and password)
- To find/create API key – in the top bar of your LO backend, click:
Setup > Site Options > Open API Configuration.
If you are not set up, follow the steps here - For Username/Password set up, in the same place as above, click Edit server API configuration beside Configure API to allow server access. Check here for more info and the steps to do this.
- To find/create API key – in the top bar of your LO backend, click:
- Make sure the IP address of the server(s) you’re running this Add-On on is whitelisted with Luminate***
- In the same menu from 2b. above, you’ll see the following (see image below).
By adding an IP address to the boxes under “Add a new IP Range” and clicking Add New IP Range to list, it will be added to the “Current IP Ranges” list. This will allow your WP site to access the LO API. You can also choose to Add Current IP Address to list if that is the appropriate one.
***Another note here: If your website is hosted on a platform like Pantheon or another service that regularly changes the public IP address of your site, this plugin might not be suitable for your needs.
- In the same menu from 2b. above, you’ll see the following (see image below).
Step 1: Get the Add-on
Assuming you already have Gravity Forms installed on your site (if not, here are some instructions on how to get set up):
- Download and activate the GF add-on Integration For Luminate and Gravity Forms.
- You can also do this through your WP backend in the Plugins directory.
- After clicking “Add a New Plugin” at the top right of the page.
- Search ‘Luminate” and you’ll see a plugin called “Gravity Forms Luminate Constituents Add-On”.
- Download it and activate it.
Step 2: Add Your Credentials
Navigate to Forms in the sidebar and click Settings. From this page, in the nested sidebar, click the Luminate API tab. Here you’ll find a bunch of notes and warnings about IP addresses and netmasks so read through that and make sure everything is in order. Below this, you can add all of the info required to get you hooked up.
Step 3: Direct Your Data
Now you can edit the Settings of individual forms in the Gravity Forms backend to configure how data is fed into your Luminate instance.
Are gravity forms a better option for you?
This list of benefits and drawbacks can help to determine whether or not using gravity forms to embed surveys is your best option.
Benefits | Drawbacks |
|
|
Final Words
As a developer, I would likely go with option 1 as it offers me more control and flexibility when it comes to the rendering and functionality of the survey itself, the only big drawback being that you’ll have to manually update WP if you adjust the survey in LO. However, if you are not a developer, or don’t have access to a developer, or you just love Gravity Forms and your website’s hosting/IP situation conforms well with the limitations set on the LO Integration add-on, then I say go for it! As I said, as long as the data is going where it needs to, then all is right in the world. As always, if you need assistance, Doing Good Digital is here to help.