WordPress installation
Protect your WordPress website from bots/scraping in a few clicks
Eric Tremblay
Last Update 3 个月前
In fingerprinting-api.com app, go to settings, integration. Copy the code.
Paste it on all pages of your website, try to avoid using a tag manager like GTM. If you are not a subscriber, consider using the required plan according to your traffic.

To add a tag (or tracking pixel) to all pages of your WordPress website at the end of the <body> section, you have a few options:
Option 1: Using a Plugin (Easiest & Recommended)
Many plugins allow you to insert scripts into the <head>, <body>, or <footer> sections. The best options are:
Install and activate the Insert Headers and Footers by WPCode plugin.
Go to WPCode → Header & Footer in your WordPress admin panel.
Find the "Body" section.
Paste your tracking pixel or script.
Click Save Changes.
Option 2: Google Tag Manager
If you're using multiple tracking codes (Google Ads, Meta Pixel, etc.), it's best to use Google Tag Manager, however, we recommend implementing it directly on the website.
Install Google Tag Manager for WordPress plugin.
Go to Settings → Google Tag Manager.
Add your GTM ID.
Insert your custom script inside GTM.
Option 3 : Editing the Theme's footer.php (Manual Method)
If you prefer a manual method:
In your WordPress dashboard, go to Appearance → Theme Editor.
Locate and open the footer.php file.
Before the closing </body> tag, add your tracking pixel or script.
On your CMS, create a page to which all bot traffic will be redirected. Useful if you want to create an audience to prevent ad fraud.
Step 3 : activate bot protection / scraping protectionIn the security tab, under Bot, you can do two actions : redirect bot traffic to the page you just created or block the traffic coming from bots.
Redirection will look like this :

Under actions, if you prefer, you can simply block that traffic.
Please note that traffic from bots from recognized source like Google, GPT, Bing, won't be blocked.
Once you have done that the traffic from bots will be handled.
Do the same for Scraping.
In addition, you can also protect your website from VPN traffic/visitors faking their location by selecting VPN protection in the Security tab and following the same process.
If you have some coding experience, you can go further by using our API.