Add DataFast to your WordPress site

Follow these steps to integrate DataFast analytics into your WordPress site.

Method 1: Using a Plugin (Recommended)

  1. Log in to your WordPress admin dashboard.

  2. Navigate to Plugins and search for a plugin that allows adding scripts to headers and footers (e.g., "Insert Headers and Footers", "WPCode").

  3. Install and activate the plugin.

  4. Go to the plugin's settings page (often found under Settings or Tools).

  5. Paste your DataFast tracking script into the "Scripts in Header" section:

    <script
      defer
      data-website-id="YOUR_WEBSITE_ID"
      data-domain="YOUR_DOMAIN.COM"
      src="https://datafa.st/js/script.js"
    ></script>
    

    Replace YOUR_WEBSITE_ID with your actual Website ID from DataFast. Replace YOUR_DOMAIN.COM with your website's root domain.

  6. Save the changes.

Method 2: Editing theme's header.php (Advanced)

This method requires basic knowledge of PHP and WordPress theme structure. Always back up your theme files before making changes. Changes might be overwritten by theme updates if you are not using a child theme.
  1. In your WordPress admin dashboard, go to Appearance > Theme File Editor.

  2. Select your active theme.

  3. Find and open the header.php file (Theme Header).

  4. Paste your DataFast tracking script just before the closing </head> tag:

    <script
      defer
      data-website-id="YOUR_WEBSITE_ID"
      data-domain="YOUR_DOMAIN.COM"
      src="https://datafa.st/js/script.js"
    ></script>
    

    Replace YOUR_WEBSITE_ID with your actual Website ID from DataFast. Replace YOUR_DOMAIN.COM with your website's root domain.

  5. Click Update File.

Verify installation

After implementing either method:

  • Visit your live website.
  • Check your DataFast dashboard for incoming data. It might take a few minutes for the first pageviews to appear.
Something missing? Suggest features ✍️