The snippet
After creating a website under Live data, you receive an embed code:
<script src="https://turbometrics.io/tm.min.js" data-site-id="YOUR_SITE_KEY" async></script>
This script has to be in the <head> of every page that should be measured. The async attribute makes sure it does not affect load time.
WordPress
Option 1: the official turbometrics plugin (recommended)
Install the turbometrics plugin straight from the WordPress directory. It embeds the tracking script automatically on all pages, optionally excludes administrators from tracking and shows Core Web Vitals as well as all 5 metrics in a WordPress dashboard widget.
- In WordPress, go to Plugins > Add new and search for turbometrics
- Click Install now, then Activate
- Enter your site key under Settings > turbometrics
Option 2: functions.php
Add the following code to the functions.php of your child theme:
add_action('wp_head', function () {
echo '<script src="https://turbometrics.io/tm.min.js" data-site-id="YOUR_SITE_KEY" async></script>';
}, 1);
The 1 as the priority makes sure the script is loaded early in the <head>.
Option 3: the "Insert Headers and Footers" plugin
- Install the WPCode plugin (formerly "Insert Headers and Footers")
- Go to Code Snippets > Header & Footer
- Paste the script tag into the Header field
- Save
Option 4: theme settings
Many WordPress themes offer a field for header scripts under Appearance > Customizer > Additional CSS/JS or in the theme options. Add the snippet code there.
Option 5: the wp_head hook via a plugin
If you use a plugin of your own:
<?php
/**
* Plugin Name: turbometrics Live-Daten
*/
add_action('wp_head', function () {
echo '<script src="https://turbometrics.io/tm.min.js" data-site-id="YOUR_SITE_KEY" async></script>';
}, 1);
Save it as turbometrics.php in the wp-content/plugins/ directory and activate the plugin.
Shopify
- Go to Online Store > Themes > Actions > Edit code
- Open
theme.liquid - Add the script tag directly before
</head> - Save
TYPO3
Via TypoScript:
page.headerData.99 = TEXT
page.headerData.99.value = <script src="https://turbometrics.io/tm.min.js" data-site-id="YOUR_SITE_KEY" async></script>
Static websites / HTML
Add the script tag directly into the <head> of your HTML files:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>My site</title>
<script src="https://turbometrics.io/tm.min.js" data-site-id="YOUR_SITE_KEY" async></script>
</head>
Next.js / React
In _app.tsx or layout.tsx:
import Script from 'next/script'
export default function Layout({ children }) {
return (
<html>
<head>
<Script
src="https://turbometrics.io/tm.min.js"
data-site-id="YOUR_SITE_KEY"
strategy="afterInteractive"
/>
</head>
<body>{children}</body>
</html>
)
}
Nuxt / Vue
In nuxt.config.ts:
export default defineNuxtConfig({
app: {
head: {
script: [
{ src: 'https://turbometrics.io/tm.min.js', 'data-site-id': 'YOUR_SITE_KEY', async: true }
]
}
}
})
Laravel
In your Blade layout (e.g. layouts/app.blade.php):
<head>
...
<script src="https://turbometrics.io/tm.min.js" data-site-id="YOUR_SITE_KEY" async></script>
</head>
Google Tag Manager
- Create a new tag: Custom HTML
- Paste the HTML:
<script src="https://turbometrics.io/tm.min.js" data-site-id="YOUR_SITE_KEY" async></script>
- Trigger: All Pages (or specific pages)
- Publish
Note: integration via Tag Manager can lead to the script being executed only after the initial load. As a result, individual metrics (above all FCP and LCP) can be missing on some page views. Embedding directly in the <head> is therefore more accurate.
Checking that it works
After embedding:
- Open your website in a normal browser (not incognito with ad blockers)
- Navigate through a few pages
- Go to Live data in turbometrics — the first measurements should appear after 1–2 minutes
If no data arrives:
- Check the browser console for errors
- Make sure the
data-site-idvalue is correct - Check whether ad blockers or content security policies are blocking the script