From 42503ad90901c29fed737ddc8b97e1d0f5da33b2 Mon Sep 17 00:00:00 2001
From: CB9TOIIIA
Date: Tue, 14 Feb 2017 00:37:26 +0300
Subject: [PATCH] add YandexSearchPhrase
add YandexSearchPhrase
---
assets/css/sort.css | 2 +-
myjbzoostat.xml | 2 +-
updatemyjbzoostat.xml | 4 +--
views/checkoneurl/tmpl/default.php | 54 +++++++++++++++++++++++++++++-
4 files changed, 57 insertions(+), 5 deletions(-)
diff --git a/assets/css/sort.css b/assets/css/sort.css
index 4827ea5..de8b52b 100644
--- a/assets/css/sort.css
+++ b/assets/css/sort.css
@@ -51,7 +51,7 @@ b > big { text-transform: uppercase; }
display: inline-block; width: 95%;
}
.uk-panel .minismall {
- font-size: 14px !important; color: #101010 !important;
+ font-size: 1em !important; color: #101010 !important;
}
.uk-panel-box {
margin-bottom: 10px !important;
diff --git a/myjbzoostat.xml b/myjbzoostat.xml
index 6e1d0f8..8077302 100644
--- a/myjbzoostat.xml
+++ b/myjbzoostat.xml
@@ -6,7 +6,7 @@
http://cb9t.ru
- 2.5.15
+ 2.5.16
]]>
28 June 2016
diff --git a/updatemyjbzoostat.xml b/updatemyjbzoostat.xml
index a6d01ba..8f62048 100644
--- a/updatemyjbzoostat.xml
+++ b/updatemyjbzoostat.xml
@@ -5,12 +5,12 @@
MyJBZooStat
com_myjbzoostat
component
- 2.5.15
+ 2.5.16
https://github.com/CB9TOIIIA/MyJBZooStat/
-
+
diff --git a/views/checkoneurl/tmpl/default.php b/views/checkoneurl/tmpl/default.php
index ce70a75..7cd2116 100644
--- a/views/checkoneurl/tmpl/default.php
+++ b/views/checkoneurl/tmpl/default.php
@@ -113,6 +113,13 @@
});
';
+echo '
+';
+
//JUST DO IT $this->app ----> $app
?>
@@ -280,7 +287,21 @@
// dump($ResponceApiYandexexternalReferer,0,'ResponceApiYandexexternalReferer');
// dump($DataResponceApiYandexexternalReferer,0,'DataResponceApiYandexexternalReferer');
+//переходы с фразы
+ $ApiYandexSearchPhrase = 'https://api-metrika.yandex.ru/stat/v1/data?id='.$counter_id;
+ $ApiYandexSearchPhrase .= '&oauth_token='.$app_token;
+ $ApiYandexSearchPhrase .= '&preset=traffic&dimensions=ym:s:SearchPhrase&group=day&sort=ym:s:SearchPhrase&metrics=ym:s:visits,ym:s:users,ym:s:pageviews';
+ $ApiYandexSearchPhrase .= '&date1='.$date1;
+ $ApiYandexSearchPhrase .= '&date2='.$date2;
+ $ApiYandexSearchPhrase .= '&limit=10000';
+ $ApiYandexSearchPhrase .= '&filters=(ym:pv:URL=*%27'.$myurltosite.'%27)';
+ $ResponceApiYandexSearchPhrase = MetrikaHelper::open_http($ApiYandexSearchPhrase, $method);
+ $DataResponceApiYandexSearchPhrase = json_decode($ResponceApiYandexSearchPhrase);
+ $CountYandexSearchPhrase = count($DataResponceApiYandexSearchPhrase->data);
+
+// dump($ResponceApiYandexSearchPhrase,0,'ResponceApiYandexSearchPhrase');
+// dump($DataResponceApiYandexSearchPhrase,0,'DataResponceApiYandexSearchPhrase');
$ApiYandexisRobot = 'https://api-metrika.yandex.ru/stat/v1/data?id='.$counter_id;
@@ -348,7 +369,7 @@ function nice_num($n) {
Статистика по URL: " . "" .strip_tags(trim($myurltosite)). "
";?>
-
+
@@ -529,6 +550,37 @@ function nice_num($n) {
endif;
?>
+
+
+
+data) > 1) :
+ echo "Переходы по фразам
";
+ echo "";
+ echo "";
+ echo "";
+ echo "Фраза | Визиты | Посетители | Просмотры |
";
+ echo "";
+ echo "";
+
+ for ($i=0; $i < $CountYandexSearchPhrase ; $i++) {
+
+$YandexSearchPhraseName = $DataResponceApiYandexSearchPhrase->data[$i]->dimensions['0']->name;
+$YandexSearchPhraseMetrics = $DataResponceApiYandexSearchPhrase->data[$i]->metrics;
+
+ echo "";
+ echo "" .$YandexSearchPhraseName. " | ";
+ echo "" . $YandexSearchPhraseMetrics['0']. " | ";
+ echo "" . $YandexSearchPhraseMetrics['1']. " | ";
+ echo "" . $YandexSearchPhraseMetrics['2']. " | ";
+ echo "
";
+ }
+
+ echo "";
+ echo "
";
+endif;
+?>
+