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

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

Sometimes we have URLs that include "?" for example 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.

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.

Can anyone help me?

0 Replies 0