This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

NK Google Analytics


Need Google Analytics on your website? NK Google Analytics adds the required javascript to track your website, it supports Classic, Universal and Remarketing Google Analytics tracking code.

For more information about Google Analytics visit:
Google Analytics

For more information about Display Advertising
Support Display Advertising

NK Google Analytics its simple, just add your Google Analytics ID and click “Save changes”


  • Supports standard Google Analytics tracking via the latest async tracking methods (faster and more reliable than the older ga.js tracking method)
  • Inserts your tracking code on all theme pages
  • Inserts your tracking code into Head or Footer area
  • Supports Classic Google Analytics tracking code
  • Supports Universal Google Analytics tracking code
  • Supports Display Advertising (Remarketing) tracking code
  • Supports Custom Google Analytics tracking code
  • No tracking for admin users logged-in
  • Track login and register page if you want to
  • Don’t track logged users by role
  • Supports cookieless tracking using fingerprint.js
  • Can anonymize ip
  • Other values, dimensions and metrics
  • Options per page/post
  • Google Tag Manager support

NK Google Analytics enables Google Analytics on all pages.

Feedback / Review

Please take the time to rate this plugin, let me and others to know about your experiences by leaving a review, with your help I can improve the plugin for you and other users.

Want to collaborate? Find this plugin on GitHub.


  • Modified settings panel with NK Google Analytics.
  • NK Google Analytics basic settings page.
  • NK Google Analytics EU Cookie Law support page.
  • NK Google Analytics more settings page.


If you don’t have an Google Analytics ID, you need to go to Google Analytics, create an account and get the code (Similar to UA-0000000-0)

  1. Upload nk-google-analytics directory to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Add the ID from Google Analytics (UA-0000000-0) to the settings (Admin > Settings > NK Google Analytics > Google Analytics ID field) and press “Save Changes”
  4. Change other options like “Enable Remarketing” or “Universal Analytics” if you want


Does NK Google Analytics supports classic Tracking code?

Yes, it does.

Does NK Google Analytics supports Universal Tracking code?

Yes, it does.

Does NK Google Analytics supports Display Advertising / Remarketing Tracking code?

Yes, it does.

Does NK Google Analytics supports Custom Tracking code?

Yes, it does.

The plugin should work as soon as the Google Analytics code is inserted?


What kind of Google Analytics do I have?

You should go to and select your website profile. After select “Admin > Tracking Info” .

For Universal Analytics you will see this label: “Universal Analytics is enabled for this property.”, for Classic Analytics you doesn’t

Is the plugin working?

You can enter to real time panel into google/analytics and navigate into your website to test if the tracking code is working

The plugin can enable Display Advertising for Classic and Universal Analytics?

Yes, it does.

The plugin can track login and register page?

If the option is set to “Yes”, Yes, it does.

There is an option to select where the tracking code will be inserted in head of footer?


There is an option to ignore users by role?


What does “NK Google Analytics Status” option do?

This option can “turn off” the plugin, if is set to “on” the plugin will print tracking code in the web page, if not, the plugin will not insert the tracking code.

How accurate is cookieless tracking using fingerprint.js?

It is ~90% accurate. The next version fingerprint2.js will be even better, but it is still in development at


Miyzan 3, 2016 1 reply
After having an issue with Yoast SEO’s tracking code not working (after hours of troubleshooting, reauthenticating, disabling W3TC’s minification), I decided to try this small plugin. I installed it, turned it on, pasted my tracking code, and it is working! After I made sure it was working by viewing my Real Time Visitors report in GA, I re-enabled minification in W3TC. The tracking code for this plugin still works and appears when I “view page source.” So far so good! Thanks!
Read all 24 reviews

Contributors & Developers

“NK Google Analytics” is open source software. The following people have contributed to this plugin.


“NK Google Analytics” has been translated into 1 locale. Thank you to the translators for their contributions.

Translate “NK Google Analytics” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Bug Fix with EU Cookie Law vs. Global Site Tag


  • Minor fix


  • Updated to Google Tag
  • Tested up WordPress 5.3.1


  • PHP compatibility fixes
  • Tested up WordPress 5.2.3


  • Minor fixes
  • Tested up WordPress 4.9.7


  • Minor fixes
  • Clean some comments in code
  • Tested up WordPress 4.9.5


  • Minor fixes
  • Clean some comments in code


  • Google Tag Manager better support
  • Minor code fixes


  • Minor code fixes


  • Minor code fixes


  • Added missing file
  • Minor code fixes


  • Added settings for other values, dimensions and metrics. Thank you to javitury (
  • Added options per page/post
  • Minor code fixes


  • Added missing file
  • Minor code fixes


  • Added EU cookie law support ( Thank you to javitury (
  • Minor code fixes


  • Fix CSS Conflict (


  • Custom code bug fix


  • Remove “free tools” links


  • Minor fix, change in styles (
  • Some changes (


  • Minor fix, removed some code (


  • Minor fix


  • Improved interface
  • Role level control for tracking code (,


  • Minor code fix (


  • Minor code fixes


  • Changes in menu
  • Fixed HTTPS (


  • Changes in menu
  • Added links for sumome


  • Corrected a conflict with plugin “wpMandrill”


  • Corrected a conflict with plugin “janrain social sharing”


  • login and register page tracking fix


  • Display Advertising “failover” fix (thanks to user j_shb)
  • Changes to Enable demographics in Universal Analytics (thanks to user Levi_r)
  • Added option to add tracking code to login and register page


  • Fixes


  • Added option to select tracking code location (head or end of page)
  • Minor fixes


  • Removed an error_log call, so the log file will not grow more
  • Added an index.html file in plugin’s directory to avoid to crawlers to index it


  • Upgraded some validations and fixed some minor bugs


  • Tracking issue fix with remarketing tracking code


  • New on/off option.
  • Retyped and reordered some option for improve reading and comprehension of options.


  • Custom code fix.


  • Update documentation and FAQ.
  • Added Universal Analytics domain verification.


  • Fix some minor bugs.


  • Added support to custom Google Analytics tracking code.


  • Google Analytics ID setting verification.


  • Fix some minor bugs.
  • Update documentation.


  • Fix some bugs.


  • First release.