Add DataFast to your WordPress site
Follow these steps to integrate DataFast analytics into your WordPress site.
Method 1: Using a Plugin (Recommended)
-
Log in to your WordPress admin dashboard.
-
Navigate to Plugins and search for a plugin that allows adding scripts to headers and footers (e.g., "Insert Headers and Footers", "WPCode").
-
Install and activate the plugin.
-
Go to the plugin's settings page (often found under Settings or Tools).
-
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. ReplaceYOUR_DOMAIN.COM
with your website's root domain. -
Save the changes.
Method 2: Editing theme's header.php (Advanced)
-
In your WordPress admin dashboard, go to Appearance > Theme File Editor.
-
Select your active theme.
-
Find and open the
header.php
file (Theme Header). -
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. ReplaceYOUR_DOMAIN.COM
with your website's root domain. -
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.