I must pass utms and GCLID into webflow forms

My form contains

  • Name
  • Number
  • Email

My CRM captures Name Number and Email from webflow form as intended.

How do I make
&gclid={123…89}
&utm_source={source}
&utm_medium={medium}

to pass form

Name
Number
Email
GCLID
utmSource
utmMedium

into the crm?

Hey, did you get this figured out? I also need to gather the GCLID and pass into Salesforce.

@morganc84

Yes. We resolved i by passing {{data-landing-url}} into larvel including GCLID and then to form captures fiel Landing URI. Here is java code:
function getParam(name, url) {
name = name.replace(/[/, “\[”).replace(/]/, “\]”);
var regex = new RegExp(“[\?&]” + name + “=([^&#]*)”),
results = regex.exec(url);
return results === null ? “” : decodeURIComponent(results[1].replace(/+/g, " "));
}
var matchtype = ‘’;
var device = ‘’;
var term = ‘’;
var agid = ‘’;
var cid = ‘’;
var creative = ‘’;
var campaign = ‘’;
var utm_source = ‘’;
var utm_medium = ‘’;
var utm_campaign = ‘’;
var utm_term = ‘’;
var utm_content = ‘’;
if (inputData.url.indexOf(‘?’) > 0)
{
matchtype = getParam(‘matchtype’, inputData.url.split(‘?’)[1]);
device = getParam(‘device’, inputData.url.split(‘?’)[1]);
term = getParam(‘term’, inputData.url.split(‘?’)[1]);
agid = getParam(‘agid’, inputData.url.split(‘?’)[1]);
cid = getParam(‘cid’, inputData.url.split(‘?’)[1]);
creative = getParam(‘creative’, inputData.url.split(‘?’)[1]);
campaign = getParam(‘campaign’, inputData.url.split(‘?’)[1]);
utm_source = getParam(‘utm_source’, inputData.url.split(‘?’)[1]);
utm_medium = getParam(‘utm_medium’, inputData.url.split(‘?’)[1]);
utm_campaign = getParam(‘utm_campaign’, inputData.url.split(‘?’)[1]);
utm_term = getParam(‘term’, inputData.url.split(‘?’)[1]);
utm_content = getParam(‘utm_content’, inputData.url.split(‘?’)[1]);
}
output = [{“matchtype”:matchtype, “device”:device, “term”:term, “agid”:agid, “cid”:cid, “creative”:creative, “campaign”:campaign, “utm_source”:utm_source, “utm_medium”:utm_medium, “utm_campaign”:utm_campaign, “utm_term”:utm_term, “utm_content”:utm_content, }];

assign each respective field to salesforce and t will auto populate.
pass 1 = landing
pass 2 = gclid
pass 3= other perams /(if gclid, get google utms, if msclk get microsoft utms, if fbclk get fb utms, etc)

Zapier can help. If you share this ^ with your developer they should understand how to resolve GCLID for you.