only add google analytics code for non-author users
-
I have the Google Analytics code on my site, with the appropriate code in the footer. There are two of us as authors on the site, and the site is new and small, so I am trying to figure out if there’s a way to set things up so that in the footer I can have code that makes it so:
“If this person is not logged in as an author, include the google analytics code; otherwise, do not include the google analytics code.”
That way, when the authors of the site are viewing pages on the site after having logged in, their clicks will not be counted by google analytics. But, people who are not logged in, or those who are subscribers but not authors, would be counted by google analytics.
I would appreciate advice — I am not a PHP-proficient coder, so the simpler the better. Thank you!
-Sara, [email protected]
- The topic ‘only add google analytics code for non-author users’ is closed to new replies.