Documentation
WordPress
Add Measure to your WordPress site without any plugins.
Step 1
Add via theme header
The simplest way to add Measure is through your theme's
header.php
file. Navigate to
Appearance → Theme File Editor and select
header.php
from the sidebar.
Add the Measure script tag just before the closing
</head> tag:
<script src="https://lets.measure.events/api/script/YOUR_TRACKING_ID"></script> </head>
Step 2
Or use functions.php
If you prefer to keep your theme files clean, you can
enqueue the script from
functions.php.
This approach also survives theme updates if you're using
a child theme.
function measure_tracking_script() {
wp_enqueue_script(
'measure-analytics',
'https://lets.measure.events/api/script/YOUR_TRACKING_ID',
array(),
null,
false
);
}
add_action( 'wp_enqueue_scripts', 'measure_tracking_script' );
Replace YOUR_TRACKING_ID
with the tracking ID from your dashboard.
What about plugins?
You don't need one. Measure is a single script tag with no configuration, no settings page, and no database tables. A plugin would just be a wrapper around the two lines above.
If you're already using a plugin like Insert Headers and Footers or WPCode, you can paste the script tag there instead. The result is the same.
Works with every WordPress setup
Because Measure is just a script tag, it works everywhere WordPress runs:
- Self-hosted WordPress
- WordPress.com Business and Commerce plans
- WooCommerce stores
- Managed hosts like WP Engine, Flywheel, and Kinsta
- Headless WordPress with any front-end
Next steps
Continue exploring the documentation.
- UTM Parameters — track marketing campaigns automatically
- Data Collection — what we collect and what we don't
- AI Agent Analytics — detect traffic from AI agents