Fix: Google Analytics not tracking traffic even though fully authenticated with Analytify

Spread the love

We had a case where one of our sites just refused to sync with Google Analytics even though everything was installed correctly. We even reinstalled the analytics plugin, Analytify, multiple times and reauthenticated with Google Analytics successfully. However the site traffic remained at zero even though Google Search Console showed that traffic was indeed being driven to the site.

So what went wrong?

Well it turns out that this was a side effect of duplicating a website. This website was part of a larger network and had a similar website layout and content structure – the only difference was the actual content. So it made sense to duplicate the site and just change the contents.

Unfortunately the analytics plugin was not compatible with this behaviour and even though we reinstalled and reauthenticated multiple times, the front end source code still displayed the old website’s tracking code.

If your problem is similar to the behaviour listed above, perhaps the below fix will help you.

The Fix

Fixing this problem requires directly making changes to the database. It’s quite simple, really:

  1. Login to cPanel, Plesk, or whatever control panel you’re using, and access the database, typically via PHPmyadmin or a similar database access software.
  2. Locate the database your website is connected to, and hit Search
  3. Search for your *OLD* GA tracking code in all tables. You should see a result in wp_options under the column option_name “analytify_ua_code” or similar (if you’re using a different analytics software)
  4. Change the tracking code to your new code
  5. Test by clearing your website’s cache and reloading the website. Check the source code with Ctrl+U and Ctrl+F, it should reflect the new code now.

Hope this helps!


Spread the love