This Conditional Tag checks if the currently displayed post, page or post type is a preview. This is a boolean function that will return the value of the preview query value, which is either true or false for a front-end page.
<?php is_preview(); ?>
This tag does not accept any parameters.
if ( ! is_preview() ) { // Include analytics code }
Since: 2.0.0
is_preview() is located in wp-includes/query.php
.