git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7522 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>statsorigin</name>
|
||||
<displayName>Visitors origin</displayName>
|
||||
<version>1</version>
|
||||
<description>Display the websites your visitors come from.</description>
|
||||
<author>PrestaShop</author>
|
||||
<tab>analytics_stats</tab>
|
||||
<is_configurable>0</is_configurable>
|
||||
<need_instance>1</need_instance>
|
||||
</module>
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_f0b1507c6bdcdefb60a0e6f9b89d4ae8'] = 'Herkunft des Besuchers';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_ada7786973910e9c8cb95f0450bf55c3'] = 'Anzeige der Webseiten, von denen Ihre Besucher kommen';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_14542f5997c4a02d4276da364657f501'] = 'Direkt-Link';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_3edf8ca26a1ec14dd6e91dd277ae1de6'] = 'Herkunft';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_b5c1b8a326be0d2fb25b3cf6da677d0e'] = 'Hier ist der Prozentsatz der 10 beliebtesten Referrer-Webseiten, über die Besucher zu Ihrem Shop gekommen sind.';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_998e4c5c80f27dec552e99dfed34889a'] = 'CSV-Export';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_96b0141273eabab320119c467cdcaf17'] = 'Insgesamt';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_0bebf95ee829c33f34fde535ed4ed100'] = 'Nur direkte Links';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_64ae584c62d0992a911d52122ebefc9a'] = 'Was ist eine Referrer-Webseite?';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_77de261cf4c31a96146bcf1b52fd9856'] = 'Beim Besuch einer Webseite ist der Referrer die URL der vorherigen Webseite, von der ein Link folgte.';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_d8d034b6911b1ce74bdb2158a14cd287'] = 'Ein Referrer informiert Sie darüber, welche Keywords Besucher in Suchmaschinen eingeben, wenn sie zu ihrem Shop kommen wollen, und optimiert damit auch Ihre Werbung im Web.';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_af19c8da1c414055c960a73d86471119'] = 'Referrer können sein:';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_a3dec1a06e19a810a9a4884293f666d0'] = 'Jemand, der einen Link zu Ihrem Shop auf seiner Webseite hat';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_95b90f58e843b56885beabf4802676a9'] = 'Ein Partner, mit dem Sie Links getauscht haben, um die Verkäufe zu erhöhen oder Neukunden anzuziehen';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_7a82cc29e910ea0c07501d5fe809fd75'] = '10 erste Webseiten';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_52ef9633d88a7480b3a938ff9eaa2a25'] = 'Andere';
|
||||
@@ -1,4 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_f0b1507c6bdcdefb60a0e6f9b89d4ae8'] = 'Procedencia de los visitantes';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_ada7786973910e9c8cb95f0450bf55c3'] = 'Muestra los sitios Web de los que proceden sus visitantes';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_14542f5997c4a02d4276da364657f501'] = 'Enlace directo';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_3edf8ca26a1ec14dd6e91dd277ae1de6'] = 'Origen';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_b5c1b8a326be0d2fb25b3cf6da677d0e'] = 'Porcentaje de los diez mejores sitios referentes por los que pasan los visitantes para acceder a su tienda.';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_998e4c5c80f27dec552e99dfed34889a'] = 'CSV Export';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_96b0141273eabab320119c467cdcaf17'] = 'Total';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_0bebf95ee829c33f34fde535ed4ed100'] = 'Enlaces directos solamente';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guía';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_64ae584c62d0992a911d52122ebefc9a'] = '¿Cuál es el sitio web referente?';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_77de261cf4c31a96146bcf1b52fd9856'] = 'Cuando se visita una página web, el referente es la URL de la página web anterior desde la cual se siguió el enlace.';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_d8d034b6911b1ce74bdb2158a14cd287'] = 'Un referente le permite saber qué palabras claves incorporan los visitantes en motores de búsqueda cuando intentan acceder a su tienda; y también optimizar su promoción en la Webrnrn';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_af19c8da1c414055c960a73d86471119'] = 'Un referente puede ser';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_a3dec1a06e19a810a9a4884293f666d0'] = 'Alguien ha puesto un link de su tienda en su sitio Web';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_95b90f58e843b56885beabf4802676a9'] = 'Un colaborador con quien intercambió enlaces para aumentar las ventas o para atraer nueva clientela. ';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_7a82cc29e910ea0c07501d5fe809fd75'] = '10 primeros sitios web';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_52ef9633d88a7480b3a938ff9eaa2a25'] = 'Otros';
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_f0b1507c6bdcdefb60a0e6f9b89d4ae8'] = 'Sites affluents';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_ada7786973910e9c8cb95f0450bf55c3'] = 'Affiche les sites d\'origine de vos visiteurs';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_14542f5997c4a02d4276da364657f501'] = 'Lien direct';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_3edf8ca26a1ec14dd6e91dd277ae1de6'] = 'Origine';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_b5c1b8a326be0d2fb25b3cf6da677d0e'] = 'Pourcentage des 10 meilleurs sites affluents par lesquels les visiteurs passent pour accéder à votre boutique.';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_96b0141273eabab320119c467cdcaf17'] = 'Total';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_0bebf95ee829c33f34fde535ed4ed100'] = 'Liens directs uniquement';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_64ae584c62d0992a911d52122ebefc9a'] = 'Qu\'est-ce qu\'un site affluent (référant) ?';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_77de261cf4c31a96146bcf1b52fd9856'] = 'Lorsqu\'un internaute visite une page web, le site affluent est l\'URL du lien qu\'a suivi le visiteur pour accéder à sa page web actuelle.';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_d8d034b6911b1ce74bdb2158a14cd287'] = 'Un référant vous permet de savoir quels sont les mots clés tapés par les visiteurs dans les moteurs de recherche quand ils tentent d\'aller sur votre boutique; et ainsi d\'optimiser le référencement de votre boutique.';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_af19c8da1c414055c960a73d86471119'] = 'Un référant peut être :';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_a3dec1a06e19a810a9a4884293f666d0'] = 'Quelqu\'un qui a mis un lien de votre boutique sur son site';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_95b90f58e843b56885beabf4802676a9'] = 'Un partenaire avec lequel vous avez fait un échange de lien visant à rapporter des ventes ou attirer de nouveaux clients';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_7a82cc29e910ea0c07501d5fe809fd75'] = '10 premiers sites';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_52ef9633d88a7480b3a938ff9eaa2a25'] = 'Autres';
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_f0b1507c6bdcdefb60a0e6f9b89d4ae8'] = 'Origine visitatori';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_ada7786973910e9c8cb95f0450bf55c3'] = 'Visualizzare i siti web da cui provengono i tuoi visitatori';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_14542f5997c4a02d4276da364657f501'] = 'Link diretto';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_3edf8ca26a1ec14dd6e91dd277ae1de6'] = 'Origine';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_b5c1b8a326be0d2fb25b3cf6da677d0e'] = 'Ecco la percentuale dei 10 siti più popolari di riferimento dai quali i visitatori hanno raggiunto il tuo negozio.';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_998e4c5c80f27dec552e99dfed34889a'] = 'Esporta CSV';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_96b0141273eabab320119c467cdcaf17'] = 'Totale';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_0bebf95ee829c33f34fde535ed4ed100'] = 'Solo link diretti ';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guida';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_64ae584c62d0992a911d52122ebefc9a'] = 'Che cosa è un sito web di riferimento?';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_77de261cf4c31a96146bcf1b52fd9856'] = 'Quando si visita una pagina web, il riferimento è l\'URL della pagina web precedente da cui è stato seguito un link.';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_d8d034b6911b1ce74bdb2158a14cd287'] = 'Un riferimento consente di sapere quali parole chiave sono state inserite dai visitatori nei motori di ricerca quando hanno cercato di raggiungere il tuo negozio, e anche per ottimizzare la promozione sul web.';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_af19c8da1c414055c960a73d86471119'] = 'Un riferimento può essere:';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_a3dec1a06e19a810a9a4884293f666d0'] = 'Qualcuno che mettere un link sul suo sito web verso il tuo negozio';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_95b90f58e843b56885beabf4802676a9'] = 'Un partner con cui hai fatto uno scambio di link al fine di aumentare le vendite o attirare nuovi clienti';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_7a82cc29e910ea0c07501d5fe809fd75'] = 'I primi 10 siti web ';
|
||||
$_MODULE['<{statsorigin}prestashop>statsorigin_52ef9633d88a7480b3a938ff9eaa2a25'] = 'Altri';
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 967 B |
@@ -1,147 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
exit;
|
||||
|
||||
class StatsOrigin extends ModuleGraph
|
||||
{
|
||||
private $_html;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
$this->name = 'statsorigin';
|
||||
$this->tab = 'analytics_stats';
|
||||
$this->version = 1.0;
|
||||
$this->author = 'PrestaShop';
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('Visitors origin');
|
||||
$this->description = $this->l('Display the websites your visitors come from.');
|
||||
}
|
||||
|
||||
function install()
|
||||
{
|
||||
return (parent::install() AND $this->registerHook('AdminStatsModules'));
|
||||
}
|
||||
|
||||
private function getOrigins($dateBetween)
|
||||
{
|
||||
$directLink = $this->l('Direct link');
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
SELECT c.http_referer
|
||||
FROM '._DB_PREFIX_.'connections c
|
||||
WHERE c.date_add BETWEEN '.$dateBetween, false);
|
||||
$websites = array($directLink => 0);
|
||||
while ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->nextRow($result))
|
||||
{
|
||||
if (!isset($row['http_referer']) OR empty($row['http_referer']))
|
||||
++$websites[$directLink];
|
||||
else
|
||||
{
|
||||
$website = preg_replace('/^www./', '', parse_url($row['http_referer'], PHP_URL_HOST));
|
||||
if (!isset($websites[$website]))
|
||||
$websites[$website] = 1;
|
||||
else
|
||||
++$websites[$website];
|
||||
}
|
||||
}
|
||||
arsort($websites);
|
||||
return $websites;
|
||||
}
|
||||
|
||||
function hookAdminStatsModules()
|
||||
{
|
||||
$websites = $this->getOrigins(ModuleGraph::getDateBetween());
|
||||
if (Tools::getValue('export'))
|
||||
if (Tools::getValue('exportType') == 'top')
|
||||
$this->csvExport(array('type' => 'pie'));
|
||||
$this->_html = '<fieldset class="width3"><legend><img src="../modules/'.$this->name.'/logo.gif" /> '.$this->l('Origin').'</legend>';
|
||||
if (sizeof($websites))
|
||||
{
|
||||
$this->_html .= '
|
||||
<center><p><img src="../img/admin/down.gif" />'. $this->l('Here is the percentage of the 10 most popular referrer websites by which visitors went through to get to your shop.').'</p>
|
||||
'.ModuleGraph::engine(array('type' => 'pie')).'</center>
|
||||
<p><a href="'.$_SERVER['REQUEST_URI'].'&export=1&exportType=top"><img src="../img/admin/asterisk.gif" />'.$this->l('CSV Export').'</a></p><br /><br />
|
||||
<div style="overflow-y: scroll; height: 600px;">
|
||||
<center>
|
||||
<table class="table " border="0" cellspacing="0" cellspacing="0">
|
||||
<tr>
|
||||
<th style="width:400px;">'.$this->l('Origin').'</th>
|
||||
<th style="width:50px; text-align: right">'.$this->l('Total').'</th>
|
||||
</tr>';
|
||||
foreach ($websites as $website => $total)
|
||||
$this->_html .= '<tr><td>'.(!strstr($website, ' ') ? '<a href="'.Tools::getProtocol().$website.'">' : '').$website.(!strstr($website, ' ') ? '</a>' : '').'</td><td style="text-align: right">'.$total.'</td></tr>';
|
||||
$this->_html .= '</table></center></div>';
|
||||
}
|
||||
else
|
||||
$this->_html .= '<p><strong>'.$this->l('Direct links only').'</strong></p>';
|
||||
$this->_html .= '</fieldset><br />
|
||||
<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> '.$this->l('Guide').'</legend>
|
||||
<h2>'.$this->l('What is a referrer website?').'</h2>
|
||||
<p>
|
||||
'.$this->l('When visiting a webpage, the referrer is the URL of the previous webpage from which a link was followed.').'<br />
|
||||
'.$this->l('A referrer enables you to know which keywords are entered by visitors in search engines when getting to your shop and allows you to optimize web promotion.').'<br /><br />
|
||||
'. $this->l('A referrer can be:').'
|
||||
<ul>
|
||||
<li class="bullet">'. $this->l('Someone who put a link on their website for your shop').'</li>
|
||||
<li class="bullet">'. $this->l('A partner with whom you made a link exchange in order to bring in sales or attract new customers').'</li>
|
||||
</ul>
|
||||
</p>
|
||||
</fieldset>';
|
||||
return $this->_html;
|
||||
}
|
||||
|
||||
protected function getData($layers)
|
||||
{
|
||||
$this->_titles['main'] = $this->l('First 10 websites');
|
||||
$websites = $this->getOrigins($this->getDate());
|
||||
$total = 0;
|
||||
$total2 = 0;
|
||||
$i = 0;
|
||||
foreach ($websites as $website => $totalRow)
|
||||
{
|
||||
if (!$totalRow)
|
||||
continue;
|
||||
$total += $totalRow;
|
||||
if ($i++ < 9)
|
||||
{
|
||||
$this->_legend[] = $website;
|
||||
$this->_values[] = $totalRow;
|
||||
$total2 += $totalRow;
|
||||
}
|
||||
}
|
||||
if ($total != $total2)
|
||||
{
|
||||
$this->_legend[] = $this->l('Others');
|
||||
$this->_values[] = $total - $total2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user