Initial commit

This commit is contained in:
2019-11-20 07:44:43 +01:00
commit 5bf49c4a81
41188 changed files with 5459177 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
![alt tag](views/img/ga_logo.png)
## About
Gain clear insights into important metrics about your customers, using Google Analytics.
## Contributing
PrestaShop modules are open-source extensions to the PrestaShop e-commerce solution. Everyone is welcome and even encouraged to contribute with their own improvements.
Google Analytics is compatible with all versions of PrestaShop 1.7
### Requirements
Contributors **must** follow the following rules:
* **Make your Pull Request on the "dev" branch**, NOT the "master" branch.
* Do NOT update the module's version number.
* Follow [the coding standards][1].
### Process in details
Contributors wishing to edit a module's files should follow the following process:
1. Create your GitHub account, if you do not have one already.
2. Fork the ps_googleanalytics project to your GitHub account.
3. Clone your fork to your local machine in the ```/modules``` directory of your PrestaShop installation.
4. Create a branch in your local clone of the module for your changes.
5. Change the files in your branch. Be sure to follow [the coding standards][1]!
6. Push your changed branch to your fork in your GitHub account.
7. Create a pull request for your changes **on the _'dev'_ branch** of the module's project. Be sure to follow [the commit message norm][2] in your pull request. If you need help to make a pull request, read the [Github help page about creating pull requests][3].
8. Wait for one of the core developers either to include your change in the codebase, or to comment on possible improvements you should make to your code.
That's it: you have contributed to this open-source project! Congratulations!
[1]: http://doc.prestashop.com/display/PS16/Coding+Standards
[2]: http://doc.prestashop.com/display/PS16/How+to+write+a+commit+message
[3]: https://help.github.com/articles/using-pull-requests

View File

@@ -0,0 +1,19 @@
{
"name": "prestashop/ps_googleanalytics",
"description": "PrestaShop module ps_googleanalytics",
"homepage": "https://github.com/PrestaShop/ps_googleanalytics",
"license": "AFL - Academic Free License (AFL 3.0)",
"authors": [
{
"name": "PrestaShop SA",
"email": "contact@prestashop.com"
}
],
"require": {
"php": ">=5.4.0"
},
"config": {
"preferred-install": "dist"
},
"type": "prestashop-module"
}

View File

@@ -0,0 +1,19 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "eb5b226ab1bc466e5b9615f97678ae94",
"packages": [],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=5.4.0"
},
"platform-dev": []
}

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>ps_googleanalytics</name>
<displayName><![CDATA[Google Analytics]]></displayName>
<version><![CDATA[3.1.3]]></version>
<description><![CDATA[Gain clear insights into important metrics about your customers, using Google Analytics]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[analytics_stats]]></tab>
<confirmUninstall><![CDATA[Are you sure you want to uninstall Google Analytics? You will lose all the data related to this module.]]></confirmUninstall>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>ps_googleanalytics</name>
<displayName><![CDATA[Google Analytics]]></displayName>
<version><![CDATA[3.1.3]]></version>
<description><![CDATA[Gagnez en visibilit&eacute; sur des indicateurs cl&eacute;s li&eacute;s &agrave; vos clients en utilisant Google Analytics.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[analytics_stats]]></tab>
<confirmUninstall><![CDATA[Êtes-vous sûr de vouloir désinstaller Google Analytics ? Vous perdrez toutes les données relatives à ce module.]]></confirmUninstall>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,44 @@
<?php
/**
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class AdminGanalyticsAjaxController extends ModuleAdminController
{
public $ssl = true;
public function init()
{
$order = new Order((int)Tools::getValue('orderid'));
$context = Context::getContext();
if (Validate::isLoadedObject($order) && (isset($context->employee->id) && $context->employee->id))
{
Db::getInstance()->execute('
UPDATE `'._DB_PREFIX_.'ganalytics` SET sent = 1, date_add = NOW() WHERE id_order = '.(int)Tools::getValue('orderid')
);
die('OK');
}
die('KO');
}
}

View File

@@ -0,0 +1,44 @@
<?php
/**
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class AdminGanalyticsAjaxController extends ModuleAdminController
{
public $ssl = true;
public function init()
{
$order = new Order((int)Tools::getValue('orderid'));
$context = Context::getContext();
if (Validate::isLoadedObject($order) && (isset($context->employee->id) && $context->employee->id))
{
Db::getInstance()->execute('
UPDATE `'._DB_PREFIX_.'ganalytics` SET sent = 1, date_add = NOW() WHERE id_order = '.(int)Tools::getValue('orderid')
);
die('OK');
}
die('KO');
}
}

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,46 @@
<?php
/**
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class ps_GoogleanalyticsAjaxModuleFrontController extends ModuleFrontController
{
public $ssl = true;
/*
* @see FrontController::initContent()
*/
public function initContent()
{
parent::initContent();
$order = new Order((int)Tools::getValue('orderid'));
if (!Validate::isLoadedObject($order) || $order->id_customer != (int)Tools::getValue('customer')) {
die;
}
Db::getInstance()->execute(
'UPDATE `'._DB_PREFIX_.'ganalytics` SET sent = 1, date_add = NOW() WHERE id_order = '.(int)Tools::getValue('orderid').' LIMIT 1'
);
die;
}
}

View File

@@ -0,0 +1,46 @@
<?php
/**
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class ps_GoogleanalyticsAjaxModuleFrontController extends ModuleFrontController
{
public $ssl = true;
/*
* @see FrontController::initContent()
*/
public function initContent()
{
parent::initContent();
$order = new Order((int)Tools::getValue('orderid'));
if (!Validate::isLoadedObject($order) || $order->id_customer != (int)Tools::getValue('customer')) {
die;
}
Db::getInstance()->execute(
'UPDATE `'._DB_PREFIX_.'ganalytics` SET sent = 1, date_add = NOW() WHERE id_order = '.(int)Tools::getValue('orderid').' LIMIT 1'
);
die;
}
}

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,49 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_7510f8b22dd3e10476096425f78d4239'] = 'Sie haben Ihre Google Analytics-ID noch nicht eingestellt';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_aba1a7971f85c725ba4aed21343eeb4b'] = 'Integrieren Sie das Google Analytics-Skript in Ihren Shop';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_fa214007826415a21a8456e3e09f999d'] = 'Sie sind sicher, dass Sie Ihre Daten löschen wollen?';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c888438d14855d7d96a2724ee9c306bd'] = 'Einstellungen aktualisiert';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_f4f70727dc34561dfde1a3c529b6205c'] = 'Einstellungen';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d7c9ce3337a28d63ce6626d90fdaedaa'] = 'Ihr Benutzername';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_81eeab9506186e2dca8faefa78d54067'] = 'Beispiel:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_a3e7f361e6fc12caf872119338642143'] = ' ID aktualisieren';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_6a26f548831e6a8c26bfbbd9f6ec61e0'] = 'Hilfe';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d78b0fcff6b55bafe615f3fc1572c282'] = 'Der erste Schritt zum Erfassen von E-Commerce-Transaktionen ist, E-Commerce-Berichte für das Profil Ihrer Website zu aktivieren.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d02388589ecfd3b58e0a90e42127ca61'] = 'Bitte folgen Sie diesen Schritten, um die E-Commerce-Bereichte zu aktivieren:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_11f4b4ba23dc72ee5e86ff5a90bdde60'] = 'Melden Sie sich bei Ihrem Konto an';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_b452493b16ead8b4b25ab3fb7174b8f5'] = 'Klicken Sie auf Bearbeiten neben dem Profil, das Sie aktivieren möchten';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_95df6d8c97e880d8f6895d824d72c353'] = 'Klicken Sie auf der Seite Profileinstellungen auf Bearbeiten neben der Hauptwebseiten-Profilinformation';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_5189c0be0481408c9301c377818e69dc'] = 'Drehen Sie den Radioknopf der E-Commerce-Webseite von Nein auf Ja';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_98d12a01ab2aeeb10b7100eecf1974a8'] = 'Geben Sie Ihre Ziel-Informationen ein, um Ihre Ziele einzustellen:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_a44698a775d2fec04549ba6a2ac00491'] = 'Zurück zu Ihrer persönlichen Startseite';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_dbec126ee3be2cd285a32a8d413fd1fa'] = 'Suchen Sie das Profil, für das Sie ein Ziel erstellen möchten, klicken Sie dann auf Bearbeiten';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c4af40d39b97cf98040540639841e27a'] = 'Wählen Sie eine der 4 verfügbaren Zielpositionen für dieses Profil und klicken dann auf \"Bearbeiten\"';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c3b99aa9b4638183dc1bf55f955ed9ae'] = 'Geben Sie die Ziel-URL ein. Das Erreichen dieser Seite ist ein Zeichen für eine erfolgreiche Umwandlung';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_54849fd1a3b8bdde81bfd979bc43aaa9'] = 'Geben Sie den Zielnamen ein, wie er in Ihrem Google Analytics-Konto angezeigt werden soll';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_62034d209119c06315f59a5de39c6717'] = 'Aktivieren Sie das Ziel';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_792795e7f3cedd66897ca35349101ba8'] = 'Dann definieren Sie mit den folgenden Schritten einen Trichter:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_467ed594f2aa9b3e802037a10bad61b1'] = 'Geben Sie die URL der ersten Seite Ihres Umwandlungstrichters ein. Dies sollte allen Nutzern vertraut sein, die auf Ihr Ziel zugehen.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_2edf3f56ba30ad663429ba0e812a2396'] = 'Geben Sie einen Namen für diesen Schritt ein.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c909bea215f88ff0de9888dc95eed1ca'] = 'Wenn dieser Schritt erforderlich für die Umwandlung ist, klicken Sie das Kontrollkästchen rechts von diesem Schritt an.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_9d25cb4b66791343ca319b3cdb82dba6'] = 'Geben Sie weitere Zielschritte ein, bis Ihr Trichter vollständig definiert ist. Sie können bis zu 10 Schritte oder auch nur einen einzigen Schritt eingeben.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_1c681b64f4cd8f52aecbb55c98f5c768'] = 'Konfigurieren Sie abschließend die Zusätzlichen Einstellungen durch die folgenden Schritte unten:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_bb1ca9cfa0f3f7dbd06a2364c9a0dc9c'] = 'Wenn die oben angegebenen URLs die Groß-/Kleinschreibung berücksichtigen, markieren Sie das Kontrollkästchen.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_047cf7562621a3639b3e04a63dc6b41f'] = 'Wählen Sie den entsprechenden Ziel-Übereinstimmungstyp. (';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d59048f21fd887ad520398ce677be586'] = 'Erfahren Sie mehr';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_f0c5b61aabf16d5ce925722b65c9aad8'] = 'über Übereinstimmungstypen und wie den entsprechenden Ziel-Übereinstimmungstyp für Ihr Ziel wählen können.)';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_3dcb5dddc6b7c11d4ea76a60dc1a0466'] = 'Geben Sie einen Zielwert ein. Dies ist der Wert, der in den Google Analytics ROI-Berechnungen verwendet wird.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_a39f026ca75c6279ac9487265c00e3f5'] = 'Klicken Sie auf Änderungen speichern, um dieses Ziel und diesen Trichter zu erstellen , oder Abbrechen, um ohne Speichern zu beenden.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_cd4952b65560a1242c68ffc980a6e515'] = 'Demonstration: Der Bestellvorgang';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_efbf206b1b60cc0400c6147723509bd6'] = 'Nachdem Sie Ihre E-Commerce-Berichte aktiviert und das jeweilige Profil ausgewählt haben, geben Sie \'bestellung-bestätigung.php\' ein, als gewünschte URL-Seite';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_68db264effa9364901183d9d12fac500'] = 'Dieses Ziel benennen (zum Beispiel \'Bestellvorgang\')';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_9b8bc3519c65da8fac122f91ac5b7673'] = 'Aktivieren Sie das Ziel';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_86a358dd6df1ba0cb3565b88380ba7a6'] = 'Fügen Sie \'product.php\' als erste Seite Ihres Umwandlungstrichters hinzu';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_b7f896191caad09b5fc34e79f1cefa76'] = 'Benennen Sie sie (zum Beispiel \'Produktseite\')';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_ef7060dd05e779dcfbf82f236df43823'] = 'Markieren Sie das Kontrollkästchen nicht als \"erforderlich\", denn der Kunde kann direkt von einer \"In den Warenkorb\"-Schaltfläche gekommen sein wie etwa auf dem Startseitenblock ';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_3bab28a0105361c49ca261ca08a19bf7'] = 'Fahren Sie fort, indem Sie die folgenden URLs als Zielschritte eingeben:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_9bfb6e6af6e6793bfa9387e728187c87'] = '(Erforderlich)';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_6a47891ae07f45802bc948d2618e36f5'] = 'Überprüfen Sie die \'Groß-/Kleinschreibung\'-Option';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d2d0c38d112e1d775057388122ae7545'] = 'Speichern Sie dieses neue Ziel';

View File

@@ -0,0 +1,49 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_7510f8b22dd3e10476096425f78d4239'] = 'Aún no ha configurado su ID de Google Analytics';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_aba1a7971f85c725ba4aed21343eeb4b'] = 'Integrar el script de Google Analytics en su tienda';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_fa214007826415a21a8456e3e09f999d'] = '¿Está seguro de querer eliminar todos sus datos?';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c888438d14855d7d96a2724ee9c306bd'] = 'Configuración actualizada';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_f4f70727dc34561dfde1a3c529b6205c'] = 'Configuración';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d7c9ce3337a28d63ce6626d90fdaedaa'] = 'Su nombre de usuario';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_81eeab9506186e2dca8faefa78d54067'] = 'Ejemplo:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_a3e7f361e6fc12caf872119338642143'] = 'Actualizar ID';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_6a26f548831e6a8c26bfbbd9f6ec61e0'] = 'Ayuda';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d78b0fcff6b55bafe615f3fc1572c282'] = 'El primer paso para seguir las transacciones de comercio electrónico es activar el informe de su tienda en su perfil.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d02388589ecfd3b58e0a90e42127ca61'] = 'Para activar el informe de comercio electrónico, por favor revise estos pasos:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_11f4b4ba23dc72ee5e86ff5a90bdde60'] = 'Entrar en su cuenta';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_b452493b16ead8b4b25ab3fb7174b8f5'] = 'Haga clic en Editar en el perfil que quiere activar';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_95df6d8c97e880d8f6895d824d72c353'] = 'En la página de Configuración del Perfil, haga clic en \\\"Editar\\\" para el Perfil de Información de la Web Principal';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_5189c0be0481408c9301c377818e69dc'] = 'seleccione sí/no en Web de comercio electrónico';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_98d12a01ab2aeeb10b7100eecf1974a8'] = 'Para configurar sus objetivos, introduzca información sobre ellos:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_a44698a775d2fec04549ba6a2ac00491'] = 'Volver a la página principal de su cuenta';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_dbec126ee3be2cd285a32a8d413fd1fa'] = 'Encuentra el perfil del objetivo que quieres crear, y pulsa \\\"Editar\\\"';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c4af40d39b97cf98040540639841e27a'] = 'Seleccione uno de los cuatro objetivos disponibles para su perfil, después haga clic en Edit';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c3b99aa9b4638183dc1bf55f955ed9ae'] = 'Introduzca la URL objetivo. Acceder a esta página generará una conversión correcta';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_54849fd1a3b8bdde81bfd979bc43aaa9'] = 'Introduzca el nombre del objetivo tal como aparece en su cuenta Google Analytics';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_62034d209119c06315f59a5de39c6717'] = 'Activar el objetivo';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_792795e7f3cedd66897ca35349101ba8'] = 'Después, defina un redireccionamiento siguiendo estos pasos:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_467ed594f2aa9b3e802037a10bad61b1'] = 'Introduzca la URL de la primera página de su redireccionamiento de conversión. Esta página deberá ser común para todos los usuarios hacia su objetivo.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_2edf3f56ba30ad663429ba0e812a2396'] = 'Introduzca un nombre para este paso';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c909bea215f88ff0de9888dc95eed1ca'] = 'Si este paso es necesario en el proceso de conversión, seleccione la casilla de la derecha del paso.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_9d25cb4b66791343ca319b3cdb82dba6'] = 'Continue avanzando hasta completar el objetivo. Debe introducir de 1 a 10 etapas.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_1c681b64f4cd8f52aecbb55c98f5c768'] = 'Para terminar, configure los parámetros complementarios para continuar los siguientes pasos: ';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_bb1ca9cfa0f3f7dbd06a2364c9a0dc9c'] = 'Si las URLs introducidas arriba distinguen entre mayúsculas y minúsculas, marque la casilla de verificación.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_047cf7562621a3639b3e04a63dc6b41f'] = 'Seleccione el objetivo apropiado. (';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d59048f21fd887ad520398ce677be586'] = 'Más información';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_f0c5b61aabf16d5ce925722b65c9aad8'] = 'sobre los Tipos de Partidos y sobre la manera de elegir el tipo de correspondencia adecuada a su objetivo.)';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_3dcb5dddc6b7c11d4ea76a60dc1a0466'] = 'Introduzca un valor objetivo. Este es el valor utilizado para los cáculos de Google Analitics.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_a39f026ca75c6279ac9487265c00e3f5'] = 'Haga clic en \\\"Salvar cambios\\\" para crear este objetivo, o cancelar para salir sin guardar cambios.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_cd4952b65560a1242c68ffc980a6e515'] = 'Demostración: El proceso de pedido';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_efbf206b1b60cc0400c6147723509bd6'] = 'Después de activar sus informes sobre e-commerce y de seleccionar el perfil, introduzca \'order-confirmation.php\' como la página URL de destino';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_68db264effa9364901183d9d12fac500'] = 'Nombre del objetivo (por ejemplo \\\"proceso del pedido\\\")';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_9b8bc3519c65da8fac122f91ac5b7673'] = 'Activar el objetivo';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_86a358dd6df1ba0cb3565b88380ba7a6'] = 'Añadir \'producto.php\' como la primera página de redireccionamiento';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_b7f896191caad09b5fc34e79f1cefa76'] = 'Dele un nombre (por ejemplo \\\"Página del producto\\\")';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_ef7060dd05e779dcfbf82f236df43823'] = 'No marque \\\"obligatorio\\\" porque el cliente deberá visitar desde el botón \\\"Añadir al carrito\\\" como en el homefeatured de producto de la página de inicio.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_3bab28a0105361c49ca261ca08a19bf7'] = 'Continúe introduciendo las siguientes URL como objetivos:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_9bfb6e6af6e6793bfa9387e728187c87'] = '(obligatorio)';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_6a47891ae07f45802bc948d2618e36f5'] = 'Revise la opción de \\\"distinción mayúsculas-minúsculas\\\"';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d2d0c38d112e1d775057388122ae7545'] = 'Guardar este nuevo objetivo';

View File

