Version Notes
Initial release.
Download this release
Release Info
Developer | Eke Digital |
Extension | Eke_Mouseflow |
Version | 0.1.0 |
Comparing to | |
See all releases |
Version 0.1.0
- app/code/community/Eke/Mouseflow/Block/Adminhtml/About.php +23 -0
- app/code/community/Eke/Mouseflow/Helper/Data.php +14 -0
- app/code/community/Eke/Mouseflow/etc/adminhtml.xml +23 -0
- app/code/community/Eke/Mouseflow/etc/config.xml +45 -0
- app/code/community/Eke/Mouseflow/etc/system.xml +55 -0
- app/design/frontend/base/default/layout/eke_mouseflow.xml +8 -0
- app/design/frontend/base/default/template/eke/mouseflow/tracker.phtml +45 -0
- app/etc/modules/Eke_Mouseflow.xml +9 -0
- package.xml +18 -0
app/code/community/Eke/Mouseflow/Block/Adminhtml/About.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Eke_Mouseflow_Block_Adminhtml_About
|
4 |
+
extends Mage_Adminhtml_Block_Abstract
|
5 |
+
implements Varien_Data_Form_Element_Renderer_Interface
|
6 |
+
{
|
7 |
+
|
8 |
+
|
9 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
10 |
+
{
|
11 |
+
$logo = "//www.ekedigital.com/assets/eke_logo_modules.png";
|
12 |
+
$html = <<<HTML
|
13 |
+
|
14 |
+
<div style="background:url('$logo') no-repeat scroll 15px 15px #e7efef; border:1px solid #ccc; min-height:60px; margin:5px 0; padding:15px 15px 15px 140px;">
|
15 |
+
<p><strong>Mouseflow Integration v0.1.0</strong> by <a href="https://www.ekedigital.com/?utm_source=Magento_Extension&utm_medium=Extension_Settings&utm_campaign=Mouseflow" target="_blank">Eke Digital</a>
|
16 |
+
<br /> Quickly integrate Mouseflow user session recording code snippet.
|
17 |
+
</p>For questions or support requests please email us at <a href="mailto:support@ekedigital.com">support@ekedigital.com</a>.</p>
|
18 |
+
</div>
|
19 |
+
|
20 |
+
HTML;
|
21 |
+
return $html;
|
22 |
+
}
|
23 |
+
}
|
app/code/community/Eke/Mouseflow/Helper/Data.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Eke_Mouseflow_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
+
{
|
4 |
+
public function isTrackerEnabled()
|
5 |
+
{
|
6 |
+
return Mage::getStoreConfig("eke_mouseflow/tracker/enabled");
|
7 |
+
}
|
8 |
+
|
9 |
+
public function getTrackerId()
|
10 |
+
{
|
11 |
+
return Mage::getStoreConfig("eke_mouseflow/tracker/id");
|
12 |
+
}
|
13 |
+
|
14 |
+
}
|
app/code/community/Eke/Mouseflow/etc/adminhtml.xml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<acl>
|
4 |
+
<resources>
|
5 |
+
<admin>
|
6 |
+
<children>
|
7 |
+
<system>
|
8 |
+
<children>
|
9 |
+
<config>
|
10 |
+
<children>
|
11 |
+
<eke_mouseflow>
|
12 |
+
<title>Eke Digital Mouseflow Data</title>
|
13 |
+
<sort_order>990</sort_order>
|
14 |
+
</eke_mouseflow>
|
15 |
+
</children>
|
16 |
+
</config>
|
17 |
+
</children>
|
18 |
+
</system>
|
19 |
+
</children>
|
20 |
+
</admin>
|
21 |
+
</resources>
|
22 |
+
</acl>
|
23 |
+
</config>
|
app/code/community/Eke/Mouseflow/etc/config.xml
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Eke_Mouseflow>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Eke_Mouseflow>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<models>
|
10 |
+
<eke_mouseflow>
|
11 |
+
<class>Eke_Mouseflow_Model</class>
|
12 |
+
<resourceModel>eke_mouseflow_resource</resourceModel>
|
13 |
+
</eke_mouseflow>
|
14 |
+
<eke_mouseflow_resource>
|
15 |
+
<class>Eke_Mouseflow_Model_Resource</class>
|
16 |
+
</eke_mouseflow_resource>
|
17 |
+
</models>
|
18 |
+
<blocks>
|
19 |
+
<eke_mouseflow>
|
20 |
+
<class>Eke_Mouseflow_Block</class>
|
21 |
+
</eke_mouseflow>
|
22 |
+
</blocks>
|
23 |
+
<helpers>
|
24 |
+
<eke_mouseflow>
|
25 |
+
<class>Eke_Mouseflow_Helper</class>
|
26 |
+
</eke_mouseflow>
|
27 |
+
</helpers>
|
28 |
+
</global>
|
29 |
+
<frontend>
|
30 |
+
<layout>
|
31 |
+
<updates>
|
32 |
+
<eke_mouseflow>
|
33 |
+
<file>eke_mouseflow.xml</file>
|
34 |
+
</eke_mouseflow>
|
35 |
+
</updates>
|
36 |
+
</layout>
|
37 |
+
</frontend>
|
38 |
+
<default>
|
39 |
+
<eke_mouseflow>
|
40 |
+
<tracker>
|
41 |
+
<enabled>0</enabled>
|
42 |
+
</tracker>
|
43 |
+
</eke_mouseflow>
|
44 |
+
</default>
|
45 |
+
</config>
|
app/code/community/Eke/Mouseflow/etc/system.xml
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<eke>
|
5 |
+
<label>EKE DIGITAL</label>
|
6 |
+
<sort_order>100</sort_order>
|
7 |
+
</eke>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<eke_mouseflow translate="label">
|
11 |
+
<label>Mouseflow Tracking</label>
|
12 |
+
<tab>eke</tab>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>100</sort_order>
|
15 |
+
<show_in_default>1</show_in_default>
|
16 |
+
<show_in_website>1</show_in_website>
|
17 |
+
<show_in_store>1</show_in_store>
|
18 |
+
<groups>
|
19 |
+
<about>
|
20 |
+
<frontend_model>eke_mouseflow/adminhtml_about</frontend_model>
|
21 |
+
<sort_order>0</sort_order>
|
22 |
+
<show_in_default>1</show_in_default>
|
23 |
+
<show_in_website>1</show_in_website>
|
24 |
+
<show_in_store>1</show_in_store>
|
25 |
+
</about>
|
26 |
+
<tracker translate="label">
|
27 |
+
<label>Configuration</label>
|
28 |
+
<show_in_default>1</show_in_default>
|
29 |
+
<show_in_website>1</show_in_website>
|
30 |
+
<show_in_store>1</show_in_store>
|
31 |
+
<sort_order>1</sort_order>
|
32 |
+
<fields>
|
33 |
+
<enabled translate="label" module="eke_mouseflow">
|
34 |
+
<label>Enable</label>
|
35 |
+
<frontend_type>select</frontend_type>
|
36 |
+
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
37 |
+
<sort_order>10</sort_order>
|
38 |
+
<show_in_default>1</show_in_default>
|
39 |
+
<show_in_website>1</show_in_website>
|
40 |
+
<show_in_store>1</show_in_store>
|
41 |
+
</enabled>
|
42 |
+
<id translate="label">
|
43 |
+
<label>Tracking ID</label>
|
44 |
+
<frontend_type>text</frontend_type>
|
45 |
+
<sort_order>20</sort_order>
|
46 |
+
<show_in_default>1</show_in_default>
|
47 |
+
<show_in_website>1</show_in_website>
|
48 |
+
<show_in_store>1</show_in_store>
|
49 |
+
</id>
|
50 |
+
</fields>
|
51 |
+
</tracker>
|
52 |
+
</groups>
|
53 |
+
</eke_mouseflow>
|
54 |
+
</sections>
|
55 |
+
</config>
|
app/design/frontend/base/default/layout/eke_mouseflow.xml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
+
<reference name="head">
|
5 |
+
<block type="core/template" template="eke/mouseflow/tracker.phtml" />
|
6 |
+
</reference>
|
7 |
+
</default>
|
8 |
+
</layout>
|
app/design/frontend/base/default/template/eke/mouseflow/tracker.phtml
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$helper = Mage::helper("eke_mouseflow");
|
3 |
+
if (!$helper->isTrackerEnabled()) {
|
4 |
+
return;
|
5 |
+
}
|
6 |
+
$id = $helper->getTrackerId();
|
7 |
+
?>
|
8 |
+
|
9 |
+
<script type="text/javascript">
|
10 |
+
var _mfq = _mfq || [];
|
11 |
+
(function() {
|
12 |
+
var mf = document.createElement("script");
|
13 |
+
mf.type = "text/javascript"; mf.async = true;
|
14 |
+
mf.src = "//cdn.mouseflow.com/projects/<?php echo $id; ?>.js";
|
15 |
+
document.getElementsByTagName("head")[0].appendChild(mf);
|
16 |
+
})();
|
17 |
+
|
18 |
+
<?php
|
19 |
+
$request = $this->getRequest();
|
20 |
+
$module = $request->getModuleName();
|
21 |
+
$controller = $request->getControllerName();
|
22 |
+
$action = $request->getActionName();
|
23 |
+
|
24 |
+
if(Mage::registry('current_product')) { echo '_mfq.push(["setVariable", "Page", "Product"]);'; }
|
25 |
+
|
26 |
+
if($controller == 'result' || $controller =='advanced') { echo '_mfq.push(["setVariable", "Page", "Search Result"]);'; }
|
27 |
+
|
28 |
+
if($module == 'customer' && $controller == 'account' && $action == 'index'){ echo '_mfq.push(["setVariable", "User", "Account Registered"]);'; }
|
29 |
+
|
30 |
+
if($module == 'checkout' && $controller == 'cart' && $action == 'index') {echo '_mfq.push(["setVariable", "Cart", "Added Product"]);'; }
|
31 |
+
|
32 |
+
if($module == 'wishlist') { echo '_mfq.push(["setVariable", "Wishlist", "Added"]);'; }
|
33 |
+
|
34 |
+
if($module == 'onestepcheckout' && $action == 'index') { echo '_mfq.push(["setVariable", "Checkout", "Initiate"]);'; }
|
35 |
+
|
36 |
+
if($module == 'checkout' && $action == 'success') { echo '_mfq.push(["setVariable", "Checkout", "Completed"]);'; }
|
37 |
+
|
38 |
+
?>
|
39 |
+
|
40 |
+
|
41 |
+
</script>
|
42 |
+
|
43 |
+
|
44 |
+
|
45 |
+
|
app/etc/modules/Eke_Mouseflow.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Eke_Mouseflow>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Eke_Mouseflow>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Eke_Mouseflow</name>
|
4 |
+
<version>0.1.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Quickly integrate Mouseflow user session recording code snippet.</summary>
|
10 |
+
<description>This module adds the required Mouseflow JavaScript in order for their user session platform to function.</description>
|
11 |
+
<notes>Initial release.</notes>
|
12 |
+
<authors><author><name>Eke Digital</name><user>ekedigital</user><email>dane@ekedigital.com</email></author></authors>
|
13 |
+
<date>2016-10-25</date>
|
14 |
+
<time>19:38:34</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Eke"><dir name="Mouseflow"><dir name="Block"><dir name="Adminhtml"><file name="About.php" hash="eb8826718ca228130d1330b8459ff1ba"/></dir></dir><dir name="Helper"><file name="Data.php" hash="3e0a1c37fe09d48f0cd9da5ee2dc99dd"/></dir><dir name="etc"><file name="adminhtml.xml" hash="4e3953f1308d7a41de71fd4bd3655d9c"/><file name="config.xml" hash="63bb83ffc16a292e372a8d63ecbe9e06"/><file name="system.xml" hash="baef3fc10840bd8fde0e105316905638"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="eke_mouseflow.xml" hash="b40d92dd5c322cc3569acc530c267d43"/></dir><dir name="template"><dir name="eke"><dir name="mouseflow"><file name="tracker.phtml" hash="bd7f10bdf8e08a77999598d5971812c8"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Eke_Mouseflow.xml" hash="17029b4285c13d8c91134a7d3a538547"/></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name>Mage_Core_Helper_Abstract</name><channel>community</channel><min>1.6</min><max>1.9</max></package></required></dependencies>
|
18 |
+
</package>
|