Wordpress Analytics

Attention! A Proxima Wordpress Plugin is in the works and is planned to be officially released in the near future.

Adding the Proxima Analytics script to a WordPress website allows you to track the performance of your website, including the number of visitors, pageviews, and more. However, you might not want to track your own visits, especially if you're an administrator and constantly making updates to the website. In this tutorial, we'll guide you through the process of adding the Proxima Analytics script to your WordPress website, excluding the admin interface from being tracked.

Here are the steps to add the Proxima Analytics script to a WordPress website:

  1. Log in to your WordPress website as an administrator.
  2. Navigate to the Appearance > Editor menu.
  3. Locate and open the theme's `header.php` file.
  4. Find the closing head tag (`<head>…</head>`) and paste the Proxima Analytics script immediately before it.
  5. Save the changes to the `header.php` file.

Next, we'll need to exclude the admin interface from being tracked. To do this, we'll use a simple PHP code snippet.

  1. Navigate to the Appearance > Editor menu again.
  2. Locate and open the `functions.php` file.
  3. Paste the following PHP code snippet at the end of the file:
function proxima_exclude_admin_interface() {
  if (is_admin()) { ?>
    <script>
        localStorage.proxima_ignore = true;
    </script>
  <?php
  }
}
add_action('admin_head', 'proxima_exclude_admin_interface');

Save the changes to the `functions.php` file.

That's it! Your WordPress website is now set up with Proxima Analytics, and the admin interface is excluded from being tracked. To check if the integration is working correctly, you can log in to your Proxima Analytics account and view your website's dashboard. If everything is set up correctly, you should see pageview data coming through in real-time.