Open-source ad fraud detection for small businesses
Live Demo • Quick Start • Why Different • Contribute
Founded by Hongyi Shui
Detect click fraud, bot traffic, and fake conversions from Google Ads, Facebook Ads, Instagram, and TikTok. AdTruth is a free, open-source ad fraud detection tool that helps small businesses identify which advertising platforms waste their budget on fraudulent traffic.
You're spending $3,000/month on paid ads. Conversion rate: 5%.
30% of those clicks might be fake.
Not obvious bots—AI-powered ad fraud that mimics human behavior perfectly. Natural mouse movement. Human-like scrolling. They visit your page, bounce after 8 seconds. You just paid $2.50 for nothing.
Enterprise fraud detection tools (ClickCease, CHEQ, TrafficGuard) cost thousands per month.
We built AdTruth to give small businesses the same ad fraud visibility, completely free. Detect bot traffic and fraudulent clicks across all your advertising platforms. See which channels waste your budget on fake traffic and shift spending to real customers.
|
30% of paid traffic is fraudulent
|
Two ways you're losing money
|
$0 forever with AdTruth
|
The fraud economy: Fake websites generate clicks → Fraudsters profit → Your budget disappears → Real customers never see your ads
AdTruth reveals which platforms have higher fraud rates, so you can shift budget from high-fraud channels to low-fraud ones.
Try it yourself: adtruth.io • Enter your website to see estimated fraud rates across Google, Facebook, Instagram, and TikTok
Real-time insights:
- See which platforms waste money on bots vs attract real customers
- Compare your fraud rates to industry benchmarks
- Get actionable recommendations
1. Install → Add one line of code to your website (takes 60 seconds)
2. Collect → AdTruth automatically tracks visitor behavior and fraud signals
3. Analyze → Our ML models calculate fraud rates for each traffic source
4. Optimize → See platform-by-platform fraud rates (e.g., "Google: 11%, Instagram: 63%")
5. Reallocate → Shift budget from high-fraud platforms to channels with real customers
Zero configuration. No maintenance. Just install and go.
Get started in 60 seconds • No credit card required • Free forever
Add this script before the closing </body> tag:
<script>
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = 'https://cdn.jsdelivr.net/gh/papa-torb/adtruth@latest/dist/adtruth.min.js';
js.onload = function() {
AdTruth.init('YOUR_API_KEY_HERE');
};
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'adtruth-js'));
</script>Get your free API key: Sign up at adtruth.io (takes 30 seconds)
Time: 2 minutes • Difficulty: Easy • Tested: Verified working
WordPress powers 43% of all websites. We've tested and confirmed this integration works perfectly.
Quick Steps:
- Install the WPCode plugin (2M+ active installations)
- Go to Code Snippets → Header & Footer
- Paste the AdTruth script in the Footer section
- Click Save Changes
View detailed WordPress guide →
Time: 3 minutes • Difficulty: Easy • Tested: Verified working
Modern Shopify stores use Custom Pixels for tracking scripts. This is the recommended method.
Quick Steps:
- Go to Settings → Customer Events
- Click Add Custom Pixel
- Name it "AdTruth Fraud Detection"
- Paste the AdTruth initialization code
- Click Save
Time: 2 minutes • Difficulty: Easy
Quick Steps:
- Go to Settings → Custom Code in your Wix dashboard
- Click + Add Custom Code
- Paste the AdTruth script
- Set to load on All Pages in the Body - end
- Click Apply
We have tested integration guides for:
- Squarespace - View guide
- Webflow - View guide
- GoDaddy Website Builder - View guide
- GitHub Pages - View guide
| Business Type | Common Problem | How AdTruth Helps |
|---|---|---|
| E-commerce | High ad spend, low ROAS | Identify which platforms attract bots vs real shoppers |
| SaaS Companies | Fake signups waste sales time | Distinguish real leads from click farm accounts |
| Local Businesses | Limited budget, blind spending | See which platforms deliver real foot traffic |
| Marketing Agencies | Clients blame poor results on you | Prove fraud with data, not guesswork |
| Developers | Want to contribute to open source | Help build better fraud detection for everyone |
| Feature | AdTruth | Enterprise Tools (ClickCease, CHEQ, etc.) |
Google Analytics |
|---|---|---|---|
| Cost | ✅ $0 forever | ❌ $12K-50K/year | ✅ Free |
| Fraud Detection | ✅ ML-powered, real-time | ✅ Advanced (black box) | |
| Network Intelligence | ✅ Learns from all sites | ❌ Your data only | ❌ No fraud focus |
| Tracking Transparency | ✅ 100% open source | ❌ Proprietary black box | ❌ Proprietary |
| Setup Time | ✅ 60 seconds | ⏱️ Days to weeks | ⏱️ 5 minutes |
| Best For | ✅ Small businesses | Large enterprises | Basic analytics |
Enterprise-grade fraud analytics without enterprise pricing. Your traffic data helps train models that benefit the entire network. When we detect fraud patterns on one site, every other business gets better fraud scoring immediately.
Will this slow down my website?
No. AdTruth is 12KB minified (smaller than most images) and loads asynchronously. It won't block your page rendering or affect your Core Web Vitals scores.
Do I need to be technical to use this?
Not at all. Copy-paste one line of code into your website (takes 60 seconds). The dashboard shows everything in plain English with color-coded fraud scores.
How do you make money if it's free?
We don't—yet. AdTruth is a public good project. Small businesses deserve the same fraud protection as Fortune 500 companies. We're building this as an open-source community effort first, monetization later (if ever).
Can I use this with Google Analytics?
Absolutely! AdTruth is complementary to Google Analytics. GA shows you traffic patterns; AdTruth tells you which traffic is fraudulent. Use them together for complete visibility.
What if I have a WordPress/Shopify/Wix site?
AdTruth works with any website:
- WordPress: Add the script to your theme's
header.phpor use a code injection plugin - Shopify: Add to
theme.liquidin the<head>section - Wix: Use the Custom Code feature in Site Settings
- Squarespace: Use Code Injection in Settings
Is my data private?
Yes. We collect only anonymized behavioral signals (mouse patterns, scroll depth, device signatures). No personal information. No emails. No names. No passwords. We're GDPR and CCPA compliant by design.
How accurate is the fraud detection?
Our ML models are trained on collective network data from all participating sites. Average fraud detection rate across industries is 15-40%. Accuracy improves as more businesses join the network—every fraudster we catch protects everyone.
Can I self-host AdTruth?
Yes! It's 100% open source (MIT license). Clone the repo, modify it, host it yourself. We encourage transparency and customization. Check the For Developers section for build instructions.
AdTruth uses a multi-layered approach to identify fraudulent traffic:
- Browser fingerprinting - Unique device signatures that bots can't fake
- Behavioral analysis - Real users scroll, move, and click differently than bots
- Machine learning - Isolation Forest models trained on collective network data
- Network intelligence - Fraud patterns detected on one site protect all sites
Why we don't share all our methods: Disclosing detailed detection techniques helps fraudsters bypass them. Our open-source SDK is transparent, but our ML models and detection rules remain proprietary to stay ahead of evolving fraud.
AdTruth is designed with privacy as a core principle:
- ✅ GDPR compliant - No personal data collection
- ✅ CCPA compliant - Users can opt-out anytime
- ✅ No PII storage - We don't collect names, emails, or addresses
- ✅ Cookie-less tracking - Works without third-party cookies
- ✅ Encrypted in transit - All data encrypted via HTTPS
- ✅ Respects Do Not Track - Honors browser privacy settings
- ✅ Open source - Audit the code yourself
What we collect:
- Anonymized behavioral signals (mouse patterns, scroll depth)
- Technical attributes (browser type, screen resolution)
- Campaign parameters (UTM codes from ad links)
What we DON'T collect:
- Personal information (names, emails, phone numbers)
- Payment information
- Precise geolocation
- Browsing history outside your website
# Clone the repository
git clone https://github.com/papa-torb/adtruth.git
cd adtruth
# Install dependencies
npm install
# Build for production
npm run build
# Build for development (with watch)
npm run dev
# Run tests
npm testadtruth/
├── src/
│ ├── core/ # Core tracking logic
│ ├── fingerprint/ # Browser fingerprinting
│ ├── behavior/ # Behavioral analysis
│ └── utils/ # Helper functions
├── dist/ # Built files
├── tests/ # Test suite
└── rollup.config.js # Build configuration
We welcome contributions! Every improvement you make helps protect thousands of businesses.
How to contribute:
- Fork the repository and create a feature branch
- Write tests for your changes
- Follow our coding standards (ESLint + Prettier configured)
- Submit a pull request with a clear description
Areas where we need help:
- New fraud detection techniques
- Performance optimizations
- Browser compatibility testing
- Documentation improvements
- Translation to other languages
Not a developer? You can still help:
- Report bugs or fraud patterns you've discovered
- Improve documentation
- Share AdTruth with other small business owners
- Contribute to discussions and feature ideas
See CONTRIBUTING.md for detailed guidelines.
- ✅ Browser fingerprinting
- ✅ Behavioral analysis (mouse, scroll, touch)
- ✅ UTM campaign tracking
- ✅ Real-time dashboard
- ✅ ML-based fraud scoring
- ✅ Page unload tracking (accurate session duration)
- ✅ Platform integration guides (WordPress, Shopify, Wix)
- 🔄 Advanced ML models (ensemble methods)
- 🔄 Honeypot trap implementation
- 🔄 WebGL fingerprinting
- 🔄 Page visibility tracking
- 🔄 Email/Slack alerts for fraud spikes
- 📋 Open fraud dataset for researchers - Preview documentation
- 📋 Community-contributed fraud rules
- 📋 Plugin marketplace (WordPress, Shopify, etc.)
- 📋 API for third-party integrations
- 📋 Mobile app for on-the-go monitoring
Want to influence the roadmap? Open an issue or join the discussion.
- GitHub Issues: Report bugs or request features
- Documentation: See CHANGELOG.md, SECURITY.md, and platform guides in examples/
- Email: contact@adtruth.io
- ⭐ Star this repo to show support
- 👀 Watch releases to get notified of updates
- 📋 Read the CHANGELOG for version updates
The more businesses that use AdTruth, the better it works for everyone. Share with:
- Other small business owners
- Marketing agencies
- Developer communities
- Anyone paying for online advertising
This project is licensed under the MIT License - see the LICENSE file for details.
What this means:
- ✅ Use AdTruth commercially
- ✅ Modify the code
- ✅ Distribute your own versions
- ✅ Private use
⚠️ Must include copyright notice⚠️ No warranty provided
- Founded by Hongyi Shui - Building fraud protection for small businesses
- Inspired by research from Stanford, MIT, and industry fraud detection papers
- Special thanks to the open-source community for making projects like this possible
AdTruth - Protecting your ad spend through collective intelligence
Made with care for small businesses everywhere
Note: This project is still under development.