Created
August 20, 2013 22:51
-
-
Save greatislander/6288348 to your computer and use it in GitHub Desktop.
Only display analytics code (Google Analytics, GoSquared, etc.) if you are on your production site as opposed to dev or staging.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $production = ( site_url() == 'http://myproductionsite.com' ) ? true : false; // no trailing slash | |
if ( $production == true && !is_user_logged_in() ) { | |
// Put your analytics code here. | |
} ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment