GET STARTED

WordPress

Add the Attrifast snippet to your WordPress site — via the WPCode plugin or a one-line theme edit — and see your first pageview, usually within a minute.

Attrifast works on WordPress the same way it works everywhere: one script tag in your site's <head>. No theme-specific configuration, and the tracker is ~2.4 KB over the wire with no cookies by default.

Event collection requires an active subscription or trial — start the 7-day free trial during onboarding (no charge today, cancel anytime). On the free plan, the verify step below won't light up because events aren't collected.

Step 1 — Get your snippet

Add your site in Attrifast (onboarding step 1, or the dashboard), then open onboarding step 2 "Install script" → the WordPress tab, or Dashboard → Settings → Install scriptWordPress. Copy your snippet — it looks like this, with your own tracking ID:

<script defer data-tracking-id="YOUR_TRACKING_ID" src="https://api.attrifast.com/af.js"></script>

Step 2 — Add it to WordPress

With a plugin (recommended)

Install WPCode (Insert Headers and Footers) from the WordPress plugin directory, then paste the snippet under Header and save. This survives theme updates and works on any theme.

Without a plugin (advanced)

Prefer zero plugins? Go to Appearance → Theme File Editor → header.php and paste the snippet right before </head>.

This route needs a classic theme with a header.php (block themes and some managed hosts don't expose the file editor) — and a theme update can overwrite the edit, so prefer the plugin route when you can.

Step 3 — Verify

The Verify installation status in onboarding step 2 checks automatically — no button to press. Open your WordPress site in another tab and the status flips to "First pageview received — tracking is live.", usually within a minute. It shows one of three states:

  • Listening for your first pageview… — installed correctly? Visit your site once and wait a few seconds.
  • First pageview received — tracking is live. — done. This sticks: reloading the page won't reset it.
  • An amber plan notice — your plan doesn't include event collection yet (see the callout above). The snippet is fine; start the trial and the verifier lights up on the next visit.

The domain registered in Attrifast must match the domain WordPress serves from — www. and the apex are treated as the same site, and subdomains are covered automatically. Serving from a different domain entirely (say a second storefront)? Add it yourself under Dashboard → Settings → General → Allowed hostnames.

What you get

Everything in Install the tracker: pageviews, channel classification (including AI engines), engagement time, and UTM capture. WooCommerce order attribution isn't supported yet — for e-commerce revenue attribution, see Shopify or Stripe.

Last updated AI agent or LLM? Read this page as markdown