Version Notes
No notes
Download this release
Release Info
Developer | Yireo |
Extension | yireo_googletagmanager |
Version | 1.3.1 |
Comparing to | |
See all releases |
Code changes from version 1.3.0 to 1.3.1
- app/code/community/Yireo/GoogleTagManager/Helper/Data.php +4 -0
- app/code/community/Yireo/GoogleTagManager/etc/config.xml +1 -1
- app/design/frontend/base/default/template/googletagmanager/customer.phtml +4 -2
- app/design/frontend/base/default/template/googletagmanager/default.phtml +7 -1
- package.xml +1 -1
app/code/community/Yireo/GoogleTagManager/Helper/Data.php
CHANGED
@@ -15,6 +15,10 @@ class Yireo_GoogleTagManager_Helper_Data extends Mage_Core_Helper_Abstract
|
|
15 |
*/
|
16 |
public function isEnabled()
|
17 |
{
|
|
|
|
|
|
|
|
|
18 |
return (bool)$this->gertConfigValue('enabled');
|
19 |
}
|
20 |
|
15 |
*/
|
16 |
public function isEnabled()
|
17 |
{
|
18 |
+
if ((bool)Mage::getStoreConfig('advanced/modules_disable_output/Yireo_GoogleTagManager')) {
|
19 |
+
return false;
|
20 |
+
}
|
21 |
+
|
22 |
return (bool)$this->gertConfigValue('enabled');
|
23 |
}
|
24 |
|
app/code/community/Yireo/GoogleTagManager/etc/config.xml
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
<config>
|
13 |
<modules>
|
14 |
<Yireo_GoogleTagManager>
|
15 |
-
<version>1.3.
|
16 |
</Yireo_GoogleTagManager>
|
17 |
</modules>
|
18 |
|
12 |
<config>
|
13 |
<modules>
|
14 |
<Yireo_GoogleTagManager>
|
15 |
+
<version>1.3.1</version>
|
16 |
</Yireo_GoogleTagManager>
|
17 |
</modules>
|
18 |
|
app/design/frontend/base/default/template/googletagmanager/customer.phtml
CHANGED
@@ -13,9 +13,11 @@
|
|
13 |
<?php $customerGroup = $this->getCustomerGroup(); ?>
|
14 |
<?php if(!empty($customer) && $customer->getId() > 0) : ?>
|
15 |
<?php $this->addAttribute('customerLoggedIn', 1); ?>
|
16 |
-
|
|
|
17 |
<?php $this->addAttribute('customerLoggedIn', 0); ?>
|
|
|
18 |
<?php endif; ?>
|
19 |
<?php $this->addAttribute('customerGroupId', $customerGroup->getId()); ?>
|
20 |
<?php $this->addAttribute('customerGroupCode', strtoupper($customerGroup->getCustomerGroupCode())); ?>
|
21 |
-
<?php endif; ?>
|
13 |
<?php $customerGroup = $this->getCustomerGroup(); ?>
|
14 |
<?php if(!empty($customer) && $customer->getId() > 0) : ?>
|
15 |
<?php $this->addAttribute('customerLoggedIn', 1); ?>
|
16 |
+
<?php $this->addAttribute('customerId', $customer->getId()); ?>
|
17 |
+
<?php else: ?>
|
18 |
<?php $this->addAttribute('customerLoggedIn', 0); ?>
|
19 |
+
<?php $this->addAttribute('customerId', 0); ?>
|
20 |
<?php endif; ?>
|
21 |
<?php $this->addAttribute('customerGroupId', $customerGroup->getId()); ?>
|
22 |
<?php $this->addAttribute('customerGroupCode', strtoupper($customerGroup->getCustomerGroupCode())); ?>
|
23 |
+
<?php endif; ?>
|
app/design/frontend/base/default/template/googletagmanager/default.phtml
CHANGED
@@ -7,8 +7,14 @@
|
|
7 |
* @copyright Copyright (c) 2014 Yireo (http://www.yireo.com/)
|
8 |
* @license Open Software License
|
9 |
*/
|
|
|
|
|
|
|
|
|
|
|
10 |
?>
|
11 |
<?php if ($this->isEnabled()) : ?>
|
|
|
12 |
<noscript>
|
13 |
<iframe src="//www.googletagmanager.com/ns.html?id=<?= $this->getId(); ?>" height="0" width="0" style="display:none;visibility:hidden"></iframe>
|
14 |
</noscript>
|
@@ -29,4 +35,4 @@
|
|
29 |
f.parentNode.insertBefore(j, f);
|
30 |
})(window, document, 'script', 'dataLayer', '<?= $this->getId(); ?>');
|
31 |
</script>
|
32 |
-
<?php endif; ?>
|
7 |
* @copyright Copyright (c) 2014 Yireo (http://www.yireo.com/)
|
8 |
* @license Open Software License
|
9 |
*/
|
10 |
+
|
11 |
+
$moduleName = $this->getRequest()->getModuleName();
|
12 |
+
$controllerName = $this->getRequest()->getControllerName();
|
13 |
+
$actionName = $this->getRequest()->getActionName();
|
14 |
+
$route = $moduleName.'/'.$controllerName.'/'.$actionName;
|
15 |
?>
|
16 |
<?php if ($this->isEnabled()) : ?>
|
17 |
+
<?php $this->addAttribute('pageType', $route); ?>
|
18 |
<noscript>
|
19 |
<iframe src="//www.googletagmanager.com/ns.html?id=<?= $this->getId(); ?>" height="0" width="0" style="display:none;visibility:hidden"></iframe>
|
20 |
</noscript>
|
35 |
f.parentNode.insertBefore(j, f);
|
36 |
})(window, document, 'script', 'dataLayer', '<?= $this->getId(); ?>');
|
37 |
</script>
|
38 |
+
<?php endif; ?>
|
package.xml
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
<package><name>yireo_googletagmanager</name><version>1.3.
|
1 |
<?xml version="1.0"?>
|
2 |
+
<package><name>yireo_googletagmanager</name><version>1.3.1</version><stability>stable</stability><license>Open Source License</license><channel>community</channel><extends></extends><summary>No summary</summary><description>No description</description><notes>No notes</notes><authors><author><name>Yireo</name><user>yireo</user><email>info@yireo.com</email></author></authors><date>2015-08-31</date><time>21:42:42</time><compatible></compatible><dependencies><required><php><min>5.4.0</min><max>6.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="etc"><dir name="modules"><file name="Yireo_GoogleTagManager.xml" hash="420bde8207c2ed151e50ef4b7df1c28f"/></dir></dir><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="googletagmanager"><file name="category.phtml" hash="e02dc5d555dd7a5195031d80e5308fc1"/><file name="custom.phtml" hash="2b4ae99a074d314241a1ba7127661c04"/><file name="customer.phtml" hash="a26d3c30a2a909ef7bd8bffe32f65fb2"/><file name="default.phtml" hash="28f3a12df2e7e745bb7b648c946d58c7"/><file name="order.phtml" hash="b0b1c6130caba6198ebebe06484190f2"/><file name="product.phtml" hash="e0af99cd595af21de5a97911d2d41fa1"/><file name="quote.phtml" hash="3303deca9e3012c8dcfda1e972e36ace"/><file name="script.phtml" hash="18e2d45895b95061ccf04c5af74e25a9"/></dir></dir><dir name="layout"><file name="googletagmanager.xml" hash="4b2e83f2e964891da358c9a64647a043"/></dir></dir></dir></dir></dir><dir name="code"><dir name="community"><dir name="Yireo"><dir name="GoogleTagManager"><dir name="etc"><file name="config.xml" hash="8ceaca5fa5e870d1e11e265c2ae9552f"/><file name="system.xml" hash="c6d755d52247656fd8e6931503a5840a"/></dir><dir name="Model"><file name="Container.php" hash="782c5f85ca92dc39dff034768d9d7177"/><file name="Observer.php" hash="114ce303d3487ead4bd81ae084665525"/><dir name="Backend"><dir name="Source"><file name="Method.php" hash="d5e60a00a1f85fa658c02e9f895539d3"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="f3df4e3f5b020bfd3bced0c31ae9b0f1"/></dir><dir name="Block"><file name="Category.php" hash="e1da36db1401d657a19e2c6291d70c38"/><file name="Custom.php" hash="fd1c528409d0186f9ec7de8391d2509c"/><file name="Customer.php" hash="a6f461d0210b141d3d3e0e4cfd80cc3a"/><file name="Default.php" hash="2c078f7152ac294a3d712193624c9fd4"/><file name="Order.php" hash="a36269d8b49f8c5bbd05504a33b392db"/><file name="Product.php" hash="02f816ccdb1a0b7a74f001dee0d0018d"/><file name="Quote.php" hash="17580bf20487ceb803421c0ca0575741"/><file name="Script.php" hash="3ddfa74f22197a17f6158b6b40c20abf"/></dir></dir></dir></dir></dir></dir></target></contents></package>
|