Splunk Search

Display Page Views and Visits in same table

hagjos43
Contributor

Good morning fellow splunkers,
I'm trying to display the top 20 page views( aka hits) and visits(unique sessions) within the same table / chart. Below is my query and it's not working:

sourcetype=iis |dedup utma as Visits | stats count(Visits) as Visits, count(Page) as Views by Page | sort - count | head 20

utma is a google analytics tag that defines a user session, hence the dedup. Any suggestions would be greatly appreciated!

Thanks!

0 Karma

somesoni2
Revered Legend

Try this

sourcetype=iis | eventstats dc(utma) as Visits | stats count as Views, first(Visits ) as Visits by Page | sort - Views  | head 20
0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...