Question

How to extract parameters/attributers from URL

  • 21 February 2023
  • 10 replies
  • 1076 views

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

@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:
https://site.com?utm_source={{site_source_name}}&utm_medium={{placement}}&utm_campaign={{campaign.name}}&utm_content={{ad.name}}&utm_term={{adset.name}}
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:
https://site.com?utm_source=source&utm_campaign=campaign&utm_medium=medium&utm_term=term&utm_content=content

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 

 

Userlevel 7
Badge +14

Hi @Fahad 

Good question.

Check out this related topic: