Many of us do live editing on our wordpress blogs and previewing it over and again just adds wrong data to our Google Analytics account. To prevent this, here is a simple to implement trick, which is proven to help.

Procedure:

Note: Do take backup of the file before you try this.

01. Replace this with your current Google Analytics Code:

<?php if( !is_preview()) { ?>
#Put Google Analytics Code Here#
<?php } ?>


This concludes this simple and useful tutorial. Hope you like it.