View Single Post
  #1  
Old 10-08-2012, 10:54 AM
Paul_H Paul_H is offline
Registered User
Genesis Member
 
Join Date: Sep 2011
Posts: 3
Default Conditionally enable/disable header_scripts

I've added my Google Analytics tracking code using the Genesis -> Theme Settings -> Header Script box on the admin page. What I would like to do is conditionally disable running the code I've entered into the Header Script box. The condition would be if the user is an authenticated user or not. The idea is to not track all of my own activity on the site when I'm logged in and creating and editing posts or adding new pages.

Is there a simple way to do this or do I need to take my tracking code out of Theme Settings -> Header Script and add a new action, conditionally, to wp_head, that adds the code?

Paul