@@ -0,0 +1,49 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_7510f8b22dd3e10476096425f78d4239'] = 'Vous n\'avez pas encore renseigné votre ID Google Analytics';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_aba1a7971f85c725ba4aed21343eeb4b'] = 'Intègre le script de Google Analytics à votre boutique';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_fa214007826415a21a8456e3e09f999d'] = 'Etes-vous sûr de vouloir supprimer vos paramètres ?';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d7c9ce3337a28d63ce6626d90fdaedaa'] = 'Votre identifiant';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_81eeab9506186e2dca8faefa78d54067'] = 'Exemple :';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_a3e7f361e6fc12caf872119338642143'] = 'Enregistrer l\'identifiant';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_6a26f548831e6a8c26bfbbd9f6ec61e0'] = 'Aide';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d78b0fcff6b55bafe615f3fc1572c282'] = 'La première étape pour analyser les transactions e-commerce consiste à activer l\'archivage sur le profil de votre site.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d02388589ecfd3b58e0a90e42127ca61'] = 'Pour activer l\'option e-commerce, suivez ces étapes :';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_11f4b4ba23dc72ee5e86ff5a90bdde60'] = 'Connectez-vous à votre compte';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_b452493b16ead8b4b25ab3fb7174b8f5'] = 'Cliquez sur Edit, à côté du profil que vous désirez activer';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_95df6d8c97e880d8f6895d824d72c353'] = 'Sur la page \"Paramètres des profils\", cliquez sur \"Modifier\" en regard de l\'option \"Informations sur le profil du site principal\"';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_5189c0be0481408c9301c377818e69dc'] = 'Modifiez le bouton radio \"E-commerce\" sur \"Oui\"';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_98d12a01ab2aeeb10b7100eecf1974a8'] = 'Afin de définir vos objectifs, saisissez les informations de l\'objectif :';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_a44698a775d2fec04549ba6a2ac00491'] = 'Retournez sur la page d\'accueil de votre compte';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_dbec126ee3be2cd285a32a8d413fd1fa'] = 'Trouvez le profil correspondant à l\'objectif et éditez-le';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c4af40d39b97cf98040540639841e27a'] = 'Sélectionnez un des 4 emplacements disponibles pour ce profil et cliquez sur Editer';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c3b99aa9b4638183dc1bf55f955ed9ae'] = 'Entrez l\'URL de la page d\'objectif. Une conversion est enregistrée chaque fois qu\'un visiteur accède à cette page';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_54849fd1a3b8bdde81bfd979bc43aaa9'] = 'Entrez le nom de l\'objectif tel qu\'il doit apparaître dans votre compte Google Analytics.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_62034d209119c06315f59a5de39c6717'] = 'Activez l\'objectif';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_792795e7f3cedd66897ca35349101ba8'] = 'Ensuite, définissez un entonnoir de conversion en suivant ces étapes :';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_467ed594f2aa9b3e802037a10bad61b1'] = 'Entrez l\'URL de la première page de votre entonnoir de conversion. Cette page doit être commune à tous les internautes que vous souhaitez amener jusqu\'à votre objectif';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_2edf3f56ba30ad663429ba0e812a2396'] = 'Attribuez un nom à cette étape.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c909bea215f88ff0de9888dc95eed1ca'] = 'Si cette étape est obligatoire dans l\'objectif, cochez la case à droite de cette étape.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_9d25cb4b66791343ca319b3cdb82dba6'] = 'Entrez toutes les étapes précédant l\'objectif jusqu\'à ce que vous ayez terminé de définir l\'entonnoir de conversion. Vous pouvez entrer de 1 à 10 étapes';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_1c681b64f4cd8f52aecbb55c98f5c768'] = 'Pour finir, configurez les Paramètres complémentaires en procédant comme suit :';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_bb1ca9cfa0f3f7dbd06a2364c9a0dc9c'] = 'Si les URL entrées ci-dessus sont sensibles à la casse, cochez la case.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_047cf7562621a3639b3e04a63dc6b41f'] = 'Sélectionnez l\'objectif approprié. (';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d59048f21fd887ad520398ce677be586'] = 'En savoir plus';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_f0c5b61aabf16d5ce925722b65c9aad8'] = 'sur les types de correspondances et sur la façon de choisir le type de correspondance approprié à votre objectif)';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_3dcb5dddc6b7c11d4ea76a60dc1a0466'] = 'Entrez un objectif. Cette valeur est utilisée par les calculs ROI de Google Analytics.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_a39f026ca75c6279ac9487265c00e3f5'] = 'Cliquez sur Enregistrer les modifications pour créer cet objectif et cet entonnoir de conversion ou sur Annuler pour quitter sans enregistrer.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_cd4952b65560a1242c68ffc980a6e515'] = 'Démonstration : Le processus de commande';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_efbf206b1b60cc0400c6147723509bd6'] = 'Après avoir activé vos reports e-commerce et sélectionné les profils respectifs, entrez \'order-confirmation.php\' comme page cible.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_68db264effa9364901183d9d12fac500'] = 'Nommez cet objectif (par exemple \'Processus de commande\')';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_9b8bc3519c65da8fac122f91ac5b7673'] = 'Activez l\'objectif';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_86a358dd6df1ba0cb3565b88380ba7a6'] = 'Ajoutez \'product.php\' comme la première page du cheminement de vos visiteurs';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_b7f896191caad09b5fc34e79f1cefa76'] = 'Donnez lui un nom (par exemple \'Page produit\')';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_ef7060dd05e779dcfbf82f236df43823'] = 'N\'activez pas la case \'requis\' parce que les clients pourraient visiter directement par un bouton \'Ajouter au panier\', tel que dans le module HomeFeatured sur la page d\'accueil.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_3bab28a0105361c49ca261ca08a19bf7'] = 'Faites de même en entrant les urls suivantes comme étapes de l\'objectif';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_9bfb6e6af6e6793bfa9387e728187c87'] = 'requis';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_6a47891ae07f45802bc948d2618e36f5'] = 'Vérifiez l\'option \'sensibilité de la casse\'';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d2d0c38d112e1d775057388122ae7545'] = 'Sauvegardez cet objectif';

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,49 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_7510f8b22dd3e10476096425f78d4239'] = 'Non hai ancora impostato l\'ID di Google Analytics';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_aba1a7971f85c725ba4aed21343eeb4b'] = 'Integra lo script di Google Analytics nel tuo negozio';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_fa214007826415a21a8456e3e09f999d'] = 'Sei sicuro di voler cancellare i tuoi dati?';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c888438d14855d7d96a2724ee9c306bd'] = 'Impostazioni aggiornate';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_f4f70727dc34561dfde1a3c529b6205c'] = 'Impostazioni';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d7c9ce3337a28d63ce6626d90fdaedaa'] = 'Il tuo nome utente';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_81eeab9506186e2dca8faefa78d54067'] = 'Esempio:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_a3e7f361e6fc12caf872119338642143'] = 'Aggiorna ID';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_6a26f548831e6a8c26bfbbd9f6ec61e0'] = 'Aiuto';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d78b0fcff6b55bafe615f3fc1572c282'] = 'La prima fase del monitoraggio delle transazioni e-commerce è quello di attivare i rapporti e-commerce per il profilo del tuo sito web.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d02388589ecfd3b58e0a90e42127ca61'] = 'Per attivare il rapporto dell\'e-commerce, segui queste fasi:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_11f4b4ba23dc72ee5e86ff5a90bdde60'] = 'Accedi al tuo account';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_b452493b16ead8b4b25ab3fb7174b8f5'] = 'Clicca su Modifica accanto al profilo che desideri attivare';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_95df6d8c97e880d8f6895d824d72c353'] = 'Nella pagina Impostazioni profilo, fai clic su modifica accanto alle informazioni profilo sito web principale';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_5189c0be0481408c9301c377818e69dc'] = 'Modifica il tasto radio del sito e-commerce da No a Sì.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_98d12a01ab2aeeb10b7100eecf1974a8'] = 'Per impostare gli obiettivi, inserisci i dati dell\'obiettivo:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_a44698a775d2fec04549ba6a2ac00491'] = 'Ritorna alla pagina principale dell\'account ';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_dbec126ee3be2cd285a32a8d413fd1fa'] = 'Individua il profilo per il quale desideri creare gli obiettivi, quindi clicca su Modifica';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c4af40d39b97cf98040540639841e27a'] = 'Selezionare uno dei 4 spazi adibiti agli obiettivi disponibili per il profilo, quindi clicca su Modifica';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c3b99aa9b4638183dc1bf55f955ed9ae'] = 'Inserire l\'URL dell\'obiettivo. Il raggiungimento di questa pagina segna una conversione riuscita';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_54849fd1a3b8bdde81bfd979bc43aaa9'] = 'Inserisci il nome dell\'obiettivo come dovrebbe apparire nel tuo account Google Analytics';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_62034d209119c06315f59a5de39c6717'] = 'Attiva l\'obiettivo';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_792795e7f3cedd66897ca35349101ba8'] = 'Quindi, definire un imbuto nel seguente modo:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_467ed594f2aa9b3e802037a10bad61b1'] = 'Inserisci l\'URL della prima pagina della canalizzazione di conversione. Questa pagina dovrebbe essere una pagina comune a tutti gli utenti che cercano di raggiungere il tuo obiettivo.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_2edf3f56ba30ad663429ba0e812a2396'] = 'Inserisci un nome per questa fase.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c909bea215f88ff0de9888dc95eed1ca'] = 'Se questa fase è un passaggio obbligatorio nella procedura di conversione, seleziona la casella a destra del passaggio.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_9d25cb4b66791343ca319b3cdb82dba6'] = 'Continua a inserire i passaggi che conducono all\'obiettivo finché il percorso obiettivo è stato completamente definito. È possibile inserire fino a 10 passi, o anche solo un passo.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_1c681b64f4cd8f52aecbb55c98f5c768'] = 'Infine, configura le Impostazioni aggiuntive procedendo nel seguente modo:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_bb1ca9cfa0f3f7dbd06a2364c9a0dc9c'] = 'Se gli URL inseriti sopra sono case sensitive, segna la casella di controllo.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_047cf7562621a3639b3e04a63dc6b41f'] = 'Seleziona l\'obiettivo appropriato. (';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d59048f21fd887ad520398ce677be586'] = 'Per saperne di più';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_f0c5b61aabf16d5ce925722b65c9aad8'] = 'sui tipi di corrispondenze e su come scegliere il tipo di corrispondenza per il tuo obiettivo.)';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_3dcb5dddc6b7c11d4ea76a60dc1a0466'] = 'Inserire un valore obiettivo. Questo è il valore utilizzato nei calcoli ROI di Google Analytics.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_a39f026ca75c6279ac9487265c00e3f5'] = 'Fai clic su Salva modifiche per creare l\'obiettivo e la canalizzazione o su Annulla per uscire senza salvare.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_cd4952b65560a1242c68ffc980a6e515'] = 'Dimostrazione: Il processo di ordinazione';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_efbf206b1b60cc0400c6147723509bd6'] = 'Dopo aver attivato i rapporti e-commerce e selezionato il profilo inserire \'order-confirmation.php\' come pagina obiettivo';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_68db264effa9364901183d9d12fac500'] = 'Nome di questo obiettivo (per esempio \'elaborazione ordine\')';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_9b8bc3519c65da8fac122f91ac5b7673'] = 'Attiva l\'obiettivo';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_86a358dd6df1ba0cb3565b88380ba7a6'] = 'Aggiungi \'Product.php\' come prima pagina della tua conversione ';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_b7f896191caad09b5fc34e79f1cefa76'] = 'Dagli un nome (ad esempio, \'pagina del prodotto\')';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_ef7060dd05e779dcfbf82f236df43823'] = 'Non segnare la casella \'richiesta\' perché il cliente potrebbe essere visitato direttamente da un tasto \"aggiungi al carrello\', come nel blocco homefeatured sulla homepage';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_3bab28a0105361c49ca261ca08a19bf7'] = 'Proseguire inserendo i seguenti URL come fasi:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_9bfb6e6af6e6793bfa9387e728187c87'] = '(Obbligatorio)';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_6a47891ae07f45802bc948d2618e36f5'] = 'Spuntare l\'opIone \'case sensitive\' ';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d2d0c38d112e1d775057388122ae7545'] = 'Salva questo nuovo obiettivo';

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -0,0 +1,856 @@
<?php
/**
* 2007-2017 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-2017 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
class Ps_Googleanalytics extends Module
{
protected $js_state = 0;
protected $eligible = 0;
protected $filterable = 1;
protected static $products = array();
protected $_debug = 0;
public function __construct()
{
$this->name = 'ps_googleanalytics';
$this->tab = 'analytics_stats';
$this->version = '3.0.4';
$this->ps_versions_compliancy = array('min' => '1.7.0.0', 'max' => _PS_VERSION_);
$this->author = 'PrestaShop';
$this->module_key = 'fd2aaefea84ac1bb512e6f1878d990b8';
$this->bootstrap = true;
parent::__construct();
$this->displayName = $this->trans('Google Analytics', array(), 'Modules.GAnalytics.Admin');
$this->description = $this->trans('Gain clear insights into important metrics about your customers, using Google Analytics', array(), 'Modules.GAnalytics.Admin');
$this->confirmUninstall = $this->trans('Are you sure you want to uninstall Google Analytics? You will lose all the data related to this module.', array(), 'Modules.GAnalytics.Admin');
}
public function install()
{
if (Shop::isFeatureActive()) {
Shop::setContext(Shop::CONTEXT_ALL);
}
if (parent::install() &&
$this->registerHook('displayHeader') &&
$this->registerHook('displayAdminOrder') &&
$this->registerHook('displayFooter') &&
$this->registerHook('displayHome') &&
$this->registerHook('displayFooterProduct') &&
$this->registerHook('displayOrderConfirmation') &&
$this->registerHook('actionProductCancel') &&
$this->registerHook('actionCartSave') &&
$this->registerHook('displayBackOfficeHeader') &&
$this->registerHook('actionCarrierProcess')
) {
return $this->createTables();
}
return false;
}
public function uninstall()
{
if (parent::uninstall()) {
return $this->deleteTables();
}
return false;
}
/**
* Creates tables
*/
protected function createTables()
{
return (bool)Db::getInstance()->execute('
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'ganalytics` (
`id_google_analytics` int(11) NOT NULL AUTO_INCREMENT,
`id_order` int(11) NOT NULL,
`id_customer` int(10) NOT NULL,
`id_shop` int(11) NOT NULL,
`sent` tinyint(1) DEFAULT NULL,
`date_add` datetime DEFAULT NULL,
PRIMARY KEY (`id_google_analytics`),
KEY `id_order` (`id_order`),
KEY `sent` (`sent`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
');
}
/**
* deletes tables
*/
protected function deleteTables()
{
return (bool)Db::getInstance()->execute('
DROP TABLE IF EXISTS `'._DB_PREFIX_.'ganalytics`
');
}
public function displayForm()
{
// Check if multistore is active
$is_multistore_active = Shop::isFeatureActive();
// Get default language
$default_lang = (int)Configuration::get('PS_LANG_DEFAULT');
$helper = new HelperForm();
// Module, token and currentIndex
$helper->module = $this;
$helper->name_controller = $this->name;
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name;
// Language
$helper->default_form_language = $default_lang;
$helper->allow_employee_form_lang = $default_lang;
// Title and toolbar
$helper->title = $this->displayName;
$helper->show_toolbar = true; // false -> remove toolbar
$helper->toolbar_scroll = true; // yes - > Toolbar is always visible on the top of the screen.
$helper->submit_action = 'submit'.$this->name;
$helper->toolbar_btn = array(
'save' =>
array(
'desc' => $this->l('Save'),
'href' => AdminController::$currentIndex.'&configure='.$this->name.'&save'.$this->name.
'&token='.Tools::getAdminTokenLite('AdminModules'),
),
'back' => array(
'href' => AdminController::$currentIndex.'&token='.Tools::getAdminTokenLite('AdminModules'),
'desc' => $this->l('Back to list')
)
);
$fields_form = array();
// Init Fields form array
$fields_form[0]['form'] = array(
'legend' => array(
'title' => $this->l('Settings'),
),
'input' => array(
array(
'type' => 'text',
'label' => $this->l('Google Analytics Tracking ID'),
'name' => 'GA_ACCOUNT_ID',
'size' => 20,
'required' => true,
'hint' => $this->l('This information is available in your Google Analytics account')
),
array(
'type' => 'switch',
'label' => $this->l('Enable User ID tracking'),
'name' => 'GA_USERID_ENABLED',
'values' => array(
array(
'id' => 'ga_userid_enabled',
'value' => 1,
'label' => $this->l('Enabled')
),
array(
'id' => 'ga_userid_disabled',
'value' => 0,
'label' => $this->l('Disabled')
))
),
),
'submit' => array(
'title' => $this->l('Save'),
)
);
if ($is_multistore_active) {
$fields_form[0]['form']['input'][] = array(
'type' => 'switch',
'label' => $this->l('Enable Cross-Domain tracking'),
'name' => 'GA_CROSSDOMAIN_ENABLED',
'values' => array(
array(
'id' => 'ga_crossdomain_enabled',
'value' => 1,
'label' => $this->l('Enabled')
),
array(
'id' => 'ga_crossdomain_disabled',
'value' => 0,
'label' => $this->l('Disabled')
)
)
);
}
// Load current value
$helper->fields_value['GA_ACCOUNT_ID'] = Configuration::get('GA_ACCOUNT_ID');
$helper->fields_value['GA_USERID_ENABLED'] = Configuration::get('GA_USERID_ENABLED');
$helper->fields_value['GA_CROSSDOMAIN_ENABLED'] = Configuration::get('GA_CROSSDOMAIN_ENABLED');
return $helper->generateForm($fields_form);
}
/**
* back office module configuration page content
*/
public function getContent()
{
$output = '';
if (Tools::isSubmit('submit'.$this->name)) {
$ga_account_id = Tools::getValue('GA_ACCOUNT_ID');
if (!empty($ga_account_id)) {
Configuration::updateValue('GA_ACCOUNT_ID', $ga_account_id);
Configuration::updateValue('GANALYTICS_CONFIGURATION_OK', true);
$output .= $this->displayConfirmation($this->trans('Account ID updated successfully', array(), 'Modules.GAnalytics.Admin'));
}
$ga_userid_enabled = Tools::getValue('GA_USERID_ENABLED');
if (null !== $ga_userid_enabled) {
Configuration::updateValue('GA_USERID_ENABLED', (bool)$ga_userid_enabled);
$output .= $this->displayConfirmation($this->trans('Settings for User ID updated successfully', array(), 'Modules.GAnalytics.Admin'));
}
$ga_crossdomain_enabled = Tools::getValue('GA_CROSSDOMAIN_ENABLED');
if (null !== $ga_crossdomain_enabled) {
Configuration::updateValue('GA_CROSSDOMAIN_ENABLED', (bool)$ga_crossdomain_enabled);
$output .= $this->displayConfirmation($this->trans('Settings for User ID updated successfully', array(), 'Modules.GAnalytics.Admin'));
}
}
$output .= $this->displayForm();
return $this->display(__FILE__, './views/templates/admin/configuration.tpl').$output;
}
public function hookdisplayHeader($params, $back_office = false)
{
if (Configuration::get('GA_ACCOUNT_ID')) {
$this->context->controller->addJs($this->_path.'views/js/GoogleAnalyticActionLib.js');
$shops = Shop::getShops();
$is_multistore_active = Shop::isFeatureActive();
$current_shop_id = (int)Context::getContext()->shop->id;
$user_id = null;
$ga_crossdomain_enabled = false;
if (Configuration::get('GA_USERID_ENABLED') &&
$this->context->customer && $this->context->customer->isLogged()
) {
$user_id = (int)$this->context->customer->id;
}
if ((int)Configuration::get('GA_CROSSDOMAIN_ENABLED') && $is_multistore_active && sizeof($shops) > 1) {
$ga_crossdomain_enabled = true;
}
$this->smarty->assign(
array(
'backOffice' => $back_office,
'currentShopId' => $current_shop_id,
'userId' => $user_id,
'gaAccountId' => Tools::safeOutput(Configuration::get('GA_ACCOUNT_ID')),
'shops' => $shops,
'gaCrossdomainEnabled' => $ga_crossdomain_enabled,
'useSecureMode' => Configuration::get('PS_SSL_ENABLED')
)
);
return $this->display(__FILE__, 'ps_googleanalytics.tpl');
}
}
/**
* Return a detailed transaction for Google Analytics
*/
public function wrapOrder($id_order)
{
$order = new Order((int)$id_order);
if (Validate::isLoadedObject($order)) {
return array(
'id' => $id_order,
'affiliation' => Shop::isFeatureActive() ? $this->context->shop->name : Configuration::get('PS_SHOP_NAME'),
'revenue' => $order->total_paid,
'shipping' => $order->total_shipping,
'tax' => $order->total_paid_tax_incl - $order->total_paid_tax_excl,
'url' => $this->context->link->getAdminLink('AdminGanalyticsAjax'),
'customer' => $order->id_customer);
}
}
/**
* To track transactions
*/
public function hookdisplayOrderConfirmation($params)
{
$order = $params['order'];
if (Validate::isLoadedObject($order) && $order->getCurrentState() != (int)Configuration::get('PS_OS_ERROR')) {
$ga_order_sent = Db::getInstance()->getValue('SELECT id_order FROM `'._DB_PREFIX_.'ganalytics` WHERE id_order = '.(int)$order->id);
if ($ga_order_sent === false) {
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'ganalytics` (id_order, id_shop, sent, date_add) VALUES ('.(int)$order->id.', '.(int)$this->context->shop->id.', 0, NOW())');
if ($order->id_customer == $this->context->cookie->id_customer) {
$order_products = array();
$cart = new Cart($order->id_cart);
foreach ($cart->getProducts() as $order_product) {
$order_products[] = $this->wrapProduct($order_product, array(), 0, true);
}
$ga_scripts = 'MBG.addCheckoutOption(3,\''.$order->payment.'\');';
$transaction = array(
'id' => $order->id,
'affiliation' => (Shop::isFeatureActive()) ? $this->context->shop->name : Configuration::get('PS_SHOP_NAME'),
'revenue' => $order->total_paid,
'shipping' => $order->total_shipping,
'tax' => $order->total_paid_tax_incl - $order->total_paid_tax_excl,
'url' => $this->context->link->getModuleLink('ps_googleanalytics', 'ajax', array(), true),
'customer' => $order->id_customer);
$ga_scripts .= $this->addTransaction($order_products, $transaction);
$this->js_state = 1;
return $this->_runJs($ga_scripts);
}
}
}
}
/**
* hook footer to load JS script for standards actions such as product clicks
*/
public function hookdisplayFooter()
{
$ga_scripts = '';
$this->js_state = 0;
if (isset($this->context->cookie->ga_cart)) {
$this->filterable = 0;
$gacarts = json_decode($this->context->cookie->ga_cart, true);
if (is_array($gacarts)) {
foreach ($gacarts as $gacart) {
if ($gacart['quantity'] > 0) {
$ga_scripts .= 'MBG.addToCart('.json_encode($gacart).');';
} elseif ($gacart['quantity'] < 0) {
$gacart['quantity'] = abs($gacart['quantity']);
$ga_scripts .= 'MBG.removeFromCart('.json_encode($gacart).');';
}
}
}
unset($this->context->cookie->ga_cart);
}
$controller_name = Tools::getValue('controller');
$listing = $this->context->smarty->getTemplateVars('listing');
$products = $this->wrapProducts($listing['products'], array(), true);
if ($controller_name == 'order' || $controller_name == 'orderopc') {
$this->js_state = 1;
$this->eligible = 1;
$step = Tools::getValue('step');
if (empty($step)) {
$step = 0;
}
$ga_scripts .= $this->addProductFromCheckout($products, $step);
$ga_scripts .= 'MBG.addCheckout(\''.(int)$step.'\');';
}
$confirmation_hook_id = (int)Hook::getIdByName('displayOrderConfirmation');
if (isset(Hook::$executed_hooks[$confirmation_hook_id])) {
$this->eligible = 1;
}
if (isset($products) && count($products) && $controller_name != 'index') {
if ($this->eligible == 0) {
$ga_scripts .= $this->addProductImpression($products);
}
$ga_scripts .= $this->addProductClick($products);
}
return $this->_runJs($ga_scripts);
}
protected function filter($ga_scripts)
{
if ($this->filterable = 1) {
return implode(';', array_unique(explode(';', $ga_scripts)));
}
return $ga_scripts;
}
/**
* hook home to display generate the product list associated to home featured, news products and best sellers Modules
*/
public function hookdisplayHome()
{
$ga_scripts = '';
// Home featured products
if ($this->isModuleEnabled('ps_featuredproducts')) {
$category = new Category($this->context->shop->getCategory(), $this->context->language->id);
$home_featured_products = $this->wrapProducts(
$category->getProducts(
(int)Context::getContext()->language->id,
1,
(Configuration::get('HOME_FEATURED_NBR') ? (int)Configuration::get('HOME_FEATURED_NBR') : 8),
'position'
),
array(),
true
);
$ga_scripts .= $this->addProductImpression($home_featured_products).$this->addProductClick($home_featured_products);
}
$this->js_state = 1;
return $this->_runJs($this->filter($ga_scripts));
}
/**
* hook home to display generate the product list associated to home featured, news products and best sellers Modules
*/
public function isModuleEnabled($module_name)
{
if (($module = Module::getInstanceByName($module_name)) !== false &&
Module::isInstalled($module_name) &&
$module->active) {
return $module->registerHook('displayHome');
}
}
/**
* wrap products to provide a standard products information for google analytics script
*/
public function wrapProducts($products, $extras = array(), $full = false)
{
$result_products = array();
if (!is_array($products)) {
return;
}
$currency = new Currency($this->context->currency->id);
$usetax = (Product::getTaxCalculationMethod((int)$this->context->customer->id) != PS_TAX_EXC);
if (count($products) > 20) {
$full = false;
} else {
$full = true;
}
foreach ($products as $index => $product) {
if ($product instanceof Product) {
$product = (array)$product;
}
if (!isset($product['price'])) {
$product['price'] = (float)Tools::displayPrice(Product::getPriceStatic((int)$product['id_product'], $usetax), $currency);
}
$result_products[] = $this->wrapProduct($product, $extras, $index, $full);
}
return $result_products;
}
/**
* wrap product to provide a standard product information for google analytics script
*/
public function wrapProduct($product, $extras, $index = 0, $full = false)
{
$ga_product = '';
$variant = null;
if (isset($product['attributes_small'])) {
$variant = $product['attributes_small'];
} elseif (isset($extras['attributes_small'])) {
$variant = $extras['attributes_small'];
}
$product_qty = 1;
if (isset($extras['qty'])) {
$product_qty = $extras['qty'];
} elseif (isset($product['cart_quantity'])) {
$product_qty = $product['cart_quantity'];
}
$product_id = 0;
if (!empty($product['id_product'])) {
$product_id = $product['id_product'];
} elseif (!empty($product['id'])) {
$product_id = $product['id'];
}
if (!empty($product['id_product_attribute'])) {
$product_id .= '-'. $product['id_product_attribute'];
}
$product_type = 'typical';
if (isset($product['pack']) && $product['pack'] == 1) {
$product_type = 'pack';
} elseif (isset($product['virtual']) && $product['virtual'] == 1) {
$product_type = 'virtual';
}
if ($full) {
$ga_product = array(
'id' => $product_id,
'name' => Tools::str2url($product['name']),
'category' => Tools::str2url($product['category']),
'brand' => isset($product['manufacturer_name']) ? Tools::str2url($product['manufacturer_name']) : '',
'variant' => Tools::str2url($variant),
'type' => $product_type,
'position' => $index ? $index : '0',
'quantity' => $product_qty,
'list' => Tools::getValue('controller'),
'url' => isset($product['link']) ? urlencode($product['link']) : '',
'price' => $product['price']
);
} else {
$ga_product = array(
'id' => $product_id,
'name' => Tools::str2url($product['name'])
);
}
return $ga_product;
}
/**
* add order transaction
*/
public function addTransaction($products, $order)
{
if (!is_array($products)) {
return;
}
$js = '';
foreach ($products as $product) {
$js .= 'MBG.add('.json_encode($product).');';
}
return $js.'MBG.addTransaction('.json_encode($order).');';
}
/**
* add product impression js and product click js
*/
public function addProductImpression($products)
{
if (!is_array($products)) {
return;
}
$js = '';
foreach ($products as $product) {
$js .= 'MBG.add('.json_encode($product).",'',true);";
}
return $js;
}
public function addProductClick($products)
{
if (!is_array($products)) {
return;
}
$js = '';
foreach ($products as $product) {
$js .= 'MBG.addProductClick('.json_encode($product).');';
}
return $js;
}
public function addProductClickByHttpReferal($products)
{
if (!is_array($products)) {
return;
}
$js = '';
foreach ($products as $product) {
$js .= 'MBG.addProductClickByHttpReferal('.json_encode($product).');';
}
return $js;
}
/**
* Add product checkout info
*/
public function addProductFromCheckout($products)
{
if (!is_array($products)) {
return;
}
$js = '';
foreach ($products as $product) {
$js .= 'MBG.add('.json_encode($product).');';
}
return $js;
}
/**
* hook product page footer to load JS for product details view
*/
public function hookdisplayFooterProduct($params)
{
$controller_name = Tools::getValue('controller');
if ($controller_name == 'product')
{
// Add product view
$ga_product = $this->wrapProduct((array)$params['product'], null, 0, true);
$js = 'MBG.addProductDetailView('.json_encode($ga_product).');';
if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST']) > 0) {
$js .= $this->addProductClickByHttpReferal(array($ga_product));
}
$this->js_state = 1;
return $this->_runJs($js);
}
}
/**
* Generate Google Analytics js
*/
protected function _runJs($js_code, $backoffice = 0)
{
if (Configuration::get('GA_ACCOUNT_ID')) {
$runjs_code = '';
if (!empty($js_code)) {
$runjs_code .= '
<script type="text/javascript">
document.addEventListener(\'DOMContentLoaded\', function() {
var MBG = GoogleAnalyticEnhancedECommerce;
MBG.setCurrency(\''.Tools::safeOutput($this->context->currency->iso_code).'\');
'.$js_code.'
});
</script>';
}
if (($this->js_state) != 1 && ($backoffice == 0)) {
$runjs_code .= '
<script type="text/javascript">
ga(\'send\', \'pageview\');
</script>';
}
return $runjs_code;
}
}
/**
* Hook admin order to send transactions and refunds details
*/
public function hookdisplayAdminOrder()
{
echo $this->_runJs($this->context->cookie->ga_admin_refund, 1);
unset($this->context->cookie->ga_admin_refund);
}
/**
* admin office header to add google analytics js
*/
public function hookdisplayBackOfficeHeader()
{
$js = '';
if (strcmp(Tools::getValue('configure'), $this->name) === 0) {
$this->context->controller->addCSS($this->_path.'views/css/ganalytics.css');
}
$ga_account_id = Configuration::get('GA_ACCOUNT_ID');
if (!empty($ga_account_id) && $this->active) {
$this->context->controller->addJs($this->_path.'views/js/GoogleAnalyticActionLib.js');
$this->context->smarty->assign('GA_ACCOUNT_ID', $ga_account_id);
$ga_scripts = '';
if ($this->context->controller->controller_name == 'AdminOrders') {
if (Tools::getValue('id_order')) {
$order = new Order((int)Tools::getValue('id_order'));
if (Validate::isLoadedObject($order) && strtotime('+1 day', strtotime($order->date_add)) > time()) {
$ga_order_sent = Db::getInstance()->getValue('SELECT id_order FROM `'._DB_PREFIX_.'ganalytics` WHERE id_order = '.(int)Tools::getValue('id_order'));
if ($ga_order_sent === false) {
Db::getInstance()->Execute('INSERT IGNORE INTO `'._DB_PREFIX_.'ganalytics` (id_order, id_shop, sent, date_add) VALUES ('.(int)Tools::getValue('id_order').', '.(int)$this->context->shop->id.', 0, NOW())');
}
}
} else {
$ga_order_records = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'ganalytics` WHERE sent = 0 AND id_shop = \''.(int)$this->context->shop->id.'\' AND DATE_ADD(date_add, INTERVAL 30 minute) < NOW()');
if ($ga_order_records) {
foreach ($ga_order_records as $row) {
$transaction = $this->wrapOrder($row['id_order']);
if (!empty($transaction)) {
Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'ganalytics` SET date_add = NOW(), sent = 1 WHERE id_order = '.(int)$row['id_order'].' AND id_shop = \''.(int)$this->context->shop->id.'\'');
$transaction = json_encode($transaction);
$ga_scripts .= 'MBG.addTransaction('.$transaction.');';
}
}
}
}
}
return $js.$this->hookdisplayHeader(null, true).$this->_runJs($ga_scripts, 1);
} else {
return $js;
}
}
/**
* Hook admin office header to add google analytics js
*/
public function hookactionProductCancel($params)
{
$qty_refunded = Tools::getValue('cancelQuantity');
$ga_scripts = '';
foreach ($qty_refunded as $orderdetail_id => $qty) {
// Display GA refund product
$order_detail = new OrderDetail($orderdetail_id);
$ga_scripts .= 'MBG.add('.json_encode(
array(
'id' => empty($order_detail->product_attribute_id)?$order_detail->product_id:$order_detail->product_id.'-'.$order_detail->product_attribute_id,
'quantity' => $qty)
)
.');';
}
$this->context->cookie->ga_admin_refund = $ga_scripts.'MBG.refundByProduct('.json_encode(array('id' => $params['order']->id)).');';
}
/**
* hook save cart event to implement addtocart and remove from cart functionality
*/
public function hookactionCartSave()
{
if (!isset($this->context->cart)) {
return;
}
if (!Tools::getIsset('id_product')) {
return;
}
$cart = array(
'controller' => Tools::getValue('controller'),
'addAction' => Tools::getValue('add') ? 'add' : '',
'removeAction' => Tools::getValue('delete') ? 'delete' : '',
'extraAction' => Tools::getValue('op'),
'qty' => (int)Tools::getValue('qty', 1)
);
$cart_products = $this->context->cart->getProducts();
if (isset($cart_products) && count($cart_products)) {
foreach ($cart_products as $cart_product) {
if ($cart_product['id_product'] == Tools::getValue('id_product')) {
$add_product = $cart_product;
}
}
}
if ($cart['removeAction'] == 'delete') {
$add_product_object = new Product((int)Tools::getValue('id_product'), true, (int)Configuration::get('PS_LANG_DEFAULT'));
if (Validate::isLoadedObject($add_product_object)) {
$add_product['name'] = $add_product_object->name;
$add_product['manufacturer_name'] = $add_product_object->manufacturer_name;
$add_product['category'] = $add_product_object->category;
$add_product['reference'] = $add_product_object->reference;
$add_product['link_rewrite'] = $add_product_object->link_rewrite;
$add_product['link'] = $add_product_object->link_rewrite;
$add_product['price'] = $add_product_object->price;
$add_product['ean13'] = $add_product_object->ean13;
$add_product['id_product'] = Tools::getValue('id_product');
$add_product['id_category_default'] = $add_product_object->id_category_default;
$add_product['out_of_stock'] = $add_product_object->out_of_stock;
$add_product['minimal_quantity'] = 1;
$add_product['unit_price_ratio'] = 0;
$add_product = Product::getProductProperties((int)Configuration::get('PS_LANG_DEFAULT'), $add_product);
}
}
if (isset($add_product) && !in_array((int)Tools::getValue('id_product'), self::$products)) {
self::$products[] = (int)Tools::getValue('id_product');
$ga_products = $this->wrapProduct($add_product, $cart, 0, true);
if (array_key_exists('id_product_attribute', $ga_products) && $ga_products['id_product_attribute'] != '' && $ga_products['id_product_attribute'] != 0) {
$id_product = $ga_products['id_product_attribute'];
} else {
$id_product = Tools::getValue('id_product');
}
if (isset($this->context->cookie->ga_cart)) {
$gacart = json_decode($this->context->cookie->ga_cart, true);
} else {
$gacart = array();
}
if ($cart['removeAction'] == 'delete') {
$ga_products['quantity'] = -1;
} elseif ($cart['extraAction'] == 'down') {
if (array_key_exists($id_product, $gacart)) {
$ga_products['quantity'] = $gacart[$id_product]['quantity'] - $cart['qty'];
} else {
$ga_products['quantity'] = $cart['qty'] * -1;
}
} elseif (Tools::getValue('step') <= 0) { // Sometimes cartsave is called in checkout
if (array_key_exists($id_product, $gacart)) {
$ga_products['quantity'] = $gacart[$id_product]['quantity'] + $cart['qty'];
}
}
$gacart[$id_product] = $ga_products;
$this->context->cookie->ga_cart = json_encode($gacart);
}
}
public function hookactionCarrierProcess($params)
{
if (isset($params['cart']->id_carrier)) {
$carrier_name = Db::getInstance()->getValue('SELECT name FROM `'._DB_PREFIX_.'carrier` WHERE id_carrier = '.(int)$params['cart']->id_carrier);
$this->context->cookie->ga_cart .= 'MBG.addCheckoutOption(2,\''.$carrier_name.'\');';
}
}
protected function _debugLog($function, $log)
{
if (!$this->_debug) {
return true;
}
$myFile = _PS_MODULE_DIR_.$this->name.'/logs/analytics.log';
$fh = fopen($myFile, 'a');
fwrite($fh, date('F j, Y, g:i a').' '.$function."\n");
fwrite($fh, print_r($log, true)."\n\n");
fclose($fh);
}
}

