PluginProbe ʕ •ᴥ•ʔ
ShareThis Dashboard for Google Analytics / 2.1
ShareThis Dashboard for Google Analytics v2.1
3.3.2 trunk 1.0.7 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.5 2.3.5 2.3.6 2.3.7 2.3.8 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 3.0.0 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.3.0 3.3.1
googleanalytics / class / controller / Ga_Frontend_Controller.php
googleanalytics / class / controller Last commit date
Ga_Admin_Controller.php 9 years ago Ga_Frontend_Controller.php 9 years ago
Ga_Frontend_Controller.php
29 lines
1 <?php
2
3 /**
4 * Created by PhpStorm.
5 * User: mdn
6 * Date: 2017-02-01
7 * Time: 09:46
8 */
9 class Ga_Frontend_Controller extends Ga_Controller_Core {
10
11 public static function googleanalytics_get_script() {
12 if ( !empty( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ] ) && strtolower( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ] ) == 'xmlhttprequest' ) {
13 $web_property_id = Ga_Frontend::get_web_property_id();
14 if ( Ga_Helper::should_load_ga_javascript( $web_property_id ) ) {
15 $javascript = Ga_View_Core::load( 'ga_code', array(
16 'data' => array(
17 Ga_Admin::GA_WEB_PROPERTY_ID_OPTION_NAME => $web_property_id
18 )
19 ), true );
20 echo strip_tags( $javascript );
21 }
22 } else {
23 wp_redirect( home_url() );
24 }
25 exit();
26 }
27
28 }
29