Capture UTM Parameters - Wordpress Contact Form 7 - Webhook to Google Sheet

I would like to extract the UTM parameters for new leads we get from ad campaigns.

We run Google ads and Facebook ads.
We use a Wordpress website with Contact form 7. I have a webhook set up in contact form 7.

here is a video = https://share.zight.com/geu7gmjP

I have an existing make scenario live that is working. The existing scenario has 2 steps (1) Webhook - which is connected to our contact form. (2) google sheets - every time someone fills in the form, all form details are added to our google sheet.

I want to include their form details, AND, to include the Source / Medium of where the lead came from. We use UTM parameters for all ad campaigns, but I can not see the UTM source as an option to capture from the webhook.

When I am in the “google sheets” module, I can see there are “webhook” information. I can add the leads name / email / message - but I have no idea how to include the UTM Source.

I have attempted to do “Match Pattern” following the examples provided in other make FAQs. How to get utm parameters from the URL querystring

I have also tried to include “Text Parser”. It looks like it is set up correectly BUT no information is being passed across to the google sheet. the ‘website’ and ‘text parser’ is working good.

When I add the text parser module, I have tried adding in a pattern. example = ```
utm_campaign=(?<utm_campaign>[\w_-]+)&utm_medium=(?<utm_medium>[\w_-]+)&utm_source=(?<utm_source>[\w_-]+)&gclid=(?[\w_-]+)


When I click "text at the bottom of the module, it displays I can include the name / email / message, but there is no mention of UTM / URL parameters. 

![Screenshot 2024-06-04 at 10.40.51|690x375](upload://8f2r8YPBAaM1bgKElZnefYqbzGi.jpeg)

Can you provide a few sample URLs, what data you want out of them clearly stated?

I see you stuffed a bunch of stuff into the text to process into your text parser and I wonder if that’s what you actually want since those strings will just be concatenated together. You may want to iterate the objects coming from the webhook to process them one at a time through the parser.

The reason your sheets is not being populated is that the text parser is returning 0 bundles as the regex search is failing so it stops there without sending any more data into sheets.

1 Like