View File

@@ -0,0 +1,934 @@
<?php
/**
* 2007-2018 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-2018 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
class Ps_Googleanalytics extends Module
{
protected $js_state = 0;
protected $eligible = 0;
protected $filterable = 1;
protected static $products = array();
protected $_debug = 0;
public function __construct()
{
$this->name = 'ps_googleanalytics';
$this->tab = 'analytics_stats';
$this->version = '3.1.3';
$this->ps_versions_compliancy = array('min' => '1.7.0.0', 'max' => _PS_VERSION_);
$this->author = 'PrestaShop';
$this->module_key = 'fd2aaefea84ac1bb512e6f1878d990b8';
$this->bootstrap = true;
parent::__construct();
$this->displayName = $this->trans('Google Analytics', array(), 'Modules.GAnalytics.Admin');
$this->description = $this->trans('Gain clear insights into important metrics about your customers, using Google Analytics', array(), 'Modules.GAnalytics.Admin');
$this->confirmUninstall = $this->trans('Are you sure you want to uninstall Google Analytics? You will lose all the data related to this module.', array(), 'Modules.GAnalytics.Admin');
}
public function install()
{
if (Shop::isFeatureActive()) {
Shop::setContext(Shop::CONTEXT_ALL);
}
if (parent::install() &&
$this->registerHook('displayHeader') &&
$this->registerHook('displayAdminOrder') &&
$this->registerHook('displayFooter') &&
$this->registerHook('displayHome') &&
$this->registerHook('displayFooterProduct') &&
$this->registerHook('displayOrderConfirmation') &&
$this->registerHook('actionProductCancel') &&
$this->registerHook('actionCartSave') &&
$this->registerHook('displayBackOfficeHeader') &&
$this->registerHook('actionCarrierProcess')
) {
return $this->createTables();
}
return false;
}
public function uninstall()
{
if (parent::uninstall()) {
return $this->deleteTables();
}
return false;
}
/**
* Creates tables
*/
protected function createTables()
{
if ((bool)Db::getInstance()->execute('
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'ganalytics` (
`id_google_analytics` int(11) NOT NULL AUTO_INCREMENT,
`id_order` int(11) NOT NULL,
`id_customer` int(10) NOT NULL,
`id_shop` int(11) NOT NULL,
`sent` tinyint(1) DEFAULT NULL,
`date_add` datetime DEFAULT NULL,
PRIMARY KEY (`id_google_analytics`),
KEY `id_order` (`id_order`),
KEY `sent` (`sent`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
') && (bool)Db::getInstance()->execute('
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'ganalytics_data` (
`id_cart` int(11) NOT NULL,
`id_shop` int(11) NOT NULL,
`data` TEXT DEFAULT NULL,
PRIMARY KEY (`id_cart`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8
'))
{
return true;
}
return false;
}
/**
* deletes tables
*/
protected function deleteTables()
{
if ((bool)Db::getInstance()->execute('
DROP TABLE IF EXISTS `'._DB_PREFIX_.'ganalytics`
') && (bool)Db::getInstance()->execute('
DROP TABLE IF EXISTS `'._DB_PREFIX_.'ganalytics_data`
')) {
return true;
}
return false;
}
public function displayForm()
{
// Check if multistore is active
$is_multistore_active = Shop::isFeatureActive();
// Get default language
$default_lang = (int)Configuration::get('PS_LANG_DEFAULT');
$helper = new HelperForm();
// Module, token and currentIndex
$helper->module = $this;
$helper->name_controller = $this->name;
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name;
// Language
$helper->default_form_language = $default_lang;
$helper->allow_employee_form_lang = $default_lang;
// Title and toolbar
$helper->title = $this->displayName;
$helper->show_toolbar = true; // false -> remove toolbar
$helper->toolbar_scroll = true; // yes - > Toolbar is always visible on the top of the screen.
$helper->submit_action = 'submit'.$this->name;
$helper->toolbar_btn = array(
'save' =>
array(
'desc' => $this->trans('Save', array(), 'Admin.Actions'),
'href' => AdminController::$currentIndex.'&configure='.$this->name.'&save'.$this->name.
'&token='.Tools::getAdminTokenLite('AdminModules'),
),
'back' => array(
'href' => AdminController::$currentIndex.'&token='.Tools::getAdminTokenLite('AdminModules'),
'desc' => $this->trans('Back to list', array(), 'Admin.Actions')
)
);
$fields_form = array();
// Init Fields form array
$fields_form[0]['form'] = array(
'legend' => array(
'title' => $this->trans('Settings', array(),'Admin.Global'),
),
'input' => array(
array(
'type' => 'text',
'label' => $this->trans('Google Analytics Tracking ID', array(), 'Modules.GAnalytics.Admin'),
'name' => 'GA_ACCOUNT_ID',
'size' => 20,
'required' => true,
'hint' => $this->trans('This information is available in your Google Analytics account', array(), 'Modules.GAnalytics.Admin')
),
array(
'type' => 'switch',
'label' => $this->trans('Enable User ID tracking', array(), 'Modules.GAnalytics.Admin'),
'name' => 'GA_USERID_ENABLED',
'values' => array(
array(
'id' => 'ga_userid_enabled',
'value' => 1,
'label' => $this->trans('Enabled', array(), 'Admin.Global')
),
array(
'id' => 'ga_userid_disabled',
'value' => 0,
'label' => $this->trans('Disabled', array(), 'Admin.Global')
))
),
array(
'type' => 'switch',
'label' => $this->trans('Anonymize IP', array(), 'Modules.GAnalytics.Admin'),
'name' => 'GA_ANONYMIZE_ENABLED',
'hint' => $this->trans('Use this option to anonymize the visitors IP to comply with data privacy laws in some countries'),
'values' => array(
array(
'id' => 'ga_anonymize_enabled',
'value' => 1,
'label' => $this->trans('Enabled', array(), 'Admin.Global')
),
array(
'id' => 'ga_anonymize_disabled',
'value' => 0,
'label' => $this->trans('Disabled', array(), 'Admin.Global')
),
),
),
),
'submit' => array(
'title' => $this->trans('Save', array(), 'Admin.Actions'),
)
);
if ($is_multistore_active) {
$fields_form[0]['form']['input'][] = array(
'type' => 'switch',
'label' => $this->trans('Enable Cross-Domain tracking', array(), 'Modules.GAnalytics.Admin'),
'name' => 'GA_CROSSDOMAIN_ENABLED',
'values' => array(
array(
'id' => 'ga_crossdomain_enabled',
'value' => 1,
'label' => $this->trans('Enabled', array(), 'Admin.Global')
),
array(
'id' => 'ga_crossdomain_disabled',
'value' => 0,
'label' => $this->trans('Disabled', array(), 'Admin.Global')
)
)
);
}
// Load current value
$helper->fields_value['GA_ACCOUNT_ID'] = Configuration::get('GA_ACCOUNT_ID');
$helper->fields_value['GA_USERID_ENABLED'] = Configuration::get('GA_USERID_ENABLED');
$helper->fields_value['GA_CROSSDOMAIN_ENABLED'] = Configuration::get('GA_CROSSDOMAIN_ENABLED');
$helper->fields_value['GA_ANONYMIZE_ENABLED'] = Configuration::get('GA_ANONYMIZE_ENABLED');
return $helper->generateForm($fields_form);
}
/**
* back office module configuration page content
*/
public function getContent()
{
$output = '';
if (Tools::isSubmit('submit'.$this->name)) {
$ga_account_id = Tools::getValue('GA_ACCOUNT_ID');
if (!empty($ga_account_id)) {
Configuration::updateValue('GA_ACCOUNT_ID', $ga_account_id);
Configuration::updateValue('GANALYTICS_CONFIGURATION_OK', true);
$output .= $this->displayConfirmation($this->trans('Account ID updated successfully', array(), 'Modules.GAnalytics.Admin'));
}
$ga_userid_enabled = Tools::getValue('GA_USERID_ENABLED');
if (null !== $ga_userid_enabled) {
Configuration::updateValue('GA_USERID_ENABLED', (bool)$ga_userid_enabled);
$output .= $this->displayConfirmation($this->trans('Settings for User ID updated successfully', array(), 'Modules.GAnalytics.Admin'));
}
$ga_crossdomain_enabled = Tools::getValue('GA_CROSSDOMAIN_ENABLED');
if (null !== $ga_crossdomain_enabled) {
Configuration::updateValue('GA_CROSSDOMAIN_ENABLED', (bool)$ga_crossdomain_enabled);
$output .= $this->displayConfirmation($this->trans('Settings for User ID updated successfully', array(), 'Modules.GAnalytics.Admin'));
}
$ga_anonymize_enabled = Tools::getValue('GA_ANONYMIZE_ENABLED');
if (null !== $ga_anonymize_enabled) {
Configuration::updateValue('GA_ANONYMIZE_ENABLED', (bool)$ga_anonymize_enabled);
$output .= $this->displayConfirmation($this->trans('Settings for Anonymize IP updated successfully', array(), 'Modules.GAnalytics.Admin'));
}
}
$output .= $this->displayForm();
return $this->display(__FILE__, './views/templates/admin/configuration.tpl').$output;
}
public function hookdisplayHeader($params, $back_office = false)
{
if (Configuration::get('GA_ACCOUNT_ID')) {
$this->context->controller->addJs($this->_path.'views/js/GoogleAnalyticActionLib.js');
$shops = Shop::getShops();
$is_multistore_active = Shop::isFeatureActive();
$current_shop_id = (int)Context::getContext()->shop->id;
$user_id = null;
$ga_crossdomain_enabled = false;
if (Configuration::get('GA_USERID_ENABLED') &&
$this->context->customer && $this->context->customer->isLogged()
) {
$user_id = (int)$this->context->customer->id;
}
$ga_anonymize_enabled = Configuration::get('GA_ANONYMIZE_ENABLED');
if ((int)Configuration::get('GA_CROSSDOMAIN_ENABLED') && $is_multistore_active && sizeof($shops) > 1) {
$ga_crossdomain_enabled = true;
}
$this->smarty->assign(
array(
'backOffice' => $back_office,
'currentShopId' => $current_shop_id,
'userId' => $user_id,
'gaAccountId' => Tools::safeOutput(Configuration::get('GA_ACCOUNT_ID')),
'shops' => $shops,
'gaCrossdomainEnabled' => $ga_crossdomain_enabled,
'gaAnonymizeEnabled' => $ga_anonymize_enabled,
'useSecureMode' => Configuration::get('PS_SSL_ENABLED')
)
);
return $this->display(__FILE__, 'ps_googleanalytics.tpl');
}
}
/**
* Return a detailed transaction for Google Analytics
*/
public function wrapOrder($id_order)
{
$order = new Order((int)$id_order);
if (Validate::isLoadedObject($order)) {
return array(
'id' => $id_order,
'affiliation' => Shop::isFeatureActive() ? $this->context->shop->name : Configuration::get('PS_SHOP_NAME'),
'revenue' => $order->total_paid,
'shipping' => $order->total_shipping,
'tax' => $order->total_paid_tax_incl - $order->total_paid_tax_excl,
'url' => $this->context->link->getAdminLink('AdminGanalyticsAjax'),
'customer' => $order->id_customer);
}
}
/**
* To track transactions
*/
public function hookdisplayOrderConfirmation($params)
{
$order = $params['order'];
if (Validate::isLoadedObject($order) && $order->getCurrentState() != (int)Configuration::get('PS_OS_ERROR')) {
$ga_order_sent = Db::getInstance()->getValue('SELECT id_order FROM `'._DB_PREFIX_.'ganalytics` WHERE id_order = '.(int)$order->id);
if ($ga_order_sent === false) {
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'ganalytics` (id_order, id_shop, sent, date_add) VALUES ('.(int)$order->id.', '.(int)$this->context->shop->id.', 0, NOW())');
if ($order->id_customer == $this->context->cookie->id_customer) {
$order_products = array();
$cart = new Cart($order->id_cart);
foreach ($cart->getProducts() as $order_product) {
$order_products[] = $this->wrapProduct($order_product, array(), 0, true);
}
$ga_scripts = 'MBG.addCheckoutOption(3,\''.$order->payment.'\');';
$transaction = array(
'id' => $order->id,
'affiliation' => (Shop::isFeatureActive()) ? $this->context->shop->name : Configuration::get('PS_SHOP_NAME'),
'revenue' => $order->total_paid,
'shipping' => $order->total_shipping,
'tax' => $order->total_paid_tax_incl - $order->total_paid_tax_excl,
'url' => $this->context->link->getModuleLink('ps_googleanalytics', 'ajax', array(), true),
'customer' => $order->id_customer);
$ga_scripts .= $this->addTransaction($order_products, $transaction);
$this->js_state = 1;
return $this->_runJs($ga_scripts);
}
}
}
}
/**
* hook footer to load JS script for standards actions such as product clicks
*/
public function hookdisplayFooter()
{
$ga_scripts = '';
$this->js_state = 0;
$gacarts = $this->_manageData("", "R");
$controller_name = Tools::getValue('controller');
if (count($gacarts)>0 && $controller_name!='product') {
$this->filterable = 0;
foreach ($gacarts as $gacart) {
if (isset($gacart['quantity']))
{
if ($gacart['quantity'] > 0) {
$ga_scripts .= 'MBG.addToCart('.json_encode($gacart).');';
} elseif ($gacart['quantity'] < 0) {
$gacart['quantity'] = abs($gacart['quantity']);
$ga_scripts .= 'MBG.removeFromCart('.json_encode($gacart).');';
}
} else {
$ga_scripts .= $gacart;
}
}
$gacarts = $this->_manageData("", "D");
}
$listing = $this->context->smarty->getTemplateVars('listing');
$products = $this->wrapProducts($listing['products'], array(), true);
if ($controller_name == 'order' || $controller_name == 'orderopc') {
$this->js_state = 1;
$this->eligible = 1;
$step = Tools::getValue('step');
if (empty($step)) {
$step = 0;
}
$ga_scripts .= $this->addProductFromCheckout($products, $step);
$ga_scripts .= 'MBG.addCheckout(\''.(int)$step.'\');';
}
$confirmation_hook_id = (int)Hook::getIdByName('displayOrderConfirmation');
if (isset(Hook::$executed_hooks[$confirmation_hook_id])) {
$this->eligible = 1;
}
if (isset($products) && count($products) && $controller_name != 'index') {
if ($this->eligible == 0) {
$ga_scripts .= $this->addProductImpression($products);
}
$ga_scripts .= $this->addProductClick($products);
}
return $this->_runJs($ga_scripts);
}
protected function filter($ga_scripts)
{
if ($this->filterable = 1) {
return implode(';', array_unique(explode(';', $ga_scripts)));
}
return $ga_scripts;
}
/**
* hook home to display generate the product list associated to home featured, news products and best sellers Modules
*/
public function hookdisplayHome()
{
$ga_scripts = '';
// Home featured products
if ($this->isModuleEnabled('ps_featuredproducts')) {
$category = new Category($this->context->shop->getCategory(), $this->context->language->id);
$home_featured_products = $this->wrapProducts(
$category->getProducts(
(int)Context::getContext()->language->id,
1,
(Configuration::get('HOME_FEATURED_NBR') ? (int)Configuration::get('HOME_FEATURED_NBR') : 8),
'position'
),
array(),
true
);
$ga_scripts .= $this->addProductImpression($home_featured_products).$this->addProductClick($home_featured_products);
}
$this->js_state = 1;
return $this->_runJs($this->filter($ga_scripts));
}
/**
* hook home to display generate the product list associated to home featured, news products and best sellers Modules
*/
public function isModuleEnabled($module_name)
{
if (($module = Module::getInstanceByName($module_name)) !== false &&
Module::isInstalled($module_name) &&
$module->active) {
return $module->registerHook('displayHome');
}
}
/**
* wrap products to provide a standard products information for google analytics script
*/
public function wrapProducts($products, $extras = array(), $full = false)
{
$result_products = array();
if (!is_array($products)) {
return;
}
$currency = new Currency($this->context->currency->id);
$usetax = (Product::getTaxCalculationMethod((int)$this->context->customer->id) != PS_TAX_EXC);
if (count($products) > 20) {
$full = false;
} else {
$full = true;
}
foreach ($products as $index => $product) {
if ($product instanceof Product) {
$product = (array)$product;
}
if (!isset($product['price'])) {
$product['price'] = (float)Tools::displayPrice(Product::getPriceStatic((int)$product['id_product'], $usetax), $currency);
}
$result_products[] = $this->wrapProduct($product, $extras, $index, $full);
}
return $result_products;
}
/**
* wrap product to provide a standard product information for google analytics script
*/
public function wrapProduct($product, $extras, $index = 0, $full = false)
{
$ga_product = '';
$variant = null;
if (isset($product['attributes_small'])) {
$variant = $product['attributes_small'];
} elseif (isset($extras['attributes_small'])) {
$variant = $extras['attributes_small'];
}
$product_qty = 1;
if (isset($extras['qty'])) {
$product_qty = $extras['qty'];
} elseif (isset($product['cart_quantity'])) {
$product_qty = $product['cart_quantity'];
}
$product_id = 0;
if (!empty($product['id_product'])) {
$product_id = $product['id_product'];
} elseif (!empty($product['id'])) {
$product_id = $product['id'];
}
if (!empty($product['id_product_attribute'])) {
$product_id .= '-'. $product['id_product_attribute'];
}
$product_type = 'typical';
if (isset($product['pack']) && $product['pack'] == 1) {
$product_type = 'pack';
} elseif (isset($product['virtual']) && $product['virtual'] == 1) {
$product_type = 'virtual';
}
if ($full) {
$ga_product = array(
'id' => $product_id,
'name' => Tools::str2url($product['name']),
'category' => Tools::str2url($product['category']),
'brand' => isset($product['manufacturer_name']) ? Tools::str2url($product['manufacturer_name']) : '',
'variant' => Tools::str2url($variant),
'type' => $product_type,
'position' => $index ? $index : '0',
'quantity' => $product_qty,
'list' => Tools::getValue('controller'),
'url' => isset($product['link']) ? urlencode($product['link']) : '',
'price' => $product['price']
);
} else {
$ga_product = array(
'id' => $product_id,
'name' => Tools::str2url($product['name'])
);
}
return $ga_product;
}
/**
* add order transaction
*/
public function addTransaction($products, $order)
{
if (!is_array($products)) {
return;
}
$js = '';
foreach ($products as $product) {
$js .= 'MBG.add('.json_encode($product).');';
}
return $js.'MBG.addTransaction('.json_encode($order).');';
}
/**
* add product impression js and product click js
*/
public function addProductImpression($products)
{
if (!is_array($products)) {
return;
}
$js = '';
foreach ($products as $product) {
$js .= 'MBG.add('.json_encode($product).",'',true);";
}
return $js;
}
public function addProductClick($products)
{
if (!is_array($products)) {
return;
}
$js = '';
foreach ($products as $product) {
$js .= 'MBG.addProductClick('.json_encode($product).');';
}
return $js;
}
public function addProductClickByHttpReferal($products)
{
if (!is_array($products)) {
return;
}
$js = '';
foreach ($products as $product) {
$js .= 'MBG.addProductClickByHttpReferal('.json_encode($product).');';
}
return $js;
}
/**
* Add product checkout info
*/
public function addProductFromCheckout($products)
{
if (!is_array($products)) {
return;
}
$js = '';
foreach ($products as $product) {
$js .= 'MBG.add('.json_encode($product).');';
}
return $js;
}
/**
* hook product page footer to load JS for product details view
*/
public function hookdisplayFooterProduct($params)
{
$controller_name = Tools::getValue('controller');
if ($controller_name == 'product')
{
if ($params['product'] instanceof Product) {
$params['product'] = (array) $params['product'];
}
// Add product view
$ga_product = $this->wrapProduct($params['product'], null, 0, true);
$js = 'MBG.addProductDetailView('.json_encode($ga_product).');';
if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST']) > 0) {
$js .= $this->addProductClickByHttpReferal(array($ga_product));
}
$this->js_state = 1;
return $this->_runJs($js);
}
}
/**
* Generate Google Analytics js
*/
protected function _runJs($js_code, $backoffice = 0)
{
if (Configuration::get('GA_ACCOUNT_ID')) {
$runjs_code = '';
if (!empty($js_code)) {
$runjs_code .= '
<script type="text/javascript">
document.addEventListener(\'DOMContentLoaded\', function() {
var MBG = GoogleAnalyticEnhancedECommerce;
MBG.setCurrency(\''.Tools::safeOutput($this->context->currency->iso_code).'\');
'.$js_code.'
});
</script>';
}
if (($this->js_state) != 1 && ($backoffice == 0)) {
$runjs_code .= '
<script type="text/javascript">
ga(\'send\', \'pageview\');
</script>';
}
return $runjs_code;
}
}
/**
* Manage data
* @param string $action "R" read data from DB, "W" write data, "A" append data, D" delete data
* @return array dans le cas du R, sinon true
*/
protected function _manageData($data, $action)
{
if ($action == 'R') {
$dataretour = Db::getInstance()->getValue('SELECT data FROM `'._DB_PREFIX_.'ganalytics_data` WHERE id_cart = \''.(int)$this->context->cart->id.'\' AND id_shop = \''.(int)$this->context->shop->id.'\'');
if ($dataretour === false)
return array();
else
return json_decode($dataretour,true);
}
if ($action == 'W') {
return Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'ganalytics_data` (id_cart, id_shop, data) VALUES(\''.(int)$this->context->cart->id.'\',\''.(int)$this->context->shop->id.'\',\''.json_encode($data).'\') ON DUPLICATE KEY UPDATE data =\''.json_encode($data).'\' ;');
}
if ($action == 'A') {
$dataretour = Db::getInstance()->getValue('SELECT data FROM `'._DB_PREFIX_.'ganalytics_data` WHERE id_cart = \''.(int)$this->context->cart->id.'\' AND id_shop = \''.(int)$this->context->shop->id.'\'');
if ($dataretour === false)
$datanew = array($data);
else {
$datanew = json_decode($dataretour,true);
$datanew[] = $data;
}
return Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'ganalytics_data` (id_cart, id_shop, data) VALUES(\''.(int)$this->context->cart->id.'\',\''.(int)$this->context->shop->id.'\',\''.pSQL(json_encode($datanew)).'\') ON DUPLICATE KEY UPDATE data =\''.pSQL(json_encode($datanew)).'\' ;');
}
if ($action == 'D') {
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'ganalytics_data` WHERE id_cart = \''.(int)$this->context->cart->id.'\' AND id_shop = \''.(int)$this->context->shop->id.'\'');
}
}
/**
* Hook admin order to send transactions and refunds details
*/
public function hookdisplayAdminOrder()
{
echo $this->_runJs($this->context->cookie->ga_admin_refund, 1);
unset($this->context->cookie->ga_admin_refund);
}
/**
* admin office header to add google analytics js
*/
public function hookdisplayBackOfficeHeader()
{
$js = '';
if (strcmp(Tools::getValue('configure'), $this->name) === 0) {
$this->context->controller->addCSS($this->_path.'views/css/ganalytics.css');
}
$ga_account_id = Configuration::get('GA_ACCOUNT_ID');
if (!empty($ga_account_id) && $this->active) {
$this->context->controller->addJs($this->_path.'views/js/GoogleAnalyticActionLib.js');
$this->context->smarty->assign('GA_ACCOUNT_ID', $ga_account_id);
$ga_scripts = '';
if ($this->context->controller->controller_name == 'AdminOrders') {
if (Tools::getValue('id_order')) {
$order = new Order((int)Tools::getValue('id_order'));
if (Validate::isLoadedObject($order) && strtotime('+1 day', strtotime($order->date_add)) > time()) {
$ga_order_sent = Db::getInstance()->getValue('SELECT id_order FROM `'._DB_PREFIX_.'ganalytics` WHERE id_order = '.(int)Tools::getValue('id_order'));
if ($ga_order_sent === false) {
Db::getInstance()->Execute('INSERT IGNORE INTO `'._DB_PREFIX_.'ganalytics` (id_order, id_shop, sent, date_add) VALUES ('.(int)Tools::getValue('id_order').', '.(int)$this->context->shop->id.', 0, NOW())');
}
}
} else {
$ga_order_records = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'ganalytics` WHERE sent = 0 AND id_shop = \''.(int)$this->context->shop->id.'\' AND DATE_ADD(date_add, INTERVAL 30 minute) < NOW()');
if ($ga_order_records) {
foreach ($ga_order_records as $row) {
$transaction = $this->wrapOrder($row['id_order']);
if (!empty($transaction)) {
Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'ganalytics` SET date_add = NOW(), sent = 1 WHERE id_order = '.(int)$row['id_order'].' AND id_shop = \''.(int)$this->context->shop->id.'\'');
$transaction = json_encode($transaction);
$ga_scripts .= 'MBG.addTransaction('.$transaction.');';
}
}
}
}
}
return $js.$this->hookdisplayHeader(null, true).$this->_runJs($ga_scripts, 1);
} else {
return $js;
}
}
/**
* Hook admin office header to add google analytics js
*/
public function hookactionProductCancel($params)
{
$qty_refunded = Tools::getValue('cancelQuantity');
$ga_scripts = '';
foreach ($qty_refunded as $orderdetail_id => $qty) {
// Display GA refund product
$order_detail = new OrderDetail($orderdetail_id);
$ga_scripts .= 'MBG.add('.json_encode(
array(
'id' => empty($order_detail->product_attribute_id)?$order_detail->product_id:$order_detail->product_id.'-'.$order_detail->product_attribute_id,
'quantity' => $qty)
)
.');';
}
$this->context->cookie->ga_admin_refund = $ga_scripts.'MBG.refundByProduct('.json_encode(array('id' => $params['order']->id)).');';
}
/**
* hook save cart event to implement addtocart and remove from cart functionality
*/
public function hookactionCartSave()
{
if (!isset($this->context->cart)) {
return;
}
if (!Tools::getIsset('id_product')) {
return;
}
$cart = array(
'controller' => Tools::getValue('controller'),
'addAction' => Tools::getValue('add') ? 'add' : '',
'removeAction' => Tools::getValue('delete') ? 'delete' : '',
'extraAction' => Tools::getValue('op'),
'qty' => (int)Tools::getValue('qty', 1)
);
$cart_products = $this->context->cart->getProducts();
if (isset($cart_products) && count($cart_products)) {
foreach ($cart_products as $cart_product) {
if ($cart_product['id_product'] == Tools::getValue('id_product')) {
$add_product = $cart_product;
}
}
}
if ($cart['removeAction'] == 'delete') {
$add_product_object = new Product((int)Tools::getValue('id_product'), true, (int)Configuration::get('PS_LANG_DEFAULT'));
if (Validate::isLoadedObject($add_product_object)) {
$add_product['name'] = $add_product_object->name;
$add_product['manufacturer_name'] = $add_product_object->manufacturer_name;
$add_product['category'] = $add_product_object->category;
$add_product['reference'] = $add_product_object->reference;
$add_product['link_rewrite'] = $add_product_object->link_rewrite;
$add_product['link'] = $add_product_object->link_rewrite;
$add_product['price'] = $add_product_object->price;
$add_product['ean13'] = $add_product_object->ean13;
$add_product['id_product'] = Tools::getValue('id_product');
$add_product['id_category_default'] = $add_product_object->id_category_default;
$add_product['out_of_stock'] = $add_product_object->out_of_stock;
$add_product['minimal_quantity'] = 1;
$add_product['unit_price_ratio'] = 0;
$add_product = Product::getProductProperties((int)Configuration::get('PS_LANG_DEFAULT'), $add_product);
}
}
if (isset($add_product) && !in_array((int)Tools::getValue('id_product'), self::$products)) {
self::$products[] = (int)Tools::getValue('id_product');
$ga_products = $this->wrapProduct($add_product, $cart, 0, true);
if (array_key_exists('id_product_attribute', $ga_products) && $ga_products['id_product_attribute'] != '' && $ga_products['id_product_attribute'] != 0) {
$id_product = $ga_products['id_product_attribute'];
} else {
$id_product = Tools::getValue('id_product');
}
$gacart = $this->_manageData("", "R");
if ($cart['removeAction'] == 'delete') {
$ga_products['quantity'] = -1;
} elseif ($cart['extraAction'] == 'down') {
if (array_key_exists($id_product, $gacart)) {
$ga_products['quantity'] = $gacart[$id_product]['quantity'] - $cart['qty'];
} else {
$ga_products['quantity'] = $cart['qty'] * -1;
}
} elseif (Tools::getValue('step') <= 0) { // Sometimes cartsave is called in checkout
if (array_key_exists($id_product, $gacart)) {
$ga_products['quantity'] = $gacart[$id_product]['quantity'] + $cart['qty'];
}
}
$gacart[$id_product] = $ga_products;
$this->_manageData($gacart, 'W');
}
}
public function hookactionCarrierProcess($params)
{
if (isset($params['cart']->id_carrier)) {
$carrier_name = Db::getInstance()->getValue('SELECT name FROM `'._DB_PREFIX_.'carrier` WHERE id_carrier = '.(int)$params['cart']->id_carrier);
$this->_manageData('MBG.addCheckoutOption(2,\''.$carrier_name.'\');', 'A');
}
}
protected function _debugLog($function, $log)
{
if (!$this->_debug) {
return true;
}
$myFile = _PS_MODULE_DIR_.$this->name.'/logs/analytics.log';
$fh = fopen($myFile, 'a');
fwrite($fh, date('F j, Y, g:i a').' '.$function."\n");
fwrite($fh, print_r($log, true)."\n\n");
fclose($fh);
}
}

View File

@@ -0,0 +1,54 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_7510f8b22dd3e10476096425f78d4239'] = 'You have not yet set your Google Analytics ID';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_aba1a7971f85c725ba4aed21343eeb4b'] = 'Integrate Google Analytics script into your shop';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_fa214007826415a21a8456e3e09f999d'] = 'Are you sure you want to delete your details ?';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c888438d14855d7d96a2724ee9c306bd'] = 'Settings updated';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_f4f70727dc34561dfde1a3c529b6205c'] = 'Settings';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d7c9ce3337a28d63ce6626d90fdaedaa'] = 'Your username';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_81eeab9506186e2dca8faefa78d54067'] = 'Example:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_b2e71617778d8acc54945b2e7cd5b16e'] = 'Universal Analytics Active';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_a3e7f361e6fc12caf872119338642143'] = 'Update ID';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_6a26f548831e6a8c26bfbbd9f6ec61e0'] = 'Help';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d78b0fcff6b55bafe615f3fc1572c282'] = 'The first step of tracking e-commerce transactions is to enable e-commerce reporting for your website\'s profile.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d02388589ecfd3b58e0a90e42127ca61'] = 'To enable e-Commerce reporting, please follow these steps:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_11f4b4ba23dc72ee5e86ff5a90bdde60'] = 'Log in to your account';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_b452493b16ead8b4b25ab3fb7174b8f5'] = 'Click Edit next to the profile you would like to enable.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_95df6d8c97e880d8f6895d824d72c353'] = 'On the Profile Settings page, click Edit (next to Main Website Profile Information).';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_5189c0be0481408c9301c377818e69dc'] = 'Change the e-Commerce Website radio button from No to Yes';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_98d12a01ab2aeeb10b7100eecf1974a8'] = 'To set up your goals, enter Goal Information:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_a44698a775d2fec04549ba6a2ac00491'] = 'Return to Your Account main page';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_dbec126ee3be2cd285a32a8d413fd1fa'] = 'Find the profile for which you will be creating goals, then click Edit';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c4af40d39b97cf98040540639841e27a'] = 'Select one of the 4 goal slots available for that profile, then click Edit';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c3b99aa9b4638183dc1bf55f955ed9ae'] = 'Enter the Goal URL. Reaching this page marks a successful conversion.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_54849fd1a3b8bdde81bfd979bc43aaa9'] = 'Enter the Goal name as it should appear in your Google Analytics account.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_62034d209119c06315f59a5de39c6717'] = 'Turn on Goal.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_792795e7f3cedd66897ca35349101ba8'] = 'Then, define a funnel by following these steps:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_467ed594f2aa9b3e802037a10bad61b1'] = 'Enter the URL of the first page of your conversion funnel. This page should be a common page to all users working their way towards your Goal.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_2edf3f56ba30ad663429ba0e812a2396'] = 'Enter a Name for this step.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c909bea215f88ff0de9888dc95eed1ca'] = 'If this step is a required step in the conversion process, mark the checkbox to the right of the step.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_9d25cb4b66791343ca319b3cdb82dba6'] = 'Continue entering goal steps until your funnel has been completely defined. You may enter up to 10 steps, or only one step.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_1c681b64f4cd8f52aecbb55c98f5c768'] = 'Finally, configure Additional settings by following the steps below:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_bb1ca9cfa0f3f7dbd06a2364c9a0dc9c'] = 'If the URLs entered above are case sensitive, mark the checkbox.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_047cf7562621a3639b3e04a63dc6b41f'] = 'Select the appropriate goal Match Type. (';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d59048f21fd887ad520398ce677be586'] = 'Learn more';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_f0c5b61aabf16d5ce925722b65c9aad8'] = 'about Match Types and how to choose the appropriate goal Match Type for your goal.)';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_3dcb5dddc6b7c11d4ea76a60dc1a0466'] = 'Enter a Goal value. This is the value used in Google Analytics\' ROI calculations.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_a39f026ca75c6279ac9487265c00e3f5'] = 'Click Save Changes to create this Goal and funnel, or Cancel to exit without saving.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_cd4952b65560a1242c68ffc980a6e515'] = 'Demonstration: The order process';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_efbf206b1b60cc0400c6147723509bd6'] = 'After having enabled your e-commerce reports and selected the respective profile enter \'order-confirmation.php\' as the targeted page URL.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_68db264effa9364901183d9d12fac500'] = 'Name this goal (for example \'Order process\')';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_9b8bc3519c65da8fac122f91ac5b7673'] = 'Activate the goal';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_86a358dd6df1ba0cb3565b88380ba7a6'] = 'Add \'product.php\' as the first page of your conversion funnel';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_b7f896191caad09b5fc34e79f1cefa76'] = 'Give it a name (for example, \'Product page\')';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_ef7060dd05e779dcfbf82f236df43823'] = 'Do not mark the \'required\' checkbox because the customer could be visiting directly from an \'adding to cart\' button such as in the homefeatured block on the homepage.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_3bab28a0105361c49ca261ca08a19bf7'] = 'Continue by entering the following URLs as goal steps:';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_9bfb6e6af6e6793bfa9387e728187c87'] = '(required)';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_6a47891ae07f45802bc948d2618e36f5'] = 'Check the \'Case sensitive\' option';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d2d0c38d112e1d775057388122ae7545'] = 'Save this new goal';
return $_MODULE;

