← Docs home

Add Pinfox to your WordPress site

Follow these steps to integrate Pinfox 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 Pinfox tracking script into the "Scripts in Header" section:
<script
  defer
  src="https://freemium.pinfox.io/analytics.js"
  data-site-id="YOUR_WEBSITE_ID"
></script>

Replace YOUR_WEBSITE_ID with your actual Website ID from your Pinfox dashboard (found after adding a site in your Dashboard).

Save the changes.

Community plugins

Pinfox for WordPress

These are community-built plugins. They haven't been reviewed or endorsed by Pinfox, so please use your own judgment when installing them.

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 Pinfox tracking script just before the closing </head> tag:
<script
  defer
  src="https://freemium.pinfox.io/analytics.js"
  data-site-id="YOUR_WEBSITE_ID"
></script>

Replace YOUR_WEBSITE_ID with your actual Website ID from Pinfox.

Click Update File.

Verify installation

After implementing either method:

  • Visit your live website.
  • Check your Pinfox dashboard for incoming data. It might take a few minutes for the first pageviews to appear.

WordPress Troubleshooting

Caching Plugin Conflict?

If you're using WP Rocket, Autoptimize, or LiteSpeed Cache, ensure that the Pinfox script is NOT being minified or combined in a way that breaks its execution. Most caching plugins have a "Script Exclusions" list — add `api.pinfox.io/script/analytics.js` to that list if you experience issues.

AMP Support

Pinfox.io works best on standard WordPress themes. If you're using an AMP plugin, you might need to use a custom integration method as AMP restricts standard JavaScript injection. For most modern responsive themes, the "Header injection" method is the most reliable.

Why WordPress users love Pinfox

Google Analytics is often bloated for simple WordPress blogs. Pinfox provides exactly what you need: visitor counts, top articles, and referral traffic, without the heavy dashboard that slows down your WordPress admin area.

"I replaced my 3 heavy plugins with one Pinfox script and my PageSpeed score jumped by 15 points." — Verified WordPress User

Why choose Pinfox for your analytics?

Privacy-First & Cookieless

Pinfox doesn't use cookies or any form of persistent tracking. We respect your visitors' privacy and help you comply with GDPR, CCPA, and PECR without needing annoying cookie banners.

Ultra-Lightweight Script

Our tracking script is less than 1KB. It won't slow down your site or affect your Core Web Vitals. Keep your site fast while getting the insights you need.

Real-Time Data Streams

See your traffic as it happens. Our real-time dashboard updates instantly, allowing you to see the immediate impact of your marketing efforts and launches.

No Data Sampling

Unlike Google Analytics, we never sample your data. You get 100% accurate reporting, regardless of how much traffic your website receives.

Frequently Asked Questions

Do I need a cookie banner with Pinfox?

No. Since Pinfox doesn't use cookies and doesn't collect personal data, you don't need to display a cookie consent banner for analytics purposes. This improves your user experience and conversion rates.

Can I track custom events?

Yes! Pinfox supports custom event tracking. You can track button clicks, form submissions, and other user interactions to better understand how visitors engage with your site.

Is Pinfox compatible with SPA frameworks?

Absolutely. Pinfox is built to work seamlessly with modern frameworks like React, Vue, Angular, Next.js, and more. It automatically handles client-side routing and virtual pageviews.

Metrics we track

  • Unique Visitors
  • Total Pageviews
  • Referrer Sources
  • Top Pages & Content
  • Geographic Location
  • Device & Browser Info