WordPress
Updated 2026-11-02
Setup
Headstream has no WordPress plugin. You add the script tag yourself, in one of two ways. Copy your snippet from Project settings first.
Option 1: a header code plugin
If you already use a plugin that adds code to the site header, paste your snippet there, and apply it to the whole site.
Option 2: your child theme
Add this to your child theme's functions.php:
add_action('wp_head', function () {
echo '<script defer src="https://headstream-ingest.super-dream-7005.workers.dev/t.js" data-key="YOUR_KEY"></script>';
});
Use a child theme, since a theme update can overwrite changes to the parent. Only use one option, or your pageviews will double.
Exclude the admin area
The wp_head hook doesn't run on wp-admin pages, so your admin screens aren't tracked. A logged-in editor browsing the front of the site is tracked, though. To leave out your team, add their IP addresses under Project, in the exclusions card.
Caching
If you use a caching or optimization plugin, clear the cache after you add the script. Some plugins combine scripts. If the tag stops working, exclude it from that feature, since it reads data-key from its own tag.
Forms
The script reads email, name, company, phone and heard_about fields when a normal HTML form submits. Password and card fields are skipped. If a form plugin submits by JavaScript without a real submit event, the fields won't be read.
To capture "how did you hear about us?", name the field heard_about. See self-reported attribution.
Check it works
Load a page while logged out, then check your project's setup status. If you sell through WooCommerce with Stripe, connecting Stripe (beta) can import those payments, but it depends on the charges being in the Stripe account you connect.