Initial commit
This commit is contained in:
33
local/modules/HookAnalytics/Hook/FrontHook.php
Normal file
33
local/modules/HookAnalytics/Hook/FrontHook.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace HookAnalytics\Hook;
|
||||
|
||||
use Thelia\Core\Event\Hook\HookRenderEvent;
|
||||
use Thelia\Core\Hook\BaseHook;
|
||||
use Thelia\Model\ConfigQuery;
|
||||
|
||||
/**
|
||||
* Class FrontHook
|
||||
* @package HookCurrency\Hook
|
||||
* @author Julien Chanséaume <jchanseaume@openstudio.fr>
|
||||
*/
|
||||
class FrontHook extends BaseHook {
|
||||
|
||||
public function onMainHeadBottom(HookRenderEvent $event)
|
||||
{
|
||||
$value = trim(ConfigQuery::read("hookanalytics_trackingcode", ""));
|
||||
if ("" != $value){
|
||||
$event->add($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user