← Documentation

Installing SimpleData on WordPress

Track pageviews and WooCommerce revenue automatically

πŸ“¦ Download Plugin

Official WordPress plugin for SimpleData Analytics

Step 1: Get Your Site ID & Heartbeat Secret

  1. Log in to SimpleData Dashboard
  2. Go to Sites and create a new site
  3. If you have WooCommerce, set Site Type to Ecommerce
  4. Click on "Get Code" to open the installation modal
  5. Copy your Site ID and Heartbeat Secret (both are required for WordPress)

Step 2: Install the Plugin

Option A: Upload Plugin File

  1. Download the SimpleData Analytics plugin
  2. In WordPress admin, go to Plugins β†’ Add New
  3. Click Upload Plugin
  4. Choose the downloaded .zip file
  5. Click Install Now
  6. Click Activate

Option B: Install from WordPress.org (Coming Soon)

Once approved, you'll be able to search for "SimpleData Analytics" directly in the WordPress plugin directory.

Step 3: Configure the Plugin

  1. In WordPress admin, open SimpleData β†’ Settings in the left-hand menu
  2. Paste your Site ID in the "Site ID" field
  3. Paste your Heartbeat Secret in the "Heartbeat Secret" field
  4. Click Save settings, then Test connection: the status should read "Connected"

Before version 1.1.0 the settings lived under Settings β†’ SimpleData Analytics. That address still works and takes you to the new page.

The plugin settings: connection on the left, status on the right
The plugin settings: connection on the left, status on the right

βœ… Done! Pageviews are tracked on every page and, with WooCommerce, product views, add-to-cart and purchases too.

Your own visits are not counted: since version 1.1.4, the visits of logged-in administrators, editors and shop managers are left out. Their orders still count unless you tick "Do not count their orders", which leaves out any order they place, real ones included. Both are in SimpleData β†’ Settings β†’ "Your own visits"; for test orders, exclude your IP instead. More in Exclude your own visits β†’

Step 4: Your Statistics Inside WordPress

Since version 1.1.0 you don't need to leave WordPress to see how your site is doing. Open SimpleData β†’ Dashboard in the admin menu:

  • Visitors right now, refreshed every minute
  • Visitors and pageviews against the previous period, with a chart
  • Bounce rate and visit duration
  • Top pages, channels and countries
  • Revenue, orders and conversion rate if you use WooCommerce
  • Today, the last 7 days or the last 30 days
  • Hours and days on your site's clock, the time zone set for the site in SimpleData
The SimpleData dashboard inside WordPress
The SimpleData dashboard inside WordPress

There is also a "SimpleData β€” today" widget on the WordPress Dashboard home screen.

For filters, funnels, AI traffic and reports, click "Open full dashboard" to come here.

Without WooCommerce, the Store block appears blurred with a button to install it. The figures behind the blur are an example, not your data.

πŸ”’ Only administrators see the statistics. WordPress requests them from your server with a signed request; the Heartbeat Secret never reaches the browser.

Step 5: WooCommerce Integration (Automatic)

If you have WooCommerce installed, the plugin will automatically:

  • βœ… Detect WooCommerce
  • βœ… Track product views and add-to-cart, from the product page, the shop grid and the block cart
  • βœ… Track completed orders, once each, with revenue, products and currency
  • βœ… Keep your SimpleData currency in step with your store's

πŸ“ No additional configuration needed! Purchases are recorded on the order confirmation page. If the buyer never gets there β€” they paid through a gateway that redirects (Redsys, Bizum, PayPal) and closed the window, or a blocker stopped the tracker β€” your server sends the paid order 15 minutes later. Each order counts once.

Step 6: Verify Installation

Test Pageview Tracking

  1. Visit your WordPress site in a new incognito/private window
  2. Navigate to a few pages
  3. Open SimpleData β†’ Dashboard in WordPress, or your SimpleData dashboard
  4. Check that "Visitors right now" and the pageviews include your visit (may take 1-2 minutes)

