Pixel Quickstart
Add SpamBlock to your site in under two minutes with a single script tag
Step 1: Add the script
Paste this before the closing </body> tag on any page with forms:
<script src="https://pixel.spamblock.io/latest.js" defer data-block-spam></script>
SpamBlock protects all forms on the page by default. Add data-block-spam on specific forms only if you want to limit which forms are protected.
Step 2: Submit a form
Load the page and submit a form. SpamBlock scores the submission in the background and injects marker fields before the form posts to your backend.
No account is required for basic pixel protection.
Step 3: Filter spam on your backend
Read the spamblock_score and spamblock_reasons marker fields from the submission payload. Apply your own score threshold on the server (for example, treat scores at or above 60 as spam).
Optional configuration
Tune behavior with data-* attributes on the script tag:
<script
src="https://pixel.spamblock.io/latest.js"
defer
data-block-spam
data-max-score="60"
data-debug="true">
</script>
See the configuration reference for all options.
Next steps
- HTML and JavaScript integration — native forms, SPAs, and event hooks
- Google Tag Manager — deploy without editing templates
- WordPress — plugin-free setup
- Forms Quickstart — hosted forms with analytics and webhooks