Open
opened this issue Nov 11, 2019 · 4 comments
Open

opened this issue Nov 11, 2019 · 4 comments
Labels
Projects

### adriaanvanrossum commented Nov 11, 2019

 It would be based on the original page views feature.
added this to Features & bugs in Public roadmap via automation Nov 11, 2019
added the label Nov 13, 2019

### adriaanvanrossum commented Nov 25, 2019 • edited

Just thought about this a bit more. For bounce rate you need to know how many people did visit one page only. For these analytics:

• Visitor A visits page `/page1`
• Visitor B visits page `/page1`
• Visitor A visits page `/page2`

the bounce rate should be 1 / 2 = 50%.

Bounce rate (%) = Visits that access only a single page (#) ÷ Total visits (#) to the website. [1]

We can measure if a user only visited one page by checking their referrer:

Event Learning Unique page views for /page1
Visitor A visits page `/page1` No referrer = unique 0 + 1 = 1
Visitor B visits page `/page1` No referrer = unique 1 + 1 = 2
Visitor A visits page `/page2` Referrer = `/page1` 2 - 1 = 1

This way we can calculate the bounce rate per page.

### Jivings commented Nov 25, 2019 • edited

 Is this really how it is calculated? I always assumed it to be based on visits/visitors. Based on your example there are two visitors and one bounces, so I would expect bounce rate to be 50%. Because one out of two visitors bounced.

### adriaanvanrossum commented Nov 25, 2019

 So total visits should be unique visitors? That makes sense. Will update it above.

### mtimofiiv commented Nov 25, 2019

 One thing I guess I can think of that slightly complicates things. Visitor A visits page `/page1` Visitor B visits page `/page1` Visitor A visits page `/page2` Visitor A visits page `/page3` The bounce rate here should still be 1 / 2 = 50% still. So if you're solely checking the referrer to determine `- 1`, you will get an inaccurate bounce rate since in that case you will have 0 / 2 = 0%. No one ever leaves 😉