View File

@@ -0,0 +1,54 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_7510f8b22dd3e10476096425f78d4239'] = 'Vous n\'avez pas encore renseigné votre ID Google Analytics';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_aba1a7971f85c725ba4aed21343eeb4b'] = 'Intègre le script de Google Analytics à votre boutique';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_fa214007826415a21a8456e3e09f999d'] = 'Êtes-vous sûr de vouloir tout supprimer ?';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c888438d14855d7d96a2724ee9c306bd'] = 'Mise à jour réussie';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d7c9ce3337a28d63ce6626d90fdaedaa'] = 'Votre identifiant';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_81eeab9506186e2dca8faefa78d54067'] = 'Exemple :';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_b2e71617778d8acc54945b2e7cd5b16e'] = 'Universal Analytics activé';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_a3e7f361e6fc12caf872119338642143'] = 'Enregistrer l\'identifiant';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_6a26f548831e6a8c26bfbbd9f6ec61e0'] = 'Aide';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d78b0fcff6b55bafe615f3fc1572c282'] = 'La première étape pour analyser les transactions e-commerce consiste à activer l\'archivage sur le profil de votre site.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d02388589ecfd3b58e0a90e42127ca61'] = 'Pour activer l\'option e-commerce, suivez ces étapes :';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_11f4b4ba23dc72ee5e86ff5a90bdde60'] = 'Connectez-vous à votre compte';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_b452493b16ead8b4b25ab3fb7174b8f5'] = 'Cliquez sur Edit, à côté du profil que vous désirez activer';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_95df6d8c97e880d8f6895d824d72c353'] = 'Sur la page \\"Paramètres des profils\\", cliquez sur \\"Modifier\\" en regard de l\'option \\"Informations sur le profil du site principal\\"';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_5189c0be0481408c9301c377818e69dc'] = 'Modifiez le bouton radio \\"E-commerce\\" sur \\"Oui\\"';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_98d12a01ab2aeeb10b7100eecf1974a8'] = 'Afin de définir vos objectifs, saisissez les informations de l\'objectif :';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_a44698a775d2fec04549ba6a2ac00491'] = 'Retournez sur la page d\'accueil de votre compte';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_dbec126ee3be2cd285a32a8d413fd1fa'] = 'Trouvez le profil correspondant à l\'objectif et éditez-le';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c4af40d39b97cf98040540639841e27a'] = 'Sélectionnez un des 4 emplacements disponibles pour ce profil et cliquez sur Modifier';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c3b99aa9b4638183dc1bf55f955ed9ae'] = 'Saisissez l\'URL de la page d\'objectif. Une transformation est enregistrée chaque fois qu\'un visiteur accède à cette page.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_54849fd1a3b8bdde81bfd979bc43aaa9'] = 'Saisissez le nom de l\'objectif tel qu\'il doit apparaître dans votre compte Google Analytics.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_62034d209119c06315f59a5de39c6717'] = 'Activez l\'objectif';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_792795e7f3cedd66897ca35349101ba8'] = 'Ensuite, définissez un tunnel de conversion en suivant ces étapes :';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_467ed594f2aa9b3e802037a10bad61b1'] = 'Saisissez l\'URL de la première page de votre tunnel de conversion. Cette page doit être commune à tous les internautes que vous souhaitez amener jusqu\'à votre objectif.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_2edf3f56ba30ad663429ba0e812a2396'] = 'Attribuez un nom à cette étape.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_c909bea215f88ff0de9888dc95eed1ca'] = 'Si cette étape est obligatoire dans le processus de transformation, cochez la case à droite de cette étape.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_9d25cb4b66791343ca319b3cdb82dba6'] = 'Saisissez toutes les étapes précédant l\'objectif jusqu\'à ce que vous ayez terminé de définir le tunnel de conversion. Vous pouvez saisir de 1 à 10 étapes.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_1c681b64f4cd8f52aecbb55c98f5c768'] = 'Pour finir, configurez les Paramètres complémentaires en procédant comme suit :';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_bb1ca9cfa0f3f7dbd06a2364c9a0dc9c'] = 'Si les URL saisies ci-dessus sont sensibles à la casse, cochez la case.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_047cf7562621a3639b3e04a63dc6b41f'] = 'Sélectionnez l\'objectif approprié. (';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d59048f21fd887ad520398ce677be586'] = 'En savoir plus';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_f0c5b61aabf16d5ce925722b65c9aad8'] = 'sur les types de correspondances et sur la façon de choisir le type de correspondance approprié à votre objectif)';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_3dcb5dddc6b7c11d4ea76a60dc1a0466'] = 'Saisissez une valeur d\'objectif. Cette valeur est utilisée par les calculs ROI de Google Analytics.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_a39f026ca75c6279ac9487265c00e3f5'] = 'Cliquez sur "Enregistrer les modifications" pour créer cet objectif et ce tunnel de conversion, ou sur "Annuler" pour quitter sans enregistrer.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_cd4952b65560a1242c68ffc980a6e515'] = 'Démonstration : Le processus de commande';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_efbf206b1b60cc0400c6147723509bd6'] = 'Après avoir activé vos rapports e-commerce et sélectionné le profil respectif, mettez \'order-confirmation.php\' comme page cible.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_68db264effa9364901183d9d12fac500'] = 'Nommez cet objectif (par exemple \'Processus de commande\')';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_9b8bc3519c65da8fac122f91ac5b7673'] = 'Activez l\'objectif';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_86a358dd6df1ba0cb3565b88380ba7a6'] = 'Ajoutez \'product.php\' comme la première page de votre tunnel de conversion';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_b7f896191caad09b5fc34e79f1cefa76'] = 'Donnez lui un nom (par exemple \'Page produit\')';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_ef7060dd05e779dcfbf82f236df43823'] = 'N\'activez pas la case \'requis\' parce que les clients pourraient visiter directement par un bouton \'Ajouter au panier\', tel que dans le module HomeFeatured sur la page d\'accueil.';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_3bab28a0105361c49ca261ca08a19bf7'] = 'Continuez en saisissant les URL suivantes comme étapes de l\'objectif :';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_9bfb6e6af6e6793bfa9387e728187c87'] = 'requis';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_6a47891ae07f45802bc948d2618e36f5'] = 'Vérifiez l\'option \'sensibilité de la casse\'';
$_MODULE['<{ps_googleanalytics}prestashop>ps_googleanalytics_d2d0c38d112e1d775057388122ae7545'] = 'Sauvegardez cet objectif';
return $_MODULE;

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,38 @@
<?php
/**
* 2007-2018 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-2018 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_PS_VERSION_'))
exit;
function upgrade_module_3_1_0($object)
{
Configuration::updateValue('GANALYTICS', '3.1.0');
return Db::getInstance()->execute('
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'ganalytics_data` (
`id_cart` int(11) NOT NULL,
`id_shop` int(11) NOT NULL,
`data` TEXT DEFAULT NULL,
PRIMARY KEY (`id_cart`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8');
}

View File

@@ -0,0 +1,7 @@
<?php
// autoload.php @generated by Composer
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit8dfdd81d0f2c31d206493c4e692de9dc::getLoader();

View File

@@ -0,0 +1,445 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Autoload;
/**
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
*
* $loader = new \Composer\Autoload\ClassLoader();
*
* // register classes with namespaces
* $loader->add('Symfony\Component', __DIR__.'/component');
* $loader->add('Symfony', __DIR__.'/framework');
*
* // activate the autoloader
* $loader->register();
*
* // to enable searching the include path (eg. for PEAR packages)
* $loader->setUseIncludePath(true);
*
* In this example, if you try to use a class in the Symfony\Component
* namespace or one of its children (Symfony\Component\Console for instance),
* the autoloader will first look for the class under the component/
* directory, and it will then fallback to the framework/ directory if not
* found before giving up.
*
* This class is loosely based on the Symfony UniversalClassLoader.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
// PSR-4
private $prefixLengthsPsr4 = array();
private $prefixDirsPsr4 = array();
private $fallbackDirsPsr4 = array();
// PSR-0
private $prefixesPsr0 = array();
private $fallbackDirsPsr0 = array();
private $useIncludePath = false;
private $classMap = array();
private $classMapAuthoritative = false;
private $missingClasses = array();
private $apcuPrefix;
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', $this->prefixesPsr0);
}
return array();
}
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
public function getClassMap()
{
return $this->classMap;
}
/**
* @param array $classMap Class to filename map
*/
public function addClassMap(array $classMap)
{
if ($this->classMap) {
$this->classMap = array_merge($this->classMap, $classMap);
} else {
$this->classMap = $classMap;
}
}
/**
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*/
public function add($prefix, $paths, $prepend = false)
{
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
(array) $paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
(array) $paths
);
}
return;
}
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
(array) $paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
(array) $paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
(array) $paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
(array) $paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 base directories
*/
public function set($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr0 = (array) $paths;
} else {
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
}
}
/**
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*/
public function setPsr4($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
/**
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*/
public function setUseIncludePath($useIncludePath)
{
$this->useIncludePath = $useIncludePath;
}
/**
* Can be used to check if the autoloader uses the include path to check
* for classes.
*
* @return bool
*/
public function getUseIncludePath()
{
return $this->useIncludePath;
}
/**
* Turns off searching the prefix and fallback directories for classes
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
$this->classMapAuthoritative = $classMapAuthoritative;
}
/**
* Should class lookup fail if not found in the current class map?
*
* @return bool
*/
public function isClassMapAuthoritative()
{
return $this->classMapAuthoritative;
}
/**
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
}
/**
* The APCu prefix in use, or null if APCu caching is not enabled.
*
* @return string|null
*/
public function getApcuPrefix()
{
return $this->apcuPrefix;
}
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
}
/**
* Unregisters this instance as an autoloader.
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return bool|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
return true;
}
}
/**
* Finds the path to the file where the class is defined.
*
* @param string $class The name of the class
*
* @return string|false The path if found, false otherwise
*/
public function findFile($class)
{
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
return false;
}
if (null !== $this->apcuPrefix) {
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
if ($hit) {
return $file;
}
}
$file = $this->findFileWithExtension($class, '.php');
// Search for Hack files if we are running on HHVM
if (false === $file && defined('HHVM_VERSION')) {
$file = $this->findFileWithExtension($class, '.hh');
}
if (null !== $this->apcuPrefix) {
apcu_add($this->apcuPrefix.$class, $file);
}
if (false === $file) {
// Remember that this class does not exist.
$this->missingClasses[$class] = true;
}
return $file;
}
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath.'\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
}
}
}
// PSR-4 fallback dirs
foreach ($this->fallbackDirsPsr4 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
return $file;
}
}
// PSR-0 lookup
if (false !== $pos = strrpos($class, '\\')) {
// namespaced class name
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
} else {
// PEAR-like class name
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
}
if (isset($this->prefixesPsr0[$first])) {
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
if (0 === strpos($class, $prefix)) {
foreach ($dirs as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
}
}
}
// PSR-0 fallback dirs
foreach ($this->fallbackDirsPsr0 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
// PSR-0 include paths.
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}
return false;
}
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*/
function includeFile($file)
{
include $file;
}

