Social Share Analytics is not active. To activate it please go to Social Buttons -> Social Sharing -> Share Analytics and activte it"; return; } ESSBSocialShareAnalyticsBackEnd::init_addional_settings (); // overall stats by social network if ($date != '' || $position != '') { $overall_stats = ESSBSocialShareAnalyticsBackEnd::essb_stats_by_networks ( '', '', $date, $position ); $position_stats = ESSBSocialShareAnalyticsBackEnd::essb_stats_by_position ( '', '', $date, $position ); } else { $overall_stats = ESSBSocialShareAnalyticsBackEnd::essb_stats_by_networks ( $month ); $position_stats = ESSBSocialShareAnalyticsBackEnd::essb_stats_by_position ( $month ); } // print_r($overall_stats); $calculated_total = 0; $networks_with_data = array (); if (isset ( $overall_stats )) { $cnt = 0; foreach ( $essb_networks as $k => $v ) { $calculated_total += intval ( $overall_stats->{$k} ); if (intval ( $overall_stats->{$k} ) != 0) { $networks_with_data [$k] = $calculated_total; } } } $device_stats = ESSBSocialShareAnalyticsBackEnd::essb_stats_by_device ( $month, '', $date, $position ); $today = date ( 'Y-m-d' ); $today_month = date ( 'Y-m' ); $essb_date_to = ""; $essb_date_from = ""; if ($essb_date_to == '') { $essb_date_to = date ( "Y-m-d" ); } if ($essb_date_from == '') { $essb_date_from = date ( "Y-m-d", strtotime ( date ( "Y-m-d", strtotime ( date ( "Y-m-d" ) ) ) . "-1 month" ) ); } if ($mode == "1") { $sqlObject = ESSBSocialShareAnalyticsBackEnd::getDateRangeRecords ( $essb_date_from, $essb_date_to ); // print_r($sqlObject); $dataPeriodObject = ESSBSocialShareAnalyticsBackEnd::sqlDateRangeRecordConvert ( $essb_date_from, $essb_date_to, $sqlObject ); $sqlMonthsData = ESSBSocialShareAnalyticsBackEnd::essb_stats_by_networks_by_months (); } ?>