Splunk Search

How to calculate page bounce rate as a single value percentage?

ashnet16
Path Finder

I'm trying to display bounce rate as a single value percent. Does anyone have any idea on how I can do it?
As of of, i'm displaying the count of bounces. Thanks in advanced!

sourcetype=access_* | transaction clientip maxpause=1h keepevicted=t mvlist=t | eval bounce_count=case(eventcount=1,"Bounced")|stats count(bounce_count) as "Total page Bounces"| eval total_trans=case(eventcount>=1,"Total Visits")| eval bounce_rate= bounce_count/total_trans

Tags (2)
0 Karma

aweitzman
Motivator

Do you mean something like:

<your search> | eval bounce_rate_as_percent=tostring(round(bounce_rate*100))."%"

0 Karma
Get Updates on the Splunk Community!

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud  In today’s fast-paced digital ...

Observability protocols to know about

Observability protocols define the specifications or formats for collecting, encoding, transporting, and ...

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...