How to extract parameters/attributers from URL

  • 21 February 2023
  • 10 replies

Userlevel 1
Badge +1

Hey, I am creating a Gravity Forms to HubSpot integration and Gravity Forms native integration doesn’t capture ads data such as GCLID ID, UTM parameters etc.

So I thought of using Zapier to extract those data from the URL and add them to HubSpot, how can I extract them from the url?

Here’s a screenshot of a dummy input I created-

I want to extract each parameters data separately

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

10 replies

Userlevel 7
Badge +14

Hi @Fahad 

Good question.

Check out this related topic:


@Troy Tessalone I have found your answers very helpful in here about how to Parse URL Query String Parameters into an Object.  My issue is that it’s a changing URL every time based on the Ad Campaign.  The parsing works but can I have the URL trigger be something like this:{{site_source_name}}&utm_medium={{placement}}&utm_campaign={{}}&utm_content={{}}&utm_term={{}}
I’m not sure if that’s possible.

Userlevel 7
Badge +14

Hi @Andrea Vahl 

Map the desired URL variable from a previous step to the right side in place of the URL seen below.


@Troy Tessalone so when I put the code in the URL input data like this:

The results came back hard coded as “source” “campaign” etc.
Am I missing a step?


Userlevel 7
Badge +14

@Andrea Vahl 

You are using a static URL.

For example the query sting parameter for utm_source = source, thus the results you are experiencing.

You need to map a dynamic variable between Zap steps that has the value of the URL you want to use.


@Troy Tessalone Yes exactly - how do I do that?

Userlevel 7
Badge +14

@Andrea Vahl 

You need to select a variable from a previous step using the menu that appears when you click into the right side.

Example: Expand the desired step section to see the available variables.


This would be an example of a variable mapped from Step 2.


@Troy Tessalone Can you show this as a larger screenshot?  I’m a little confused where this is in the process.

Thank you for your help with this! 

Userlevel 7
Badge +14

@Andrea Vahl