PHP script to Prevent Google Analytics form Tracking Admin Info.

Discussion in 'PHP & Perl' started by Greybeard, Nov 12, 2011.

  1. Greybeard

    Greybeard Junior Member

    Joined:
    Aug 27, 2011
    Messages:
    185
    Likes Received:
    18
    Anyone know how to prevent Google Analytics from tracking my logins to WordPress?

    It's still doing it even though I set my preferences not to track them.
     
  2. BreakAllTheClocks

    BreakAllTheClocks Regular Member

    Joined:
    Apr 23, 2010
    Messages:
    421
    Likes Received:
    242
  3. Zapdos

    Zapdos Power Member

    Joined:
    Oct 22, 2011
    Messages:
    597
    Likes Received:
    708
    Location:
    Eastern North Carolina
    Above is likely assuming there is no user registrations.

    Code:
    if (!$someVarForAdminsOnly) {
      Your GA code here
    }
    
     
  4. Greybeard

    Greybeard Junior Member

    Joined:
    Aug 27, 2011
    Messages:
    185
    Likes Received:
    18
    Thanks, Break.

    I didn't even search for a plug-in because I assumed there wasn't one to do this.

    I'll check them out to before going the code route. Anything to avoid extra code, lol.