Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

IF Formula to find character in URL and concatenate UTM depending on IF.

Topic Labels: Community Formulas
592 0
cancel
Showing results for 
Search instead for 
Did you mean: 
mk14abg
4 - Data Explorer
4 - Data Explorer

Sometimes we have URLs that include "?" for example www.mytravelsite.com/deals?destination=florida. Its best practise when adding UTMs that if a url already includes a "?" then the UTM should start with "&" instead. 

The below is the expected outcome of this.

www.mytravelsite.com/deals?destination=florida&utm_source=Offsite_P195&utm_medium=Patnerships_Video&utm_campaign=VisitFlorida_Sep-Oct2023_YouTube

This is the formula i have attempted to use.

IF(FIND("?", {Landing Page (from Campaign)}), CONCATENATE({Landing Page (from Campaign)},"&utm_source=",{Source (from Product)},"&utm_medium=",{Medium (from Product)},"&utm_campaign=",Name), CONCATENATE({Landing Page (from Campaign)},"?utm_source=",{Source (from Product)},"&utm_medium=",{Medium (from Product)},"&utm_campaign=",Name))

This is what its returning, which is incorrect. 

www.mytravelsite.com/deals?destination=florida?utm_source=Offsite_P195&utm_medium=Patnerships_Video&utm_campaign=VisitFlorida_Sep-Oct2023_YouTube

Can anyone help me?

0 Replies 0