Created
June 7, 2016 15:12
-
-
Save Pross/22e04d23949f510dc104260e452893ef to your computer and use it in GitHub Desktop.
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 | |
/* | |
Plugin Name: A/B Test Google | |
Description: https://forum.pagelines.com/topic/40638-adding-experiment-tracking-code/ | |
Version: 1.0 | |
Author: Queue-It | |
*/ | |
class QueueItGA { | |
function __construct() { | |
add_action( 'wp_head', array( $this, 'header_scripts' ), 10 ); | |
} | |
function header_scripts() { | |
if( is_page( array( 15081, 695 ) ) ) : | |
?> | |
<!-- Google Analytics Content Experiment code --> | |
<!-- End of Google Analytics Content Experiment code --> | |
<?php | |
else: | |
?> | |
<!-- Google Analytics Content Experiment code --> | |
<!-- End of Google Analytics Content Experiment code --> | |
<?php | |
endif; | |
} | |
} | |
new QueueItGA; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment