Version Notes
New Features
- page name defaults to meta title
Fixed
- disabled full page caching of block output
Download this release
Release Info
Developer | Hadar Paz |
Extension | Inside_Analytics |
Version | 2.4.0 |
Comparing to | |
See all releases |
Code changes from version 2.3.1 to 2.4.0
- app/code/community/Inside/Analytics/Block/Analytics.php +2 -2
- app/code/community/Inside/Analytics/Helper/Data.php +15 -1
- app/code/community/Inside/Analytics/Model/Container/Analytics.php +33 -0
- app/code/community/Inside/Analytics/Model/PageView.php +1 -1
- app/code/community/Inside/Analytics/Model/PageView/Type.php +2 -5
- app/code/community/Inside/Analytics/etc/cache.xml +12 -0
- app/code/community/Inside/Analytics/etc/config.xml +1 -1
- package.xml +7 -10
app/code/community/Inside/Analytics/Block/Analytics.php
CHANGED
@@ -68,7 +68,7 @@ class Inside_Analytics_Block_Analytics extends Mage_Core_Block_Template
|
|
68 |
if (is_null($val)) {
|
69 |
continue;
|
70 |
}
|
71 |
-
$script .= '\''.$key.'\'
|
72 |
}
|
73 |
Mage::helper('inside')->log('$script: '.$script, true);
|
74 |
Mage::helper('inside')->log('LEAVING: '.__METHOD__, true);
|
@@ -94,7 +94,7 @@ class Inside_Analytics_Block_Analytics extends Mage_Core_Block_Template
|
|
94 |
if (is_null($val)) {
|
95 |
continue;
|
96 |
}
|
97 |
-
$script .= '\''.$key.'\'
|
98 |
}
|
99 |
$script = substr($script, 0, strlen($script)-1) . "});";
|
100 |
}
|
68 |
if (is_null($val)) {
|
69 |
continue;
|
70 |
}
|
71 |
+
$script .= '\''.$key.'\':'. json_encode($val).',';
|
72 |
}
|
73 |
Mage::helper('inside')->log('$script: '.$script, true);
|
74 |
Mage::helper('inside')->log('LEAVING: '.__METHOD__, true);
|
94 |
if (is_null($val)) {
|
95 |
continue;
|
96 |
}
|
97 |
+
$script .= '\''.$key.'\':'. json_encode($val).',';
|
98 |
}
|
99 |
$script = substr($script, 0, strlen($script)-1) . "});";
|
100 |
}
|
app/code/community/Inside/Analytics/Helper/Data.php
CHANGED
@@ -117,6 +117,20 @@ class Inside_Analytics_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
117 |
return array_reverse($categoryName);
|
118 |
}
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
/**
|
121 |
* Gets category array from page title (Amasty improved navigation)
|
122 |
*
|
@@ -124,7 +138,7 @@ class Inside_Analytics_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
124 |
*/
|
125 |
public function getCategoryFromTitle()
|
126 |
{
|
127 |
-
$title = explode(' - ',
|
128 |
return $title;
|
129 |
}
|
130 |
|
117 |
return array_reverse($categoryName);
|
118 |
}
|
119 |
|
120 |
+
/**
|
121 |
+
* Get meta title from current page
|
122 |
+
*
|
123 |
+
* @return string
|
124 |
+
*/
|
125 |
+
public function getPageTitle()
|
126 |
+
{
|
127 |
+
$block = Mage::app()->getLayout()->getBlock('head');
|
128 |
+
if ($block) {
|
129 |
+
return $block->getTitle();
|
130 |
+
}
|
131 |
+
return '';
|
132 |
+
}
|
133 |
+
|
134 |
/**
|
135 |
* Gets category array from page title (Amasty improved navigation)
|
136 |
*
|
138 |
*/
|
139 |
public function getCategoryFromTitle()
|
140 |
{
|
141 |
+
$title = explode(' - ', $this->getPageTitle());
|
142 |
return $title;
|
143 |
}
|
144 |
|
app/code/community/Inside/Analytics/Model/Container/Analytics.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Special thanks to Alan Taylor for this implementation.
|
5 |
+
*
|
6 |
+
* @category Inside
|
7 |
+
* @package Inside_Analytics
|
8 |
+
* @author Inside <martin.novak@inside.tm>
|
9 |
+
*/
|
10 |
+
class Inside_Analytics_Model_Container_Analytics extends Enterprise_PageCache_Model_Container_Abstract
|
11 |
+
{
|
12 |
+
|
13 |
+
protected function _getCacheId()
|
14 |
+
{
|
15 |
+
$key = $this->_placeholder->getAttribute('cache_id');
|
16 |
+
return 'INSIDE_ANALYTICS_' . md5($key);
|
17 |
+
}
|
18 |
+
|
19 |
+
protected function _renderBlock()
|
20 |
+
{
|
21 |
+
$blockClass = $this->_placeholder->getAttribute('block');
|
22 |
+
$template = $this->_placeholder->getAttribute('template');
|
23 |
+
$block = new $blockClass;
|
24 |
+
$block->setTemplate($template);
|
25 |
+
$block->setLayout(Mage::app()->getLayout());
|
26 |
+
return $block->toHtml();
|
27 |
+
}
|
28 |
+
|
29 |
+
protected function _saveCache($data, $id, $tags = array(), $lifetime = null)
|
30 |
+
{
|
31 |
+
return false;
|
32 |
+
}
|
33 |
+
}
|
app/code/community/Inside/Analytics/Model/PageView.php
CHANGED
@@ -172,7 +172,7 @@ class Inside_Analytics_Model_PageView extends Mage_Core_Model_Abstract {
|
|
172 |
}
|
173 |
break;
|
174 |
case Inside_Analytics_Model_System_Config_Source_Page_Type::ARTICLE:
|
175 |
-
$extra['name'] = Mage::
|
176 |
break;
|
177 |
|
178 |
}
|
172 |
}
|
173 |
break;
|
174 |
case Inside_Analytics_Model_System_Config_Source_Page_Type::ARTICLE:
|
175 |
+
$extra['name'] = Mage::helper('inside')->getPageTitle();
|
176 |
break;
|
177 |
|
178 |
}
|
app/code/community/Inside/Analytics/Model/PageView/Type.php
CHANGED
@@ -122,7 +122,7 @@ class Inside_Analytics_Model_PageView_Type extends Mage_Core_Model_Abstract {
|
|
122 |
}
|
123 |
|
124 |
/**
|
125 |
-
* Get page name based on it's type
|
126 |
*
|
127 |
* @param string $type
|
128 |
* @return string
|
@@ -130,8 +130,6 @@ class Inside_Analytics_Model_PageView_Type extends Mage_Core_Model_Abstract {
|
|
130 |
public function getPageName($type)
|
131 |
{
|
132 |
Mage::helper('inside')->log('ENTERING: '.__METHOD__, true);
|
133 |
-
|
134 |
-
$name = 'Unknown/Untracked Page Type';
|
135 |
switch ($type) {
|
136 |
case Inside_Analytics_Model_System_Config_Source_Page_Type::HOMEPAGE:
|
137 |
$name = 'Home Page'; break;
|
@@ -157,9 +155,8 @@ class Inside_Analytics_Model_PageView_Type extends Mage_Core_Model_Abstract {
|
|
157 |
$name = 'Page Not Found (404)'; break;
|
158 |
case Inside_Analytics_Model_System_Config_Source_Page_Type::OTHER:
|
159 |
default:
|
160 |
-
$name = '
|
161 |
}
|
162 |
-
|
163 |
return $name;
|
164 |
}
|
165 |
}
|
122 |
}
|
123 |
|
124 |
/**
|
125 |
+
* Get page name based on it's type; defaults to page title
|
126 |
*
|
127 |
* @param string $type
|
128 |
* @return string
|
130 |
public function getPageName($type)
|
131 |
{
|
132 |
Mage::helper('inside')->log('ENTERING: '.__METHOD__, true);
|
|
|
|
|
133 |
switch ($type) {
|
134 |
case Inside_Analytics_Model_System_Config_Source_Page_Type::HOMEPAGE:
|
135 |
$name = 'Home Page'; break;
|
155 |
$name = 'Page Not Found (404)'; break;
|
156 |
case Inside_Analytics_Model_System_Config_Source_Page_Type::OTHER:
|
157 |
default:
|
158 |
+
$name = Mage::helper('inside')->getPageTitle(); break;
|
159 |
}
|
|
|
160 |
return $name;
|
161 |
}
|
162 |
}
|
app/code/community/Inside/Analytics/etc/cache.xml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<placeholders>
|
4 |
+
<inside_analytics_cache>
|
5 |
+
<block>inside/analytics</block>
|
6 |
+
<name>inside_analytics</name>
|
7 |
+
<placeholder>INSIDE_ANALYTICS</placeholder>
|
8 |
+
<container>Inside_Analytics_Model_Container_Analytics</container>
|
9 |
+
<cache_lifetime>0</cache_lifetime>
|
10 |
+
</inside_analytics_cache>
|
11 |
+
</placeholders>
|
12 |
+
</config>
|
app/code/community/Inside/Analytics/etc/config.xml
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
<config>
|
12 |
<modules>
|
13 |
<Inside_Analytics>
|
14 |
-
<version>2.
|
15 |
</Inside_Analytics>
|
16 |
</modules>
|
17 |
<global>
|
11 |
<config>
|
12 |
<modules>
|
13 |
<Inside_Analytics>
|
14 |
+
<version>2.4.0</version>
|
15 |
</Inside_Analytics>
|
16 |
</modules>
|
17 |
<global>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Inside_Analytics</name>
|
4 |
-
<version>2.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.inside.tm/servicecontract">Inside Service Contract</license>
|
7 |
<channel>community</channel>
|
@@ -31,18 +31,15 @@ Call us for an online presentation:<br />
|
|
31 |
USA Call Hadar on 310.661.0308 9AM - 6PM PST <br />
|
32 |
AUS Call Michael on 03 8637 1534 9AM - 5PM EST </description>
|
33 |
<notes>New Features
|
34 |
-
-
|
35 |
-
- support for ajax add to cart
|
36 |
-
- category name from page title option
|
37 |
-
- advanced debug
|
38 |

|
39 |
Fixed
|
40 |
-
-
|
41 |
-
|
42 |
<authors><author><name>Hadar Paz</name><user>MAG001834167</user><email>hadar.paz@inside.tm</email></author></authors>
|
43 |
-
<date>2014-
|
44 |
-
<time>
|
45 |
-
<contents><target name="magecommunity"><dir name="Inside"><dir name="Analytics"><dir name="Block"><dir name="Adminhtml"><dir name="Route"><dir name="Edit"><file name="Form.php" hash="1d33f13c65cd268aa609904a598a4a43"/><dir name="Tab"><file name="General.php" hash="3fb90a753247c42454d942b9c7c12b6a"/></dir><file name="Tabs.php" hash="aeb4125bde86d7d07a1b263e9a776274"/></dir><file name="Edit.php" hash="b250cc9a5b7252d3c8b78fac93bee273"/><file name="Grid.php" hash="6819b33d1e77a64724d3d0d0b61fe894"/></dir><file name="Route.php" hash="1116daacd2d91c25c1b11c238482e9ae"/><dir name="System"><dir name="Config"><dir name="Form"><dir name="Button"><file name="Clearlog.php" hash="2b15b253af80856c7e0f6b18229edb44"/><file name="Showlog.php" hash="3e44b43ce52b5d22806df05ef41fb59a"/></dir></dir></dir></dir></dir><file name="Analytics.php" hash="
|
46 |
<compatible/>
|
47 |
<dependencies><required><php><min>5.2.13</min><max>6.0.0</max></php></required></dependencies>
|
48 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Inside_Analytics</name>
|
4 |
+
<version>2.4.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.inside.tm/servicecontract">Inside Service Contract</license>
|
7 |
<channel>community</channel>
|
31 |
USA Call Hadar on 310.661.0308 9AM - 6PM PST <br />
|
32 |
AUS Call Michael on 03 8637 1534 9AM - 5PM EST </description>
|
33 |
<notes>New Features
|
34 |
+
- page name defaults to meta title
|
|
|
|
|
|
|
35 |

|
36 |
Fixed
|
37 |
+
- disabled full page caching of block output
|
38 |
+
</notes>
|
39 |
<authors><author><name>Hadar Paz</name><user>MAG001834167</user><email>hadar.paz@inside.tm</email></author></authors>
|
40 |
+
<date>2014-08-26</date>
|
41 |
+
<time>05:44:34</time>
|
42 |
+
<contents><target name="magecommunity"><dir name="Inside"><dir name="Analytics"><dir name="Block"><dir name="Adminhtml"><dir name="Route"><dir name="Edit"><file name="Form.php" hash="1d33f13c65cd268aa609904a598a4a43"/><dir name="Tab"><file name="General.php" hash="3fb90a753247c42454d942b9c7c12b6a"/></dir><file name="Tabs.php" hash="aeb4125bde86d7d07a1b263e9a776274"/></dir><file name="Edit.php" hash="b250cc9a5b7252d3c8b78fac93bee273"/><file name="Grid.php" hash="6819b33d1e77a64724d3d0d0b61fe894"/></dir><file name="Route.php" hash="1116daacd2d91c25c1b11c238482e9ae"/><dir name="System"><dir name="Config"><dir name="Form"><dir name="Button"><file name="Clearlog.php" hash="2b15b253af80856c7e0f6b18229edb44"/><file name="Showlog.php" hash="3e44b43ce52b5d22806df05ef41fb59a"/></dir></dir></dir></dir></dir><file name="Analytics.php" hash="ea41cfe5c62f00872df628b0bf928c59"/></dir><dir name="Helper"><file name="Data.php" hash="70799e082496c33f0a60ca72f6ed1117"/></dir><dir name="Model"><dir name="Container"><file name="Analytics.php" hash="4bc1c63b05071065d40d1863b5f1235f"/></dir><dir name="Mysql4"><dir name="Route"><file name="Collection.php" hash="8aceeaea4490909d1536f953ba1e28c1"/></dir><file name="Route.php" hash="ef1d9069d996c6e2886a73941fb44c61"/></dir><file name="Observer.php" hash="ff67935a1c07e0c04cf3127a61872cf3"/><dir name="PageView"><file name="Type.php" hash="f74edfe8d845645d3cb2265517306ccd"/></dir><file name="PageView.php" hash="f24017938b8583b82b3b24d7e70472be"/><file name="Route.php" hash="5d5adf4663faa265967e5ae40264b7a1"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Abstract.php" hash="ffd23e007fa3f9fea473c9183bf58bc7"/><dir name="Page"><file name="Type.php" hash="4991eba0607d35132c16b0c7deec0ec0"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="DebugController.php" hash="50754bcbce36b1edc99e15445b7f06bc"/><file name="RouteController.php" hash="333445550bd1f8eedf1fc3e7321e1b0d"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="11fbacf4dd6153fdff62b160f3a3cf17"/><file name="cache.xml" hash="b87e8e77bcb7ff06ea305dc371f95719"/><file name="config.xml" hash="70930115decc8ec27df1bc027190e58b"/><file name="system.xml" hash="f47fc8cbf0e91ef1cd2f8478a15b20ba"/></dir><dir name="sql"><dir name="inside_setup"><file name="mysql4-upgrade-1.1.2-2.0.0.php" hash="e123452c8d68d8961663fe6508ca580c"/><file name="mysql4-upgrade-2.0.0-2.1.0.php" hash="59426151530545b4efc807fe22002a18"/><file name="mysql4-upgrade-2.1.0-2.2.0.php" hash="4543cc4128ef9345923e9ac71c05621d"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="inside"><file name="analytics.xml" hash="76a3e04439048e976f23cf7330851ddd"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="inside"><file name="analytics.xml" hash="5d64993f4dec32725664d4ac1073b431"/></dir></dir><dir name="template"><dir name="inside"><file name="analytics.phtml" hash="b276904d6404e5ff773ac4523ea1b729"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Inside_Analytics.xml" hash="4a6e86a99302b7ddecadffb844c4c3a8"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="inside"><file name="route.js" hash="0067644797c73ca5be7c052fdcfaa78d"/></dir></dir></dir></dir></target></contents>
|
43 |
<compatible/>
|
44 |
<dependencies><required><php><min>5.2.13</min><max>6.0.0</max></php></required></dependencies>
|
45 |
</package>
|