EOT; echo $ouput; } } } new ACHTM_REALLY_SIMPLE_GST(); // Google Analytics ID Class class ACHTM_REALLY_SIMPLE_GA { function __construct() { add_action('wp_head', array($this, 'achtm_show_google_analytics')); } public function achtm_show_google_analytics() { $analytics_code = get_option( 'achtm_google_anaytics_code' ); if(isset($analytics_code) && !empty($analytics_code)){ $ouput = << EOT; echo $ouput; } } } new ACHTM_REALLY_SIMPLE_GA(); // Google Tag Manager Class class ACHTM_GOOGLE_TAG_MANAGER { function __construct() { add_action('wp_head', array($this, 'achtm_header_google_tag_manager_id')); add_action('wp_body_open', array($this, 'achtm_body_google_tag_manager_id')); } public function achtm_header_google_tag_manager_id() { $tagmanager_id = get_option( 'achtm_tag_manager_id' ); if(isset($tagmanager_id) && !empty($tagmanager_id)){ $ouput = << EOT; echo $ouput; } } public function achtm_body_google_tag_manager_id() { $tagmanager_id = get_option( 'achtm_tag_manager_id' ); if(isset($tagmanager_id) && !empty($tagmanager_id)){ $ouput = << EOT; echo $ouput; } } } new ACHTM_GOOGLE_TAG_MANAGER(); ?>