GAinWP Google Analytics Integration for WordPress

GAinWP Google Analytics Integration for WordPress | IntelligenceWP


The GAinWP Google Analytics Integration for WordPress plugin easily integrates Google Analytics tracking and dashboard reporting into your website in just minutes.

It was created from the excellent Google Analytics Dashboard for WordPress (GADWP) plugin to maintain a simple, direct Google Analytics integration for those concerned about data privacy.

In addition to a set of general Google Analytics stats, in-depth page reports and in-depth post reports allow further segmentation of your analytics data, providing performance details for each post or page from your website.

The Google Analytics tracking code is fully customizable through options and hooks, allowing advanced data collection like custom dimensions and events.

Google Analytics Real-Time Stats

Google Analytics reports, in real-time, in your dashboard screen:

  • Real-time number of visitors
  • Real-time acquisition channels
  • Real-time traffic sources details

Google Analytics Reports

The Google Analytics reports you need, on your dashboard, in your All Posts and All Pages screens, and on site’s frontend:

  • Sessions, organic searches, page views, bounce rate analytics stats
  • Locations, pages, referrers, keywords, 404 errors analytics stats
  • Traffic channels, social networks, traffic mediums, search engines analytics stats
  • Device categories, browsers, operating systems, screen resolutions, mobile brands analytics stats

In addition, you can control who can view specific Google Analytics reports by setting permissions based on user roles.

Google Analytics Tracking

Installs the latest Google Analytics tracking code and allows full code customization:

  • Universal Google Analytics (analytics.js) tracking code
  • Global Site Tag (gtag.js) tracking code
  • Enhanced link attribution
  • Remarketing, demographics and interests tracking
  • Page Speed sampling rate control
  • User sampling rate control
  • Cross domain tracking
  • Exclude user roles from tracking
  • Accelerated Mobile Pages (AMP) support for Google Analytics
  • Ecommerce support for Google Analytics

User privacy oriented features:

  • IP address anonymization
  • option to follow Do Not Track (DNT) sent by browsers
  • support for user tracking opt-out

GAinWP enables you to easily track events like:

  • Downloads
  • Emails
  • Outbound links
  • Affiliate links
  • Fragment identifiers
  • Telephone
  • Page Scrolling Depth
  • Custom event categories, actions and labels using annotated HTML elements

With GAinWP you can use custom dimensions to track:

  • Authors
  • Publication year
  • Publication month
  • Categories
  • Tags
  • User engagement

Actions and filters are available for further Google Analytics tracking code customization.

Google Tag Manager Tracking

As an alternative to Google Analytics tracking code, you can use Google Tag Manager for tracking:

  • Google Tag Manager code
  • Data Layer variables: authors, publication year, publication month, categories, tags, user type
  • Exclude user roles from tracking
  • Accelerated Mobile Pages (AMP) support for Google Tag Manager

Accelerated Mobile Pages (AMP) features

  • Google Tag Manager basic tracking
  • Google Analytics basic tracking
  • Automatically removes amp/ from Google Analytics tracking page URL
  • Scrolling depth tracking
  • Custom dimensions tracking
  • User sampling rate control
  • Form submit tracking
  • File downloads tracking
  • Affiliate links tracking
  • Hashmarks, outbound links, telephones and e-mails tracking
  • Custom event categories, actions and labels using annotated HTML elements

GAinWP on Multisite

This plugin is fully compatible with multisite network installs, allowing three setup modes:

  • Mode 1: network activated using multiple Google Analytics accounts
  • Mode 2: network activated using a single Google Analytics account
  • Mode 3: network deactivated using multiple Google Analytics accounts

GAinWP on GitHub
You can submit feature requests or bugs on GAinWP repository.

Why this Plugin

The IntelligenceWP project leverages the GADWP plugin for core Google Analytics integrations.

After the Google Analytics Dashboard for WordPress changed maintainers in April 2018, users expressed concern over the new auth process proving 3rd party access to Google API keys and analytics data.

GAinWP implements a direct auth process where API keys only reside in your WordPress site eliminating 3rd party access.

The long term goal of the project is to provide an open, standards based Google Analytics WordPress API to facilitate integration of Google Analytics data by other plugins and themes into WordPress.


This plugin was originally created by Alin Marcu as the Google Analytics Dashboard for WordPress (GADWP)

Standard Installation

  1. Upload the full ga-in directory into your wp-content/plugins directory.
  2. In WordPress select Plugins from your sidebar menu and activate the GAINWP – Google Analytics Integration for WordPress plugin.
  3. Open the plugin General Settings page, which is located under Google Analytics menu.
  4. Make sure Setup Mode is set to “Tracking & Reporting” (default).
  5. Click the Authorize Plugin button.
  6. Click the red Get Access Code link to open a new browser tab/window and follow the steps to generate the code.
  7. Back on your WordPress browser tab/window, copy and paste the access code into the Access Code input field.
  8. Click Save Access Code button.
  9. After the save, select the Tracking ID / View for your site.
  10. Click the Save Changes button.

Reporting Only Installation

  1. Complete steps 1-3 from the Standard Installation.
  2. Set Setup Mode to “Reporting only”.
  3. Click Save Changes.
  4. Complete steps 5-8 from the Standard Installation.

Tracking Only Installation

  1. Follow setups 1-3 of the Standard Installation.
  2. Set Setup Mode to “Tracking only”.
  3. Copy and paste your Tracking ID from Google Analytics into the Tracking ID input.
  4. Click Save Changes.


You can translate GAinWP on


GAinWP it’s released under the GPLv2, you can use it free of charge on your personal or commercial website.


The Standard Installation enables both tracking and reporting for your site. If you already have tracking you want to keep, see Reporting Only Installation below. If you only want track your site in Google Analytics and not connect to reporting data, see Tracking Only Installation below.

Plugin author


Plugin official website address
If you encounter problems in using the GAinWP Google Analytics Integration for WordPress plugin, you can comment below, and I will try my best to help you solve the problem

Leave a Comment

Your email address will not be published.