View File

@@ -0,0 +1,21 @@
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,9 @@
<?php
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
);

View File

@@ -0,0 +1,9 @@
<?php
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
);

View File

@@ -0,0 +1,9 @@
<?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
);

View File

@@ -0,0 +1,52 @@
<?php
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit8dfdd81d0f2c31d206493c4e692de9dc
{
private static $loader;
public static function loadClassLoader($class)
{
if ('Composer\Autoload\ClassLoader' === $class) {
require __DIR__ . '/ClassLoader.php';
}
}
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit8dfdd81d0f2c31d206493c4e692de9dc', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit8dfdd81d0f2c31d206493c4e692de9dc', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit8dfdd81d0f2c31d206493c4e692de9dc::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
$loader->set($namespace, $path);
}
$map = require __DIR__ . '/autoload_psr4.php';
foreach ($map as $namespace => $path) {
$loader->setPsr4($namespace, $path);
}
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
$loader->addClassMap($classMap);
}
}
$loader->register(true);
return $loader;
}
}

View File

@@ -0,0 +1,15 @@
<?php
// autoload_static.php @generated by Composer
namespace Composer\Autoload;
class ComposerStaticInit8dfdd81d0f2c31d206493c4e692de9dc
{
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
}, null, ClassLoader::class);
}
}

