This document is for an older version of

Freeform

.

View latest version →

Integrations

ClickDimensions POST Forwarding 3.5.8+ Pro

Freeform's POST Forwarding feature allows you to integrate your forms with ClickDimensions for Microsoft Dynamics.

This documentation resource assumes you are familiar with ClickDimensions. We cannot provide any assistance with setting this up, aside from the basics.

Setup Instructions

  • Go into your form inside the Freeform form builder interface, and under the Form Settings tab, scroll to the very bottom.
  • In the POST Forwarding setting, add your custom action URL there. Freeform will make an extra POST submit to that URL once it has successfully validated the form submission, etc.
  • In the POST Forwarding Error Trigger setting, enter a value like error (assuming the error page contains that word, and success wouldn't). When Freeform detects that word (or phrase) in the success/error page from the custom ClickDimensions POST URL, it'll assume it's an error and then log the error(s) to the Freeform error log.

Add the ClickDimensions script, and then add this AFTER it:

var match = document.cookie.match(new RegExp('(^| )cuvid=([^;]+)'));
if (match) {
    var cuvid = match[2];
    document.querySelector('input[name=cd_visitorkey]').value = cuvid;
}
1
2
3
4
5

Include any additional fields as hidden fields inside Freeform, such as:

  • A field with handle cd_visitorkey and the key as the value.
  • A field with handle form_friendly_id and an applicable value, e.g. ContactUs.

Be sure to name/rename all Freeform field handles to match the ClickDimensions field names, e.g. txtFirstName, etc.

Finished!