How To Create Google Analytics Goals From a ClickDimensions Form

We recently invested in ClickDimensions at Encore, and have been enjoying it so far. However, we wanted a Google Analytics goal to be completed whenever a website user filled out a ClickDimensions form, which isn’t an out-of-the-box feature.

The ClickDimensions forum has a solution, but this requires you to set up a “thank you” type page for each form. This is a lot of work and may not be your ideal setup. Here is a solution to get Google Analytics Goals firing whether or not you use a thank you page. The only requirement is Google Tag Manager, which I highly recommend. I have also only tested this method when using ClickDimensions forms embedded as a widget. I suspect it will not work under other setups (i.e. iFrame).

Step 1: Add a few lines of Javascript to your form

In the form designer, select “code editor”. A new popup will open.

clickdimensions-code-editor

In the bottom left, under Javascript, place the following code:

clickd_jquery( "#clickdimensionsForm" ).submit(function( event ) {  
     event.preventDefault();
     clickd_jquery("#clickdimensionsForm").unbind("submit");
     dataLayer.push({'event': 'CDformSubmit'});
     setTimeout(function(){clickd_jquery( "#clickdimensionsForm" ).submit()},2000);});
});

What this does: When a Form with the ID #clickdimensionsForm is submitted, your Javascript prevents the form from submitting, pushes an “event” to the Google Tag Manager data layer, waits two seconds to let everything propagate, and then submits the form. Note that this will only work if you have one form on the page. If you have more than one, it will only work on the first form on the page.

Step 2: Create a Google Tag Manager Tag and Trigger

Assuming you already have Google Tag Manager and Analytics on your site, head into Google Tag Manager and create a new tag.

  1. Under tag configuration, select either “Classic” or “Universal” Google Analytics depending on your property.
  2. Paste your Tracking ID into the Tracking ID box. (UA-XXXXXX-X)
  3. Change the “Track Type” to “Event”
  4. Fill out the values for Category, Action, and Label. I recommend the following settings:
  5. Now, we’re going to create a Trigger. Click the box to add a trigger, and then the little blue “+” to create a new one:
    new-trigger
  6. . Select “Custom Event”, and enter the following (event  = CDformSubmit). I’m not sure the “conditions” are actually necessary, but it seems to help if it’s in there.
  7. Save your Tag, and publish your Tag Manager version.

What this does: Creates a Google Analytics Event when the Google Tag Manager Data Layer receives a message from ClickDimensions.

Step 3: Create a Goal in Google Analytics

This is fairly simple to do, so I’ll leave you with detailed instructions from elsewhere on the internet.  Now that you have an Event in Google Analytics, you use that data to create a goal.

Remember that your Category is “ClickDimensions Form Submission” and your Action is the URL the user was on – use this to your advantage!

CRM Implementation: 12 Key Questions Answered

What are the steps in a CRM implementation? What are the biggest causes of failure? How long will it take?

Read FAQ

CRM Implementation: 12 Key Questions Answered

Read FAQ