Formstack Forms

HandL UTM Grabber / Tracker How to collect and track UTM variables via Formstack Forms step by step

Capture UTMs using Formstack forms

This form only works in HandL UTM Grabber V3

Add the hidden fields as follows. Make sure the hidden field name (either field label or placeholder exactly matches with our naming convention here Native WP Shortcodes)

After activating the plugin, insert the following code in your custom javascript file:

function FF_OnAfterRender(){
	console.log("Form rendered successfully!"); 
	var vars = ["Lead.UTM_Campaign__c","Lead.UTM_Medium__c","Lead.UTM_Source__c","Lead.UTM_Term__c","Lead.UTM_Content__c","Lead.GCLID__c","Lead.FBclid__c"]
	for (v of vars){
		escape_v = v.replace(/\./g, '\\.')
		jQuery("#"+escape_v).val(Cookies.get(v));
	}
	return true;
}

And the fields will be automatically populated after lead is submitted.