Skip to content

Commit 56574d8

Browse files
[Turnstile] Analytics: Challenge Outcomes (#20387)
* Turnstile Analytics: Challenge Outcomes * fixes * fixes and disclaimers * component * fix alt text * wording * Update src/content/docs/turnstile/turnstile-analytics/index.mdx Co-authored-by: Jun Lee <[email protected]> --------- Co-authored-by: Jun Lee <[email protected]>
1 parent 6985007 commit 56574d8

File tree

9 files changed

+118
-68
lines changed

9 files changed

+118
-68
lines changed
120 KB
Loading
82.8 KB
Loading
79.4 KB
Loading
131 KB
Loading

src/content/docs/turnstile/turnstile-analytics.mdx

Lines changed: 0 additions & 68 deletions
This file was deleted.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: Challenge outcome
3+
pcx_content_type: concept
4+
sidebar:
5+
order: 2
6+
---
7+
8+
import { Render } from "~/components"
9+
10+
When a visitor encounters Turnstile, it assesses whether they are human or bot-like based on various signals. These outcomes help you evaluate how effectively Turnstile is protecting your application.
11+
12+
## Metrics
13+
14+
A "solved" Turnstile challenge does not automatically confirm the visitor is human. You must [call the siteverify API](#call-siteverify) to validate the token and proceed only if the response returns `success:true`.
15+
16+
For example, the challenge outcome values in your analytics may look like this:
17+
18+
![Challenge outcome example values](~/assets/images/turnstile/challenge-outcomes.png "Challenge outcome example")
19+
20+
- **Challenges issued**: The total number of challenges presented to visitors within a specific timeframe.
21+
- **Challenges solved**: The number of challenges successfully completed by visitors in that period.
22+
- **Challenges unsolved**: Challenges that were abandoned or failed in that period.
23+
- **Likely human**: The total number of challenges solved or the total number of challenges issued.
24+
- **Likely bot**: The total number of challenges unsolved or the total number challenges issued.
25+
26+
By analyzing these metrics, you can identify trends such as high failure rates in specific regions, device types, or traffic sources, which may indicate bot activity or misconfigurations.
27+
28+
### Call siteverify
29+
30+
<Render file="siteverify" />
31+
32+
## Solve rates
33+
34+
Turnstile's solve rate is a critical metric that helps gauge how many legitimate visitors are passing a challenge. Solve rates can be broken down into the total number of challenges solved and whether they are interactive, non-interactive, or pre-clearance solves.
35+
36+
If you are using [managed mode](/turnstile/concepts/widget/#widget-types), you can monitor how many of your visitors were prompted interactivity to check the box on the widget (interactive solves) and how many were verified without any disruptions to their experience (non-interactive solves).
37+
38+
For example, the solve rate values in your analytics may look like this:
39+
40+
![Solve rate example values](~/assets/images/turnstile/solve-rates.png "Solve rate example")
41+
42+
### Metrics
43+
44+
- **Non-interactive solves**: Challenges solved without requiring the visitor to click a checkbox.
45+
- **Interactive solves**: Challenges solved that required visitor interaction to be solved.
46+
- [**Pre-clearance solves**](/turnstile/concepts/pre-clearance-support/): Challenges solved that issued the `cf-clearance` cookie along with the Turnstile token.
47+
48+
A low solve rate might indicate increased bot activity attempting to bypass Turnstile or anomalous traffic patterns that require further investigation.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: Turnstile Analytics
3+
pcx_content_type: how-to
4+
sidebar:
5+
order: 6
6+
description: Use Turnstile Analytics to view the number of challenges issued,
7+
the challenge solve rate, and the metrics of issued challenges.
8+
9+
---
10+
11+
import { Render, DirectoryListing } from "~/components"
12+
13+
Turnstile Analytics provides you with a view of the top widget statistics across different metadata dimensions to understand where your traffic is coming from, which environments have the highest challenge activity, and whether certain sources are disproportionately failing or bypassing challenges, allowing you to fine-tune your security settings, apply more granular mitigations, and proactively respond to evolving threats.
14+
15+
## Available statistics
16+
17+
- **Top Hostnames**: If the Turnstile widget is placed across multiple hostnames, this will display the highest traffic hostnames where challenges are being issued.
18+
- **Top Browsers**: A breakdown of browsers that are most commonly encountering Turnstile challenges, helping customers spot trends in visitor traffic.
19+
- **Top Countries**: View the top originating countries for visitors completing challenges, which can help identify regional traffic anomalies.
20+
- **Top User Agents**: Identify which user agents are generating the most Turnstile challenge requests.
21+
- [**Top ASNs**](https://cloudflare.com/learning/network-layer/what-is-an-autonomous-system): Displays the highest volume of challenges issued from specific Autonomous System Numbers (ASNs), helping customers detect potential bot activity.
22+
- **Top Operating Systems**: Shows which operating systems are most common among visitors passing or failing challenges.
23+
- [**Top Source IPs**](https://cloudflare.com/learning/ddos/glossary/ip-spoofing): Identify the highest-volume IP addresses issuing Turnstile challenges, which can be useful in identifying attack sources or repeated challenge failures.
24+
25+
## View widget metrics
26+
27+
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account.
28+
2. Go to **Turnstile** and then navigate to your widget to see an overview of its analytics.
29+
30+
The metrics show changes in the solve rate, widget traffic, and top actions for your widget.
31+
32+
![Turnstile Analytics overview](~/assets/images/turnstile/top-actions.png)
33+
34+
Refer to the pages below for more information about Turnstile Analytics:
35+
36+
<DirectoryListing />
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Token validation
3+
pcx_content_type: concept
4+
sidebar:
5+
order: 3
6+
---
7+
8+
import { Render } from "~/components"
9+
10+
After a visitor successfully completes a Turnstile challenge, a token is generated and validated via the siteverify API. Token validation data provides crucial insights into your security posture.
11+
12+
For example, the token validation values in your analytics may look like this:
13+
14+
![Token validation example values](~/assets/images/turnstile/token-validation.png "Token validation example")
15+
16+
## Metrics
17+
18+
- **Siteverify requests**: The total number of requests made to the siteverify API in the given timeframe.
19+
- **Valid tokens**: The number of siteverify requests with `success:true` responses.
20+
- **Invalid tokens**: The number of siteverify requests with `success:false` responses.
21+
22+
### Call siteverify
23+
24+
<Render file="siteverify" />
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
{}
3+
4+
---
5+
6+
It is important to [call the siteverify API](/turnstile/get-started/server-side-validation/). Without calling siteverify API to validate the tokens, your website or application is not protected. Skipping token validation means you cannot confirm the visitor's legitimacy.
7+
8+
- Tokens can only be redeemed once. Even valid tokens will return `success:false` if they are reused, preventing token theft and replay attacks.
9+
- Tokens expire after five minutes. Validation must occur within this window to be effective.
10+
- Tokens can be invalid. Bots might complete challenges, but Cloudflare can detect bot-like signals and mark the token as invalid.

0 commit comments

Comments
 (0)