Google Tag Manager
Firstly, I would suggest downloading Google's Tag Assistant in Google Chrome. You can then head back over to your website, where the Tag Assistant will inform you on whether it can 'see' your Google Analytics Tracking code.
Your next port of call is going to be to download FileZilla. This is a free piece of software that will provide you access to all of your Web Files.
Once you have successfully installed this piece of software, you need to log into your server via the
File > Site Manager method. This should take you to a screen, which looks something like:
It is important that you do not use the below login area, since this would result in sending your login credentials into 'Cyber Space' in plain text. In other words, they could be intercepted and then used for malicious purposes:
You may need help, from your hosting company, in obtaining the relevant login credentials.
Once you are logged in, you you should see all of your Web files appear within the main screen. Once identified, you need to head to head to your website's theme folder. Its Directory would looking something like:
Just be mindful that your Directory may look a little different.
Once you are within your Theme, you need to find the
header.php file. Drag this over to your Desktop and open it up. I would suggest using Notepad++.
You then need to see if the Google Analytics Tracking software is still displayed and that the correct UA has been used.
Google Tracking Codes are vary slightly, depending on the options you have selected within Google Analytics. That said, you would be looking for something like:
window.dataLayer = window.dataLayer || ;
gtag('js', new Date());
If your UA is nowhere to be found, then there is your problem. If you are running an eCommerce site, you may have other files, such as
header-shop.php too, within the same folder. If this is the case, check such a file to ensure that the Google Analytics Tracking Code is also present.
If you have created a Child Theme, you will also want to check the
header.php and any
header-xyz.php files there too.
robots.txt file would typically be stored within:
Again, your setup may be slightly different. Either way, you are looking to get into the folder that houses the
wp-includes folders. Once you have located the
robots.txt file, download it to your computer and see if it contains the following entry:
If it does, remove it. Then save the file and drag it back into the Folder you downloaded it from.
Some people prefer to use Plugins to manage their Google Analytics. Check your WordPress Dashboard for any Google Analytics Plugins that may either:
- Contain incorrect information;
- Have no information stored but is still overriding your own coding.
Either way, deactivate the Plugin and see if this brings about the desired solution,
If you are still experiencing issues, head into your WordPress Dashboard. Once logged in, head over to Settings > Reading. Then ensure that the 'Discourage search engines from indexing this site' option is not selected. I doubt this would change anything but worth a shot if all else has failed.
See how you get on with the above.