1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5.00 out of 5)

Hide Your Analytics Tracking Code From Your IP Address

You may want to hide your Google analytics tracking code from your IP address. Why? So you can get more accurate data from the analytics program. If you track your own visits that is not giving you the full picture of your visits. Here is how you do it.

Step #1 Hide Your Analytics Tracking Code From Your IP Address

Go to Google search and type in “What is my IP”. You will see that Google shows you your IP address.

Tip: Click on images to make them larger. If you find anything wrong on this page or need further assistance please comment below or contact me. 🙂


Step #2 For Hiding Analytics Code From Yourself

Now you know your IP address. Open up a text editor and paste the following code into it. You have to do 2 things to this code.

Subscribe To My YouTube Channel:
  1. Replace your.ip.address with your actual IP address. Make sure that you leave the single ‘ on both sides of the ip address.
  2. Paste your analytics code over top where it says PASTE YOUR ANALYTICS CODE HERE. Again make sure you leave the single quote ‘ on both sides of the code.
add_action('wp_head', 'dont_track_my_ip');
function dont_track_my_ip() {
echo 'Paste your Google Analytics code here';
echo '';

Step #3 To Hide Your Google Analytics Code

Navigate to your themes functions file. Hopefully this is a child theme. Paste the code at the bottom of your functions file before the php closing tag if you have one, “?>”. Save the file.

Step #4 Check your Browser

Load up your google analytics in one tab and in another tab load your website. In Google analytics go to real time and see if you can see your location. You should not see yourself.

Hide Your Analytics Tracking Code From Your IP Address was last modified: June 12th, 2017 by Maximus Mccullough

Please like, share and subscribe.

Advanced Programming Made Easy

I hope you enjoyed the article. If I was able to help you please consider a tip for the content.

One Time Tip

more tips

Reoccuring Tips


Cool People Share:

Pages: 1 2 Next

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.