ENES Start free trial

Install FastAnalytics on WordPress

No dedicated plugin needed: WordPress only has to print one line in the head of every page.

FastAnalytics team · Updated · 3 min read

Option A: a header-code plugin (recommended)

  1. In WordPress, go to Plugins > Add New and install a header and footer code plugin, such as WPCode.
  2. Open the plugin's header and footer settings.
  3. Paste your FastAnalytics script in the Header box.
  4. Save. Open your site and check Realtime in your dashboard.
<script>window.hm=window.hm||function(){(window.hm.q=window.hm.q||[]).push(arguments)};</script>
<script defer src="https://e.fastanalytics.site/e.js" data-id="FA-XXXXXXXXXX"></script>

Option B: in your child theme

If you use a child theme, add this to its functions.php. Do not edit the parent theme: updates would erase the change.

add_action('wp_head', function () {
    echo '<script>window.hm=window.hm||function(){(window.hm.q=window.hm.q||[]).push(arguments)};</script>' . "\n";
    echo '<script defer src="https://e.fastanalytics.site/e.js" data-id="FA-XXXXXXXXXX"></script>' . "\n";
});

Caching and optimisation plugins

  • After installing, clear your cache (WP Rocket, LiteSpeed Cache, W3 Total Cache, Cloudflare…).
  • If an optimisation plugin combines or delays JavaScript, exclude e.fastanalytics.site/e.js from those options.

Visits from logged-in administrators are counted like any other. To exclude your own visits, see Check your installation.

FAQ

Does it work with WooCommerce?

Yes. The script measures every page, including product, cart and checkout pages. Use custom events to count purchases or sign-ups.

Keep reading