Follow

Integrate Gravity Form with Lasso

Integrate Gravity Form with Lasso

In this article:

Integrate Gravity Form with Lasso

1 - Make sure you have the following information from your Client Director before you begin:

  • Lasso UID
  • Client ID
  • Project ID
  • Question and Answer IDs if applicable
  • Domain Account ID
  • Website Tracking Lasso code

2 - If you haven’t already, download and install the plugin for Gravity Forms on Wordpress. Click Plugins and select Add New.

3 - Click Upload Plugin.

4 - Browse for your file and then click Install Now

5 - You also need 3rd-Party Integration to allow submissions to Lasso. Download at:

https://en-ca.wordpress.org/plugins/forms-3rdparty-integration/

6 - To create your form, click Forms and select New Form or Add New.

Note: For instructions on building your form, please refer to https://www.gravityhelp.com/documentation/article/creating-a-form/.

7 - Select the fields for your form. Clicking on a field will automatically move it to the form.

Note: Click on the dropdown arrow of each set of fields to expand or collapse the box.

With your mouse, hover over a field and click on the dropdown arrow to expand or collapse the box.

8 - If you are adding questions such as ‘How did you hear about us?’, enter each answer in the Label field and the corresponding answer ID from Lasso in the Value field. Your Client Director can provide you with the Lasso answer IDs.

Note: Check the box beside show values to display the Value fields.

9 - For each field you create, make a note of the Field ID that is automatically generated. You will need it later in your setup.

10 - Add a Hidden Field for the GUID.

11 - In the Label field, enter GUID.

12 - Leave the Default Value blank. The GUID will be created automatically.

13 - Make a note of the Field ID for the GUID field.

14 - When all your fields are added, click on Update Form.

15 - Under Forms, click 3rdparty Services

16 - Click on a 3rd-Party Service box.

17 - Select Add Another Service

18 - In the Service Name field, enter a name for your form.

19 - In the Submission URL space, enter https://app.lassocrm.com/registrant_signup/.

20 - Beside Attach to Forms, select your form.

21 - In the Mapping section, click on the green ‘plus’ circle to add the fields on your form. Enter a Label, Form Submission Field, and 3rd-Party Field for each field:

  • Label - can be any descriptor you want.
  • Form Submission Field - must be ‘input_’ plus the Field ID (input id) you noted for each field when you were creating your form, e.g. input_37.
  • 3rd-Party Field - must be the field input names from Lasso, e.g. FirstName, LastName, Emails[Primary], etc. Your Client Director will provide these to you.

If your form contains questions with multi-select answers

Questions that allow the selection of more than one answer such as checkboxes and multi-select dropdowns require the following:

  • In the Global Values section, go to the Separator field and change the default comma to square brackets, i.e. change , to [ ].
  • The decimal in the Form Submission Field input name/id must be changed to an underscore, e.g. change input_3.1  to input_3_1.
  • Each answer must be mapped (unlike a single-answer question which only requires one mapping) to the same 3rd-Party Field input name/id.

Example of question with multi-select answers

answers.gif

If your form contains questions with multi-select answers and  questions with single-select answers

As noted above, when the form contains a question that allows multiple answers, the default comma in the Separator field of the Global Values section must be changed to square brackets. This causes Gravity Forms to treat all  questions as an array or multi-answer. Therefore, when a form contains both questions with multi-select answers and questions with single-select answers, a workaround for the questions with single-select answers is required. A null option must be added to all questions with single-select answers so that they are treated as an array/multi-answer. The null option must be checked so that it is submitted automatically.

Note: This applies only  if there are questions with single-select answers and  questions with multi-select answers.

Example of question with single-select answers with null option

As in the example below, the first row is where the answer value for the question is derived while the second row automatically posts a null value.

gravity.gif

22 - In the Mapping section, add four more fields, entering the IDs provided to you by your Client Director:

  • Client ID
  • Project ID
  • Lasso UID
  • Domain Account ID

23 - Check the Is Value? box for Client ID, Project ID, Lasso UID, and Domain Account ID and Save.

Note: Do not enter ‘input_’ before IDs in the Client ID, Project ID, Lasso UID, and Domain Account ID Form Submission Fields.

24 - Click Pages and select Add New.

25 - Click Add Form.

26 - Click on the dropdown in Select a Form and select your form.

27 - Click Insert Form.

28 - This will automatically place the Shortcode at the top of the form.

29 - In the Project Admin Center of Lasso, click Project Setup and select Website Analytics.

Note: Your client director can also provide you with the code.

websitetracking1.gif

30 - Select the Domain.

31 - On the right side of the page, scroll down to Step Three. Copy the Step Three code and paste it below the Shortcode in your form.

step3.gif

32 - Between the brackets beside LassoCRM.tracker.patchRegistrationForms, insert ‘input_X’, with X being the id in the Shortcode.

Example script (X would be replaced with values):

<script src="//app.lassocrm.com/analytics.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
var LassoCRM = LassoCRM || {};
(function(ns){
ns.tracker = new LassoAnalytics('LAS-XXXXXX-XX');
})(LassoCRM);
try {
LassoCRM.tracker.setTrackingDomain(“//app.lassocrm.com”);
LassoCRM.tracker.init(); // initializes the tracker
LassoCRM.tracker.track(); // track() records the page visit with the current page title, to record multiple visits call repeatedly.
LassoCRM.tracker.patchRegistrationForms('input_X');
} catch(error) {}
-->
</script>

gravity.gif

33 - Click on Save Draft, Preview, or Publish, depending on how ‘ready’ your form is.

Add Website Tracking for Gravity Forms that are using Genesis Framework with WordPress

If your contact page is a Gravity Form, and you are using the Genesis Framework to build your Wordpress project website, add Lasso website tracking to the form as follows:

1 - In the Project Admin Center, click Project Setup and select Website Analytics.

websitetracking1.gif

2 - Select the Domain.

3 - On the right side of the page, scroll down to Step Three.

step3.gif

4 - Log into your WordPress account.

Note: You must have full administration permissions in WordPress to view and edit headers and footers.

5 - Click on the Genesis menu item and select Theme Settings.

genesis.gif

6 - Within the Theme Settings, scroll down to the Footer Scripts section.

7 - Copy and paste the code from Step Three in the Website Analytics area of Lasso’s Project Admin Center into the Footer Scripts section of the Genesis Framework.

8 - Between the brackets beside LassoCRM.tracker.patchRegistrationForms, insert ‘input_X’, with  being the input value.

Example script (X would be replaced with values):

<script src="//app.lassocrm.com/analytics.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
var LassoCRM = LassoCRM || {};
(function(ns){
ns.tracker = new LassoAnalytics('LAS-XXXXXX-XX');
})(LassoCRM);
try {
LassoCRM.tracker.setTrackingDomain(_ldstJsHost);
LassoCRM.tracker.init(); // initializes the tracker
LassoCRM.tracker.track(); // track() records the page visit with the current page title, to record multiple visits call repeatedly.
LassoCRM.tracker.patchRegistrationForms('input_X');
} catch(error) {}
-->
</script>

step3-2.gif

9 - Save and publish.