This power-up automatically checks whether each incoming request comes from a bot (e.g., referral spam, automated scripts). It can detect and block suspicious requests before they reach your server or analytics tools. When enabled, it adds two headers to every request:
Next, by creating a Request Header variable for these headers in your sGTM container, you can leverage bot detection signals to filter out unwanted or suspicious traffic. For example, you can block GA4 or other tags from firing if the request is identified as bot traffic.
Note: this filtering can now be done either by using a variable in sGTM (as before) or directly within the Stape account by enabling power-up features. |
Bots can create fake visits to your website. This can:
When you filter out bot traffic, your reports show data from real people, so you can trust your analytics.
Some bots are harmful. They can click on your ads to waste your budget, overload your server with fake traffic, and try to access your data.
Bot Detection helps you detect these harmful requests early, so that you can plan your website and marketing spend safer.
Many bot detection tools need complex code, extra software, and ongoing maintenance.
The Bot Detection power-up works directly with Stape’s server-side GTM container. You can:
1. Log in to your stape.io account.
2. Select your sGTM container on the dashboard.
3. Click Power-ups, then click the Use button next to the Bot Detection panel.
4. Toggle the Bot Detection switch.
5. Select one of the options:
Click Save changes.
6. The Bot Detection power-up has been configured on Stape. Here is an example of how to use the power-up’s data to filter the bot traffic in Google Tag Manager:
1) Create a Variable on the sGTM container with the type Request Header and enter the name X-Device-Bot.
2) Use this variable as an additional condition in your GA4 trigger configuration on the server (or any other triggers where you want to limit the impact of bot traffic).
Anonymize GA4 data for GDPR compliance using Stape's Anonymizer or manual GTM redaction. Remove PII like IPs, client IDs, and referrers to protect user privacy.
Learn how to block referral spam in GA4 and protect your data with GTM server-side tagging and bot detection tools.