Solved

IF statement in an analysis?

  • 11 March 2021
  • 1 reply
  • 160 views

Hi everyone!

I keep track of where we get applications on our website via amplitude. Today, I do so using utm’s, but we still cannot attribute a majority of where our applications came from :(

However, I recently added referrer and referring domain as a second potential source. What I want to do now, is create an analysis where I sort my users by utm_source or referrer. To be more specific, if the user has an utm_source, mark her as such. If no utm_source, then mark by referrer. If the user has neither an utm_source or a referrer, then mark as (none).

 

Is it possible to do so?

For reference, this is a graph I have today, with applications per utm_source

  1.  

icon

Best answer by Saish Redkar 11 March 2021, 21:41

View original

1 reply

Userlevel 7
Badge +10

Hey @brunolucas ,
If I have understood your use case correctly, you want to club together users into groups based on them meeting those certain conditions involving utm_source or referrer for your analysis? 

You can build user segments or user cohorts based on the individual conditions . 

I have used Amplitude’s demo AmpliTunes project to simulate your use case, taking their utm_campaign ( utm_source in your case ) and referrer_domain property.  You can then group by using the properties in the event section to get the respective breakdown.

 

Or is it more like creating an on the fly label or property for a user when you say “mark her as such” and “mark by referrer.”

Let me know if I have interpreted your use case correctly. Hope this helps!

 

Reply