Version Notes
First preview release
Download this release
Release Info
Developer | Lewis Theobald |
Extension | IntileryAnalytics |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
- app/.DS_Store +0 -0
- app/._.DS_Store +0 -0
- app/code/local/Intilery/Analytics/Helper/Data.php +8 -8
- app/code/local/Intilery/Analytics/Model/Observer.php +24 -8
- app/code/local/Intilery/Analytics/etc/adminhtml.xml +40 -40
- app/code/local/Intilery/Analytics/etc/config.xml +11 -1
- app/code/local/Intilery/Analytics/etc/system.xml +55 -55
- app/design/.DS_Store +0 -0
- app/design/._.DS_Store +0 -0
- app/design/frontend/.DS_Store +0 -0
- app/design/frontend/._.DS_Store +0 -0
- app/design/frontend/base/.DS_Store +0 -0
- app/design/frontend/base/._.DS_Store +0 -0
- app/design/frontend/base/default/.DS_Store +0 -0
- app/design/frontend/base/default/._.DS_Store +0 -0
- app/design/frontend/base/default/layout/intileryanalytics.xml +7 -7
- app/design/frontend/base/default/template/.DS_Store +0 -0
- app/design/frontend/base/default/template/._.DS_Store +0 -0
- app/design/frontend/base/default/template/intilery/footer.phtml +40 -23
- package.xml +4 -4
app/.DS_Store
ADDED
Binary file
|
app/._.DS_Store
ADDED
Binary file
|
app/code/local/Intilery/Analytics/Helper/Data.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Intilery_Analytics_Helper_Data extends Mage_Core_Helper_Abstract {
|
4 |
-
public function getSomeData() {
|
5 |
-
|
6 |
-
}
|
7 |
-
}
|
8 |
-
|
9 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Intilery_Analytics_Helper_Data extends Mage_Core_Helper_Abstract {
|
4 |
+
public function getSomeData() {
|
5 |
+
|
6 |
+
}
|
7 |
+
}
|
8 |
+
|
9 |
?>
|
app/code/local/Intilery/Analytics/Model/Observer.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
class Intilery_Analytics_Model_Observer {
|
4 |
|
5 |
public function logProductView(Varien_Event_Observer $observer) {
|
6 |
-
|
7 |
# Set intilery action
|
8 |
Mage::getSingleton('core/session')->setData('intileryTagType', 'ProductView');
|
9 |
|
@@ -19,28 +19,44 @@ class Intilery_Analytics_Model_Observer {
|
|
19 |
|
20 |
# Load category model
|
21 |
$_category = Mage::getModel('catalog/category');
|
22 |
-
|
23 |
|
24 |
-
|
25 |
$categories[] = $_category->getName();
|
26 |
|
27 |
# Clear up
|
28 |
unset($_category);
|
29 |
|
30 |
}
|
31 |
-
|
32 |
# Store in the session
|
33 |
Mage::getSingleton('core/session')->setData('productViewData', array(
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
'sku' => $product->getSku(),
|
38 |
-
'image' => $product->
|
39 |
'description' => $product->getDescription(),
|
40 |
'category' => implode(', ', $categories),
|
41 |
'categoryIds' => $product->getCategoryIds()
|
42 |
)
|
43 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
}
|
46 |
|
3 |
class Intilery_Analytics_Model_Observer {
|
4 |
|
5 |
public function logProductView(Varien_Event_Observer $observer) {
|
6 |
+
|
7 |
# Set intilery action
|
8 |
Mage::getSingleton('core/session')->setData('intileryTagType', 'ProductView');
|
9 |
|
19 |
|
20 |
# Load category model
|
21 |
$_category = Mage::getModel('catalog/category');
|
22 |
+
$_category->load($categoryID);
|
23 |
|
24 |
+
# Get the category name
|
25 |
$categories[] = $_category->getName();
|
26 |
|
27 |
# Clear up
|
28 |
unset($_category);
|
29 |
|
30 |
}
|
31 |
+
|
32 |
# Store in the session
|
33 |
Mage::getSingleton('core/session')->setData('productViewData', array(
|
34 |
+
'id' => $product->getId(),
|
35 |
+
'name' => $product->getName(),
|
36 |
+
'price' => $product->getPrice(),
|
37 |
'sku' => $product->getSku(),
|
38 |
+
'image' => $product->getMediaConfig()->getMediaUrl($product->getData('image')),
|
39 |
'description' => $product->getDescription(),
|
40 |
'category' => implode(', ', $categories),
|
41 |
'categoryIds' => $product->getCategoryIds()
|
42 |
)
|
43 |
);
|
44 |
+
|
45 |
+
}
|
46 |
+
|
47 |
+
public function logCategoryView(Varien_Event_Observer $observer) {
|
48 |
+
|
49 |
+
# Set intilery action
|
50 |
+
Mage::getSingleton('core/session')->setData('intileryTagType', 'CategoryView');
|
51 |
+
|
52 |
+
# Get the product
|
53 |
+
$category = $observer->getCategory();
|
54 |
+
|
55 |
+
# Store in the session
|
56 |
+
Mage::getSingleton('core/session')->setData('categoryViewData', array(
|
57 |
+
'name' => $category->getName()
|
58 |
+
)
|
59 |
+
);
|
60 |
|
61 |
}
|
62 |
|
app/code/local/Intilery/Analytics/etc/adminhtml.xml
CHANGED
@@ -1,41 +1,41 @@
|
|
1 |
-
<?xml version="1.0" encoding="utf-8"?>
|
2 |
-
<config>
|
3 |
-
<!-- <menu>
|
4 |
-
<intilery module="analytics_admincontroller" translate="title">
|
5 |
-
<title>Intilery Analytics</title>
|
6 |
-
<sort_order>100</sort_order>
|
7 |
-
<children>
|
8 |
-
<index module="analytics_admincontroller" translate="title">
|
9 |
-
<title>Tracking Code</title>
|
10 |
-
<sort_order>1</sort_order>
|
11 |
-
<action>adminhtml/intilery</action>
|
12 |
-
</index>
|
13 |
-
<list module="analytics_admincontroller" translate="title">
|
14 |
-
<title>List Action</title>
|
15 |
-
<sort_order>2</sort_order>
|
16 |
-
<action>adminhtml/intilery/list</action>
|
17 |
-
</list>
|
18 |
-
</children>
|
19 |
-
</intilery>
|
20 |
-
</menu> -->
|
21 |
-
<acl>
|
22 |
-
<resources>
|
23 |
-
<admin>
|
24 |
-
<children>
|
25 |
-
<system>
|
26 |
-
<children>
|
27 |
-
<config>
|
28 |
-
<children>
|
29 |
-
<intilery translate="title" module="analytics">
|
30 |
-
<title>Tracking Code Section</title>
|
31 |
-
<sort_order>100</sort_order>
|
32 |
-
</intilery>
|
33 |
-
</children>
|
34 |
-
</config>
|
35 |
-
</children>
|
36 |
-
</system>
|
37 |
-
</children>
|
38 |
-
</admin>
|
39 |
-
</resources>
|
40 |
-
</acl>
|
41 |
</config>
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<config>
|
3 |
+
<!-- <menu>
|
4 |
+
<intilery module="analytics_admincontroller" translate="title">
|
5 |
+
<title>Intilery Analytics</title>
|
6 |
+
<sort_order>100</sort_order>
|
7 |
+
<children>
|
8 |
+
<index module="analytics_admincontroller" translate="title">
|
9 |
+
<title>Tracking Code</title>
|
10 |
+
<sort_order>1</sort_order>
|
11 |
+
<action>adminhtml/intilery</action>
|
12 |
+
</index>
|
13 |
+
<list module="analytics_admincontroller" translate="title">
|
14 |
+
<title>List Action</title>
|
15 |
+
<sort_order>2</sort_order>
|
16 |
+
<action>adminhtml/intilery/list</action>
|
17 |
+
</list>
|
18 |
+
</children>
|
19 |
+
</intilery>
|
20 |
+
</menu> -->
|
21 |
+
<acl>
|
22 |
+
<resources>
|
23 |
+
<admin>
|
24 |
+
<children>
|
25 |
+
<system>
|
26 |
+
<children>
|
27 |
+
<config>
|
28 |
+
<children>
|
29 |
+
<intilery translate="title" module="analytics">
|
30 |
+
<title>Tracking Code Section</title>
|
31 |
+
<sort_order>100</sort_order>
|
32 |
+
</intilery>
|
33 |
+
</children>
|
34 |
+
</config>
|
35 |
+
</children>
|
36 |
+
</system>
|
37 |
+
</children>
|
38 |
+
</admin>
|
39 |
+
</resources>
|
40 |
+
</acl>
|
41 |
</config>
|
app/code/local/Intilery/Analytics/etc/config.xml
CHANGED
@@ -105,7 +105,7 @@
|
|
105 |
</observers>
|
106 |
</customer_register_success>
|
107 |
|
108 |
-
|
109 |
<observers>
|
110 |
<analytics_search>
|
111 |
<class>analytics/observer</class>
|
@@ -114,6 +114,16 @@
|
|
114 |
</analytics_search>
|
115 |
</observers>
|
116 |
</catalogsearch_query_load_after>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
|
118 |
<catalog_controller_product_view>
|
119 |
<observers>
|
105 |
</observers>
|
106 |
</customer_register_success>
|
107 |
|
108 |
+
<catalogsearch_query_load_after>
|
109 |
<observers>
|
110 |
<analytics_search>
|
111 |
<class>analytics/observer</class>
|
114 |
</analytics_search>
|
115 |
</observers>
|
116 |
</catalogsearch_query_load_after>
|
117 |
+
|
118 |
+
<catalog_controller_category_init_after>
|
119 |
+
<observers>
|
120 |
+
<analytics_search>
|
121 |
+
<class>analytics/observer</class>
|
122 |
+
<method>logCategoryView</method>
|
123 |
+
<type>singleton</type>
|
124 |
+
</analytics_search>
|
125 |
+
</observers>
|
126 |
+
</catalog_controller_category_init_after>
|
127 |
|
128 |
<catalog_controller_product_view>
|
129 |
<observers>
|
app/code/local/Intilery/Analytics/etc/system.xml
CHANGED
@@ -1,56 +1,56 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<tabs>
|
4 |
-
<intilery translate="label" module="analytics">
|
5 |
-
<label>Intilery Analytics</label>
|
6 |
-
<sort_order>100</sort_order>
|
7 |
-
</intilery>
|
8 |
-
</tabs>
|
9 |
-
|
10 |
-
<sections>
|
11 |
-
<intilery translate="label" module="analytics">
|
12 |
-
<label>Tracking Code</label>
|
13 |
-
<tab>intilery</tab>
|
14 |
-
<frontend_type>text</frontend_type>
|
15 |
-
<sort_order>100</sort_order>
|
16 |
-
<show_in_default>1</show_in_default>
|
17 |
-
<show_in_website>1</show_in_website>
|
18 |
-
<show_in_store>1</show_in_store>
|
19 |
-
|
20 |
-
<groups>
|
21 |
-
<tracking translate="label" module="analytics">
|
22 |
-
<label>Tracking Code</label>
|
23 |
-
<frontend_type>text</frontend_type>
|
24 |
-
<expanded>1</expanded>
|
25 |
-
<sort_order>1000</sort_order>
|
26 |
-
<show_in_default>1</show_in_default>
|
27 |
-
<show_in_website>1</show_in_website>
|
28 |
-
<show_in_store>1</show_in_store>
|
29 |
-
<fields>
|
30 |
-
<code translate="label">
|
31 |
-
<label>Account Code:</label>
|
32 |
-
<comment>Please enter your account code, you can find this under your settings.</comment>
|
33 |
-
<frontend_type>text</frontend_type>
|
34 |
-
<sort_order>20</sort_order>
|
35 |
-
<show_in_default>1</show_in_default>
|
36 |
-
<show_in_website>1</show_in_website>
|
37 |
-
<show_in_store>1</show_in_store>
|
38 |
-
</code>
|
39 |
-
|
40 |
-
<!-- New fields go here -->
|
41 |
-
<active translate="label comment">
|
42 |
-
<label>Enabled:</label>
|
43 |
-
<comment>Select whether or not Intilery tracking is enabled.</comment>
|
44 |
-
<frontend_type>select</frontend_type>
|
45 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
46 |
-
<sort_order>10</sort_order>
|
47 |
-
<show_in_default>1</show_in_default>
|
48 |
-
<show_in_website>1</show_in_website>
|
49 |
-
<show_in_store>1</show_in_store>
|
50 |
-
</active>
|
51 |
-
</fields>
|
52 |
-
</tracking>
|
53 |
-
</groups>
|
54 |
-
</intilery>
|
55 |
-
</sections>
|
56 |
</config>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<intilery translate="label" module="analytics">
|
5 |
+
<label>Intilery Analytics</label>
|
6 |
+
<sort_order>100</sort_order>
|
7 |
+
</intilery>
|
8 |
+
</tabs>
|
9 |
+
|
10 |
+
<sections>
|
11 |
+
<intilery translate="label" module="analytics">
|
12 |
+
<label>Tracking Code</label>
|
13 |
+
<tab>intilery</tab>
|
14 |
+
<frontend_type>text</frontend_type>
|
15 |
+
<sort_order>100</sort_order>
|
16 |
+
<show_in_default>1</show_in_default>
|
17 |
+
<show_in_website>1</show_in_website>
|
18 |
+
<show_in_store>1</show_in_store>
|
19 |
+
|
20 |
+
<groups>
|
21 |
+
<tracking translate="label" module="analytics">
|
22 |
+
<label>Tracking Code</label>
|
23 |
+
<frontend_type>text</frontend_type>
|
24 |
+
<expanded>1</expanded>
|
25 |
+
<sort_order>1000</sort_order>
|
26 |
+
<show_in_default>1</show_in_default>
|
27 |
+
<show_in_website>1</show_in_website>
|
28 |
+
<show_in_store>1</show_in_store>
|
29 |
+
<fields>
|
30 |
+
<code translate="label">
|
31 |
+
<label>Account Code:</label>
|
32 |
+
<comment>Please enter your account code, you can find this under your settings.</comment>
|
33 |
+
<frontend_type>text</frontend_type>
|
34 |
+
<sort_order>20</sort_order>
|
35 |
+
<show_in_default>1</show_in_default>
|
36 |
+
<show_in_website>1</show_in_website>
|
37 |
+
<show_in_store>1</show_in_store>
|
38 |
+
</code>
|
39 |
+
|
40 |
+
<!-- New fields go here -->
|
41 |
+
<active translate="label comment">
|
42 |
+
<label>Enabled:</label>
|
43 |
+
<comment>Select whether or not Intilery tracking is enabled.</comment>
|
44 |
+
<frontend_type>select</frontend_type>
|
45 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
46 |
+
<sort_order>10</sort_order>
|
47 |
+
<show_in_default>1</show_in_default>
|
48 |
+
<show_in_website>1</show_in_website>
|
49 |
+
<show_in_store>1</show_in_store>
|
50 |
+
</active>
|
51 |
+
</fields>
|
52 |
+
</tracking>
|
53 |
+
</groups>
|
54 |
+
</intilery>
|
55 |
+
</sections>
|
56 |
</config>
|
app/design/.DS_Store
ADDED
Binary file
|
app/design/._.DS_Store
ADDED
Binary file
|
app/design/frontend/.DS_Store
ADDED
Binary file
|
app/design/frontend/._.DS_Store
ADDED
Binary file
|
app/design/frontend/base/.DS_Store
ADDED
Binary file
|
app/design/frontend/base/._.DS_Store
ADDED
Binary file
|
app/design/frontend/base/default/.DS_Store
ADDED
Binary file
|
app/design/frontend/base/default/._.DS_Store
ADDED
Binary file
|
app/design/frontend/base/default/layout/intileryanalytics.xml
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
<?xml version="1.0" encoding="utf-8"?>
|
2 |
-
<layout version="0.1.0">
|
3 |
-
<default>
|
4 |
-
<reference name="footer">
|
5 |
-
<block type="core/template" name="Intilery_Analytics_footer" template="intilery/footer.phtml" />
|
6 |
-
</reference>
|
7 |
-
</default>
|
8 |
</layout>
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
+
<reference name="footer">
|
5 |
+
<block type="core/template" name="Intilery_Analytics_footer" template="intilery/footer.phtml" />
|
6 |
+
</reference>
|
7 |
+
</default>
|
8 |
</layout>
|
app/design/frontend/base/default/template/.DS_Store
ADDED
Binary file
|
app/design/frontend/base/default/template/._.DS_Store
ADDED
Binary file
|
app/design/frontend/base/default/template/intilery/footer.phtml
CHANGED
@@ -34,7 +34,7 @@ _itq.push(["_setAccount", "'.$intileryConfig['code'].'"]);
|
|
34 |
if(!is_null($customerRegisterData) && !empty($customerRegisterData)) {
|
35 |
|
36 |
echo "<script>
|
37 |
-
var
|
38 |
_itq.push(['_trackUserEvent','register account',
|
39 |
[
|
40 |
{name:'Customer.Email', value:'{$customerRegisterData['email']}'},
|
@@ -61,7 +61,7 @@ _itq.push(["_setAccount", "'.$intileryConfig['code'].'"]);
|
|
61 |
if(!is_null($customerLoginData) && !empty($customerLoginData)) {
|
62 |
|
63 |
echo "<script>
|
64 |
-
var
|
65 |
_itq.push(['_trackUserEvent', 'sign in', [{name:'Customer.Email', value:'{$customerLoginData['email']}'}]]);
|
66 |
</script>";
|
67 |
|
@@ -71,7 +71,7 @@ _itq.push(["_setAccount", "'.$intileryConfig['code'].'"]);
|
|
71 |
} elseif($intileryTagType == 'CustomerLogout') {
|
72 |
|
73 |
echo "<script>
|
74 |
-
var
|
75 |
_itq.push(['_trackUserEvent', 'sign out', []]);
|
76 |
</script>";
|
77 |
|
@@ -85,13 +85,13 @@ _itq.push(["_setAccount", "'.$intileryConfig['code'].'"]);
|
|
85 |
if(!is_null($productAddedToCart) && !empty($productAddedToCart)) {
|
86 |
|
87 |
echo "<script>
|
88 |
-
var
|
89 |
-
_itq.push(['_trackUserEvent', 'add
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
], 'Add
|
95 |
</script>";
|
96 |
|
97 |
}
|
@@ -105,10 +105,10 @@ _itq.push(["_setAccount", "'.$intileryConfig['code'].'"]);
|
|
105 |
if(!is_null($productRemovedFromCart) && !empty($productRemovedFromCart)) {
|
106 |
|
107 |
echo "<script>
|
108 |
-
var
|
109 |
-
_itq.push(['_trackUserEvent', 'remove
|
110 |
-
|
111 |
-
], 'Remove
|
112 |
</script>";
|
113 |
|
114 |
}
|
@@ -122,12 +122,12 @@ _itq.push(["_setAccount", "'.$intileryConfig['code'].'"]);
|
|
122 |
if(!is_null($productUpdatedInCart) && !empty($productUpdatedInCart)) {
|
123 |
|
124 |
echo "<script>
|
125 |
-
var
|
126 |
-
_itq.push(['_trackUserEvent', 'update
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
], 'Update
|
131 |
</script>";
|
132 |
|
133 |
}
|
@@ -141,7 +141,7 @@ _itq.push(["_setAccount", "'.$intileryConfig['code'].'"]);
|
|
141 |
if(!is_null($searchQueryText) && !empty($searchQueryText)) {
|
142 |
|
143 |
echo "<script>
|
144 |
-
var
|
145 |
_itq.push(['_trackUserEvent', 'Search', [{name:'Search.Term',value:\"{$searchQueryText}\"}]]);
|
146 |
</script>";
|
147 |
|
@@ -156,18 +156,35 @@ _itq.push(["_setAccount", "'.$intileryConfig['code'].'"]);
|
|
156 |
if(!is_null($productViewData) && !empty($productViewData)) {
|
157 |
|
158 |
echo "<script>
|
159 |
-
var
|
160 |
_itq.push(['_trackUserEvent', 'view product', [
|
161 |
{name:'Product.Name', value: \"{$productViewData['name']}\"},
|
162 |
{name:'Product.Price', value: '{$productViewData['price']}'},
|
163 |
{name:'Product.Description', value: \"{$productViewData['description']}\"},
|
164 |
{name:'Product.Image', value: '{$productViewData['image']}'},
|
165 |
{name:'Product.Category', value: \"{$productViewData['category']}\"}
|
166 |
-
]]);
|
167 |
</script>";
|
168 |
|
169 |
}
|
170 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
}
|
172 |
|
173 |
}
|
34 |
if(!is_null($customerRegisterData) && !empty($customerRegisterData)) {
|
35 |
|
36 |
echo "<script>
|
37 |
+
var _itq = _itq || [];
|
38 |
_itq.push(['_trackUserEvent','register account',
|
39 |
[
|
40 |
{name:'Customer.Email', value:'{$customerRegisterData['email']}'},
|
61 |
if(!is_null($customerLoginData) && !empty($customerLoginData)) {
|
62 |
|
63 |
echo "<script>
|
64 |
+
var _itq = _itq || [];
|
65 |
_itq.push(['_trackUserEvent', 'sign in', [{name:'Customer.Email', value:'{$customerLoginData['email']}'}]]);
|
66 |
</script>";
|
67 |
|
71 |
} elseif($intileryTagType == 'CustomerLogout') {
|
72 |
|
73 |
echo "<script>
|
74 |
+
var _itq = _itq || [];
|
75 |
_itq.push(['_trackUserEvent', 'sign out', []]);
|
76 |
</script>";
|
77 |
|
85 |
if(!is_null($productAddedToCart) && !empty($productAddedToCart)) {
|
86 |
|
87 |
echo "<script>
|
88 |
+
var _itq = _itq || [];
|
89 |
+
_itq.push(['_trackUserEvent', 'add to basket', [
|
90 |
+
{name:'Add To Basket.SKU', value:'{$productAddedToCart['sku']}'},
|
91 |
+
{name:'Add To Basket.Quantity', value:'{$productAddedToCart['quantity']}'},
|
92 |
+
{name:'Add To Basket.Price', value:'{$productAddedToCart['price']}'},
|
93 |
+
{name:'Product.Name', value:\"{$productAddedToCart['name']}\"}
|
94 |
+
], 'Add To Basket']);
|
95 |
</script>";
|
96 |
|
97 |
}
|
105 |
if(!is_null($productRemovedFromCart) && !empty($productRemovedFromCart)) {
|
106 |
|
107 |
echo "<script>
|
108 |
+
var _itq = _itq || [];
|
109 |
+
_itq.push(['_trackUserEvent', 'remove from basket', [
|
110 |
+
{name:'Product.Name',value:\"{$productRemovedFromCart['name']}\"}
|
111 |
+
], 'Remove From Basket']);
|
112 |
</script>";
|
113 |
|
114 |
}
|
122 |
if(!is_null($productUpdatedInCart) && !empty($productUpdatedInCart)) {
|
123 |
|
124 |
echo "<script>
|
125 |
+
var _itq = _itq || [];
|
126 |
+
_itq.push(['_trackUserEvent', 'update basket', [
|
127 |
+
{name:'Update Basket.Quantity', value:'{$productUpdatedInCart['quantity']}'},
|
128 |
+
{name:'Update Basket.Price', value:'{$productUpdatedInCart['price']}'},
|
129 |
+
{name:'Product.Name', value:\"{$productUpdatedInCart['name']}\"}
|
130 |
+
], 'Update Basket']);
|
131 |
</script>";
|
132 |
|
133 |
}
|
141 |
if(!is_null($searchQueryText) && !empty($searchQueryText)) {
|
142 |
|
143 |
echo "<script>
|
144 |
+
var _itq = _itq || [];
|
145 |
_itq.push(['_trackUserEvent', 'Search', [{name:'Search.Term',value:\"{$searchQueryText}\"}]]);
|
146 |
</script>";
|
147 |
|
156 |
if(!is_null($productViewData) && !empty($productViewData)) {
|
157 |
|
158 |
echo "<script>
|
159 |
+
var _itq = _itq || [];
|
160 |
_itq.push(['_trackUserEvent', 'view product', [
|
161 |
{name:'Product.Name', value: \"{$productViewData['name']}\"},
|
162 |
{name:'Product.Price', value: '{$productViewData['price']}'},
|
163 |
{name:'Product.Description', value: \"{$productViewData['description']}\"},
|
164 |
{name:'Product.Image', value: '{$productViewData['image']}'},
|
165 |
{name:'Product.Category', value: \"{$productViewData['category']}\"}
|
166 |
+
], 'View Product']);
|
167 |
</script>";
|
168 |
|
169 |
}
|
170 |
|
171 |
+
} elseif($intileryTagType == 'CategoryView') {
|
172 |
+
|
173 |
+
# Get the product data
|
174 |
+
$categoryViewData= Mage::getSingleton('core/session')->getData('categoryViewData', true);
|
175 |
+
|
176 |
+
# Did we add to cart?
|
177 |
+
if(!is_null($categoryViewData) && !empty($categoryViewData)) {
|
178 |
+
|
179 |
+
echo "<script>
|
180 |
+
var _itq = _itq || [];
|
181 |
+
_itq.push(['_trackUserEvent', 'view category', [
|
182 |
+
{name:'Category.Name', value: \"{$categoryViewData['name']}\"}
|
183 |
+
], 'View Category']);
|
184 |
+
</script>";
|
185 |
+
|
186 |
+
}
|
187 |
+
|
188 |
}
|
189 |
|
190 |
}
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>IntileryAnalytics</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license>GNU General Public License (GPL)</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Allows the user to connect their Magento installation with their Intilery tracking dashboard.</description>
|
11 |
<notes>First preview release</notes>
|
12 |
<authors><author><name>Lewis Theobald</name><user>LewisTheobald</user><email>lewis@aljtmedia.com</email></author></authors>
|
13 |
-
<date>2014-02-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="intilery"><file name="footer.phtml" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>IntileryAnalytics</name>
|
4 |
+
<version>1.0.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>GNU General Public License (GPL)</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Allows the user to connect their Magento installation with their Intilery tracking dashboard.</description>
|
11 |
<notes>First preview release</notes>
|
12 |
<authors><author><name>Lewis Theobald</name><user>LewisTheobald</user><email>lewis@aljtmedia.com</email></author></authors>
|
13 |
+
<date>2014-02-27</date>
|
14 |
+
<time>17:05:15</time>
|
15 |
+
<contents><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="intilery"><file name="footer.phtml" hash="56156ecc00b3a43e2da8f416d40e36ca"/></dir></dir><dir name="layout"><file name="intileryanalytics.xml" hash="6f8d7b5aed8d4fa54ab6f4b9cb2a453d"/></dir></dir></dir></dir></target><target name="magelocal"><dir name="Intilery"><dir name="Analytics"><dir name="Helper"><file name="Data.php" hash="7875f3486d0bb7edbccc8ef2d41ee006"/></dir><dir name="Model"><file name="Observer.php" hash="fb9cb912eeaa9dca3c243eca7728e835"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a6eb6b0d6eaca7f0c086f5dd0ff8d85e"/><file name="config.xml" hash="c4cb5f38b309ae1cc54692ca5944e603"/><file name="system.xml" hash="c33bbe5c89fb09e0ac6665ef63e705b6"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Intilery_Analytics.xml" hash="943756b51b7a8bab8175c9132a7473c8"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|