Test WooCommerce Tracking

  1. Place a test order on your WooCommerce store. Logged in as an administrator, editor or shop manager, it arrives 15 minutes later (the tracker is not loaded for you), or not at all if you ticked "Do not count their orders"; in a private window, it arrives at once
  2. Complete the checkout process
  3. Wait 2-3 minutes
  4. Check your SimpleData dashboard for revenue, orders, and products

Updating the plugin

  • The plugin updates from the WordPress Plugins screen, like any other. From version 1.1.4 you can also turn on "Enable auto-updates" for it, and WordPress installs new versions on its own.
  • A site on 1.1.3 sees 1.1.4 offered but has to click "Update now" once: that version could not update in the background. On 1.1.2 or earlier, download the ZIP above and upload it once.
  • Every update is checked before WordPress installs it: the plugin accepts it only if its details are signed by SimpleData and the downloaded ZIP is exactly the one signed.
  • A new version can take up to 24 hours to appear: the plugin checks once a day.

Troubleshooting

Pageviews not showing

  • β€’Check Site ID: Ensure it's entered correctly in SimpleData β†’ Settings
  • β€’Check domain: Your WordPress domain must match the domain registered in SimpleData
  • β€’Clear cache: If using a caching plugin (WP Super Cache, W3 Total Cache), clear the cache
  • β€’Check browser console: Open DevTools (F12) and look for JavaScript errors
  • β€’Logged in: Your visits are not counted while you are logged in as an administrator, editor or shop manager (SimpleData β†’ Settings β†’ "Your own visits"). Test in a private window

WooCommerce orders not tracking

  • β€’Plugin activated: Ensure the SimpleData plugin is activated
  • β€’WooCommerce active: WooCommerce must be installed and activated
  • β€’Test order: Complete a real test order (not just add to cart)
  • β€’Unpaid orders: The server does not send an order left pending or failed; only processing, completed or on-hold orders
  • β€’Wait time: Usually 2-3 minutes; up to 15 if the buyer did not come back to the order page
  • β€’Placed while logged in: With "Do not count their orders" ticked, orders by logged-in administrators, editors and shop managers are left out on purpose, and the order has a note from SimpleData saying so. Untick it if those are real sales

The dashboard in WordPress shows an error

  • β€’Credentials not accepted: The Heartbeat Secret in SimpleData β†’ Settings must be the one shown for this site in SimpleData
  • β€’Could not reach SimpleData: Your hosting must allow WordPress to make outgoing HTTPS requests to api.simpledata.dev
  • β€’Store block blurred: WooCommerce is not active on this site. Activate it and the block shows your sales

Advanced: Manual Installation (Without Plugin)

If you prefer not to use the plugin, you can install the tracker manually:

1. Add Tracker Script

Add this to your theme's header.php before </head>:

<!-- SimpleData Analytics -->
<script async src="https://api.simpledata.dev/t.js"
  data-site-id="YOUR_SITE_ID"></script>

2. Track WooCommerce Purchases (Optional)

Add this to your theme's functions.php:

add_action('woocommerce_thankyou', 'simpledata_track_purchase');

function simpledata_track_purchase($order_id) {
    if (!$order_id) return;
    
    $order = wc_get_order($order_id);
    if (!$order) return;
    
    $products = [];
    foreach ($order->get_items() as $item) {
        $products[] = [
            'id' => $item->get_product_id(),
            'name' => $item->get_name(),
            'quantity' => $item->get_quantity(),
            // Unit price: get_total() is the line total, quantity included.
            'price' => floatval($item->get_total()) / max(1, $item->get_quantity()),
        ];
    }
    ?>
    <script>
    (function() {
        var checkTracker = setInterval(function() {
            if (window.simpleAnalytics && window.simpleAnalytics.trackPurchase) {
                clearInterval(checkTracker);
                window.simpleAnalytics.trackPurchase({
                    revenue: <?php echo floatval($order->get_total()); ?>,
                    currency: '<?php echo esc_js($order->get_currency()); ?>',
                    orderId: '<?php echo esc_js($order->get_order_number()); ?>',
                    products: <?php echo json_encode($products); ?>
                });
            }
        }, 100);
        setTimeout(function() { clearInterval(checkTracker); }, 5000);
    })();
    </script>
    <?php
}

Next Steps