Skip to main content
Best answer

How do I extract UTM from a URL?

  • September 21, 2021
  • 3 replies
  • 4852 views

Hello there to anyone please I need some help:

I have this URL:
https://www.okcars.com/?utm_source=mybusiness&utm_medium=referral&utm_campaign=okcars_mybusines

I want to extract the 3 UTMs and send them to the next step:

  • utm_source
  • utm_medium
  • utm_campaign

¿What utility, format or webhook should i use to get this 3 UTMs and send them separetly to the next step?

Thank you in advance

Best answer by Eduardo BargaBest answer by Eduardo Barga

It worked perfectly :thumbsup:

Thank you so much !!!

 

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 30938 replies
  • September 21, 2021

Hi @Eduardo Barga 

Best would be to use a Code step, but that’s an advanced approach: https://zapier.com/apps/code/help

 

 

Output

 


  • Author
  • Beginner
  • 2 replies
  • Answer
  • October 4, 2021

It worked perfectly :thumbsup:

Thank you so much !!!

 


  • Author
  • Beginner
  • 2 replies
  • October 19, 2021

The javascript code worked perfectly, but in the cases the URL comes without UTMs, the value the field returns is “null” or empty

Example of an URL without UTM campaign, source or medium

¿It is posible to replace this empty value for a default text (for example, “organic”?
 

¿using Javasript to select and replace de empty value?

¡¡¡Thank you so much in advance community!!!