View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1,74 @@
/**
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
#content .panel {
border-radius: 5px;
border: 1px solid rgb(230, 230, 230);
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
box-shadow: rgba(0, 0, 0, 0.0980392) 0px 2px 0px 0px, rgb(255, 255, 255) 0px 0px 0px 3px inset;
color: rgb(85, 85, 85);
display: block;
font-size: 12px;
background: white;
padding: 10px 20px 20px 20px;
margin-bottom: 10px;
}
#content .panel .row {
display: flex;
}
#content img {
max-width:100%;
}
#content .panel .col-lg-6,
#content .panel .col-xs-6 {
display:inline-block;
}
#advantages_list > div,
#google_analytics_top > div {
min-width:50%;
float: left;
}
#content hr {
border-bottom: 1px solid rgb(230, 230, 230);
}
#google_analytics_top.row,
#google_analytics_content div {
background-color: white;
}
#google_analytics_content a {
color: #00aff0;
}
#google_analytics_top .text-right {
text-align: right;
}

View File

@@ -0,0 +1,17 @@
#content .panel {
margin: 0 auto;
max-width: 1300px;
}
#content .panel p {
margin-bottom:2em;
}
#advantages_list .col-xs-6 {
height:5em;
}
#advantages_list div > img {
margin: 1em;
width: 60px;
}

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,186 @@
/**
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
**/
/* globals $, ga, jQuery */
var GoogleAnalyticEnhancedECommerce = {
setCurrency: function(Currency) {
ga('set', '&cu', Currency);
},
add: function(Product, Order, Impression) {
var Products = {};
var Orders = {};
var ProductFieldObject = ['id', 'name', 'category', 'brand', 'variant', 'price', 'quantity', 'coupon', 'list', 'position', 'dimension1'];
var OrderFieldObject = ['id', 'affiliation', 'revenue', 'tax', 'shipping', 'coupon', 'list', 'step', 'option'];
if (Product != null) {
if (Impression && Product.quantity !== undefined) {
delete Product.quantity;
}
for (var productKey in Product) {
for (var i = 0; i < ProductFieldObject.length; i++) {
if (productKey.toLowerCase() == ProductFieldObject[i]) {
if (Product[productKey] != null) {
Products[productKey.toLowerCase()] = Product[productKey];
}
}
}
}
}
if (Order != null) {
for (var orderKey in Order) {
for (var j = 0; j < OrderFieldObject.length; j++) {
if (orderKey.toLowerCase() == OrderFieldObject[j]) {
Orders[orderKey.toLowerCase()] = Order[orderKey];
}
}
}
}
if (Impression) {
ga('ec:addImpression', Products);
} else {
ga('ec:addProduct', Products);
}
},
addProductDetailView: function(Product) {
this.add(Product);
ga('ec:setAction', 'detail');
ga('send', 'event', 'UX', 'detail', 'Product Detail View',{'nonInteraction': 1});
},
addToCart: function(Product) {
this.add(Product);
ga('ec:setAction', 'add');
ga('send', 'event', 'UX', 'click', 'Add to Cart'); // Send data using an event.
},
removeFromCart: function(Product) {
this.add(Product);
ga('ec:setAction', 'remove');
ga('send', 'event', 'UX', 'click', 'Remove From cart'); // Send data using an event.
},
addProductImpression: function(Product) {
//ga('send', 'pageview');
},
/**
id, type, affiliation, revenue, tax, shipping and coupon.
**/
refundByOrderId: function(Order) {
/**
* Refund an entire transaction.
**/
ga('ec:setAction', 'refund', {
'id': Order.id // Transaction ID is only required field for full refund.
});
ga('send', 'event', 'Ecommerce', 'Refund', {'nonInteraction': 1});
},
refundByProduct: function(Order) {
/**
* Refund a single product.
**/
//this.add(Product);
ga('ec:setAction', 'refund', {
'id': Order.id, // Transaction ID is required for partial refund.
});
ga('send', 'event', 'Ecommerce', 'Refund', {'nonInteraction': 1});
},
addProductClick: function(Product) {
var ClickPoint = jQuery('a[href$="' + Product.url + '"].quick-view');
ClickPoint.on("click", function() {
GoogleAnalyticEnhancedECommerce.add(Product);
ga('ec:setAction', 'click', {
list: Product.list
});
ga('send', 'event', 'Product Quick View', 'click', Product.list, {
'hitCallback': function() {
return !ga.loaded;
}
});
});
},
addProductClickByHttpReferal: function(Product) {
this.add(Product);
ga('ec:setAction', 'click', {
list: Product.list
});
ga('send', 'event', 'Product Click', 'click', Product.list, {
'nonInteraction': 1,
'hitCallback': function() {
return !ga.loaded;
}
});
},
addTransaction: function(Order) {
//this.add(Product);
ga('ec:setAction', 'purchase', Order);
ga('send', 'event','Transaction','purchase', {
'hitCallback': function() {
$.get(Order.url, {
orderid: Order.id,
customer: Order.customer
});
}
});
},
addCheckout: function(Step) {
ga('ec:setAction', 'checkout', {
'step': Step
//'option':'Visa'
});
ga('send', 'pageview');
},
addCheckoutOption: function(Step,Option) {
ga('ec:setAction', 'checkout_option', {
'step': Step,
'option': Option
});
ga('send', 'event', 'Checkout', 'Option');
}
};

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,66 @@
{*
* 2007-2017 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-2017 PrestaShop SA
* @version Release: $Revision:7040 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<div class="panel">
<div class="row" id="google_analytics_top">
<div class="col-lg-6">
<img src="{$module_dir}views/img/ga_logo.png" alt="Google Analytics" />
</div>
<div class="col-lg-6 text-right">
<a href="https://support.google.com/analytics/answer/1008015" rel="external"><img src="{$module_dir}views/img/create_account_btn.png" alt="" /></a>
</div>
</div>
<hr/>
<div id="google_analytics_content">
<div class="row">
<div class="col-lg-6">
<p>
{l s='Your customers go everywhere; shouldn\'t your analytics.' d='Modules.GAnalytics.Admin'}
</p><p>
{l s='Google Analytics shows you the full customer picture across ads and videos, websites and social tools, tables and smartphones. That makes it easier to serve your current customers and win new ones.' d='Modules.GAnalytics.Admin'}
</p>
<p><b>{l s='With ecommerce functionality in Google Analytics you can gain clear insight into important metrics about shopper behavior and conversion, including:' d='Modules.GAnalytics.Admin'}</b></p>
<div id="advantages_list">
<div class="col-xs-6"><img src="{$module_dir}views/img/product_detail_icon.png" alt="" />{l s='Product detail views' d='Modules.GAnalytics.Admin'}</div>
<div class="col-xs-6"><img src="{$module_dir}views/img/merchandising_tools_icon.png" alt="" />{l s='Internal merchandising Success' d='Modules.GAnalytics.Admin'}</div>
<div class="col-xs-6"><img src="{$module_dir}views/img/add_to_cart_icon.png" alt="" />{l s='"Add to cart" actions' d='Modules.GAnalytics.Admin'}</div>
<div class="col-xs-6"><img src="{$module_dir}views/img/checkout_icon.png" alt="" />{l s='The checkout process' d='Modules.GAnalytics.Admin'}</div>
<div class="col-xs-6"><img src="{$module_dir}views/img/campaign_clicks_icon.png" alt="" />{l s='Internal campaign clicks' d='Modules.GAnalytics.Admin'}</div>
<div class="col-xs-6"><img src="{$module_dir}views/img/purchase_icon.png" alt="" />{l s='And purchase' d='Modules.GAnalytics.Admin'}</div>
</div>
</div>
<div class="col-lg-6 text-center">
<p>
<img src="{$module_dir}views/img/stats.png" alt="" /><br />
<span class="small"><em>{l s='Merchants are able to understand how far along users get in the buying process and where they are dropping off.' d='Modules.GAnalytics.Admin'}</em></span>
</p>
<p class="text-right">
<b><a href="https://support.google.com/analytics/answer/1008015" rel="external">{l s='Create your account to get started.' d='Modules.GAnalytics.Admin'}</a></b>
</p>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,60 @@
{*
* 2007-2017 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-2017 PrestaShop SA
* @version Release: $Revision:7040 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{literal}
<script type="text/javascript">
(window.gaDevIds=window.gaDevIds||[]).push('d6YPbH');
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
{/literal}
{if $gaCrossdomainEnabled}
ga('create', '{$gaAccountId|escape:'htmlall':'UTF-8'}', 'auto', {literal}{'allowLinker': true}{/literal});
ga('require', 'linker');
ga('linker:autoLink', [
{foreach from=$shops item=shop}
{if $shop.id_shop != $currentShopId}
{if $useSecureMode}'{$shop.domain_ssl|escape:'htmlall':'UTF-8'}'{else}'{$shop.domain|escape:'htmlall':'UTF-8'}'{/if},
{/if}
{/foreach}
]);
{else}
ga('create', '{$gaAccountId|escape:'htmlall':'UTF-8'}', 'auto');
{/if}
{if $userId && !$backOffice}
ga('set', 'userId', '{$userId|escape:'htmlall':'UTF-8'}');
{/if}
{if $gaAnonymizeEnabled}
ga('set', 'anonymizeIp', true);
{/if}
{if $backOffice}
ga('set', 'nonInteraction', true);
{/if}
{literal}
ga('require', 'ec');
</script>
{/literal}

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2015 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-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1998 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;