Version Notes
- Enhanced order tracking
Download this release
Release Info
Developer | Roeland van Oostenbrugge |
Extension | Converdo_Analytics |
Version | 1.2.4.8 |
Comparing to | |
See all releases |
Code changes from version 1.2.4.6 to 1.2.4.8
- app/code/community/Converdo/Analytics/etc/config.xml +7 -0
- app/code/community/Converdo/Analytics/etc/system.xml +26 -3
- app/design/frontend/base/default/template/analytics/analytics.phtml +1 -1
- lib/Converdo/Entity/Interface/ProductInterface.php +14 -0
- lib/Converdo/Entity/Product.php +20 -0
- lib/Converdo/Support/QueryParser.php +18 -12
- lib/Converdo/Tracker/Page/AbstractPage.php +31 -0
- lib/Converdo/Tracker/Page/Cart.php +31 -0
- lib/Converdo/Tracker/Page/Category.php +31 -0
- lib/Converdo/Tracker/Page/Checkout.php +32 -0
- lib/Converdo/Tracker/Page/Contact.php +31 -0
- lib/Converdo/Tracker/Page/Customer.php +45 -0
- lib/Converdo/Tracker/Page/Homepage.php +31 -0
- lib/Converdo/Tracker/Page/Product.php +31 -0
- lib/Converdo/Tracker/Page/Search.php +34 -0
- lib/Converdo/Tracker/Processor/CheckoutProcessor.php +12 -10
- lib/Converdo/Tracker/Processor/CustomVariableProcessor.php +1 -1
- lib/Converdo/Tracker/Processor/ProductViewProcessor.php +4 -1
- lib/Converdo/Tracker/Query/EcommerceCartUpdate.php +0 -4
- package.xml +5 -5
app/code/community/Converdo/Analytics/etc/config.xml
CHANGED
@@ -97,4 +97,11 @@
|
|
97 |
</Converdo_Analytics>
|
98 |
</routers>
|
99 |
</admin>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
</config>
|
97 |
</Converdo_Analytics>
|
98 |
</routers>
|
99 |
</admin>
|
100 |
+
<default>
|
101 |
+
<converdo>
|
102 |
+
<advanced>
|
103 |
+
<checkoutpath>/checkout/onepage</checkoutpath>
|
104 |
+
</advanced>
|
105 |
+
</converdo>
|
106 |
+
</default>
|
107 |
</config>
|
app/code/community/Converdo/Analytics/etc/system.xml
CHANGED
@@ -15,10 +15,11 @@
|
|
15 |
<analytics translate="label">
|
16 |
<label>Converdo Analytics</label>
|
17 |
<frontend_type>text</frontend_type>
|
18 |
-
<sort_order>
|
19 |
<show_in_default>1</show_in_default>
|
20 |
<show_in_website>1</show_in_website>
|
21 |
<show_in_store>1</show_in_store>
|
|
|
22 |
<fields>
|
23 |
<active translate="label">
|
24 |
<label>Enable</label>
|
@@ -63,7 +64,29 @@
|
|
63 |
|
64 |
</fields>
|
65 |
</analytics>
|
66 |
-
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
</sections>
|
69 |
</config>
|
15 |
<analytics translate="label">
|
16 |
<label>Converdo Analytics</label>
|
17 |
<frontend_type>text</frontend_type>
|
18 |
+
<sort_order>0</sort_order>
|
19 |
<show_in_default>1</show_in_default>
|
20 |
<show_in_website>1</show_in_website>
|
21 |
<show_in_store>1</show_in_store>
|
22 |
+
<expanded>1</expanded>
|
23 |
<fields>
|
24 |
<active translate="label">
|
25 |
<label>Enable</label>
|
64 |
|
65 |
</fields>
|
66 |
</analytics>
|
67 |
+
<!--
|
68 |
+
<advanced translate="label">
|
69 |
+
<label>Advanced</label>
|
70 |
+
<frontend_type>text</frontend_type>
|
71 |
+
<sort_order>1</sort_order>
|
72 |
+
<show_in_default>1</show_in_default>
|
73 |
+
<show_in_website>1</show_in_website>
|
74 |
+
<show_in_store>1</show_in_store>
|
75 |
+
<expanded>1</expanded>
|
76 |
+
<fields>
|
77 |
+
<checkoutpath translate="label">
|
78 |
+
<label>Checkout URL</label>
|
79 |
+
<comment>Enter the URL to the checkout page</comment>
|
80 |
+
<frontend_type>text</frontend_type>
|
81 |
+
<sort_order>40</sort_order>
|
82 |
+
<show_in_default>1</show_in_default>
|
83 |
+
<show_in_website>1</show_in_website>
|
84 |
+
<show_in_store>1</show_in_store>
|
85 |
+
</checkoutpath>
|
86 |
+
</fields>
|
87 |
+
</advanced>
|
88 |
+
-->
|
89 |
+
</groups>
|
90 |
+
</converdo>
|
91 |
</sections>
|
92 |
</config>
|
app/design/frontend/base/default/template/analytics/analytics.phtml
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php if (Mage::helper('analytics')->isEnabled()) { ?>
|
2 |
-
|
3 |
<!-- START CONVERDO TRACKING CODE -->
|
4 |
<script type="text/javascript">
|
5 |
var _paq = _paq || [];
|
1 |
<?php if (Mage::helper('analytics')->isEnabled()) { ?>
|
2 |
+
|
3 |
<!-- START CONVERDO TRACKING CODE -->
|
4 |
<script type="text/javascript">
|
5 |
var _paq = _paq || [];
|
lib/Converdo/Entity/Interface/ProductInterface.php
CHANGED
@@ -65,6 +65,13 @@ interface Converdo_Entity_Interface_ProductInterface
|
|
65 |
*/
|
66 |
public function isInStock();
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
/**
|
69 |
* Get the product stock amount.
|
70 |
*
|
@@ -120,4 +127,11 @@ interface Converdo_Entity_Interface_ProductInterface
|
|
120 |
* @return array
|
121 |
*/
|
122 |
public function getCategoryIds();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
}
|
65 |
*/
|
66 |
public function isInStock();
|
67 |
|
68 |
+
/**
|
69 |
+
* Get the product's brand.
|
70 |
+
*
|
71 |
+
* @return bool
|
72 |
+
*/
|
73 |
+
public function getBrand();
|
74 |
+
|
75 |
/**
|
76 |
* Get the product stock amount.
|
77 |
*
|
127 |
* @return array
|
128 |
*/
|
129 |
public function getCategoryIds();
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Get the attributes of the product.
|
133 |
+
*
|
134 |
+
* @return array
|
135 |
+
*/
|
136 |
+
public function getAttributes();
|
137 |
}
|
lib/Converdo/Entity/Product.php
CHANGED
@@ -191,4 +191,24 @@ class Converdo_Entity_Product extends Converdo_Entity_AbstractEntity implements
|
|
191 |
{
|
192 |
return (array) $this->entity->getCategoryIds();
|
193 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
}
|
191 |
{
|
192 |
return (array) $this->entity->getCategoryIds();
|
193 |
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Get the product's brand.
|
197 |
+
*
|
198 |
+
* @return bool
|
199 |
+
*/
|
200 |
+
public function getBrand()
|
201 |
+
{
|
202 |
+
return $this->entity->getAttributeText('manufacturer');
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Get the attributes of the product.
|
207 |
+
*
|
208 |
+
* @return array
|
209 |
+
*/
|
210 |
+
public function getAttributes()
|
211 |
+
{
|
212 |
+
return Mage::getModel('eav/entity_attribute_set')->load($this->entity->getAttributeSetId())->getAttributeSetName();
|
213 |
+
}
|
214 |
}
|
lib/Converdo/Support/QueryParser.php
CHANGED
@@ -2,15 +2,30 @@
|
|
2 |
|
3 |
class Converdo_Support_QueryParser
|
4 |
{
|
|
|
|
|
|
|
5 |
protected static $queries = [];
|
6 |
|
|
|
|
|
|
|
7 |
protected static $entity;
|
8 |
|
|
|
|
|
|
|
9 |
public static function entity($entity)
|
10 |
{
|
11 |
self::$entity = $entity;
|
12 |
}
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
public static function add(Converdo_Tracker_Query_Interface_QueryInterface $query, array $options = [])
|
15 |
{
|
16 |
$parameters = $query->with([self::$entity])->parameters();
|
@@ -24,23 +39,14 @@ class Converdo_Support_QueryParser
|
|
24 |
self::$queries[] = $output;
|
25 |
}
|
26 |
|
|
|
|
|
|
|
27 |
public static function parse()
|
28 |
{
|
29 |
return implode("\n\t\t\t\t", self::$queries);
|
30 |
}
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
protected static function toString(Converdo_Tracker_Query_Interface_QueryInterface $query, array $parameters = [])
|
45 |
{
|
46 |
$output = new Converdo_Support_StringBuilder();
|
2 |
|
3 |
class Converdo_Support_QueryParser
|
4 |
{
|
5 |
+
/**
|
6 |
+
* @var array
|
7 |
+
*/
|
8 |
protected static $queries = [];
|
9 |
|
10 |
+
/**
|
11 |
+
* @var mixed
|
12 |
+
*/
|
13 |
protected static $entity;
|
14 |
|
15 |
+
/**
|
16 |
+
* @param $entity
|
17 |
+
*/
|
18 |
public static function entity($entity)
|
19 |
{
|
20 |
self::$entity = $entity;
|
21 |
}
|
22 |
|
23 |
+
/**
|
24 |
+
* Adds a Tracker Query.
|
25 |
+
*
|
26 |
+
* @param Converdo_Tracker_Query_Interface_QueryInterface $query
|
27 |
+
* @param array $options
|
28 |
+
*/
|
29 |
public static function add(Converdo_Tracker_Query_Interface_QueryInterface $query, array $options = [])
|
30 |
{
|
31 |
$parameters = $query->with([self::$entity])->parameters();
|
39 |
self::$queries[] = $output;
|
40 |
}
|
41 |
|
42 |
+
/**
|
43 |
+
* @return string
|
44 |
+
*/
|
45 |
public static function parse()
|
46 |
{
|
47 |
return implode("\n\t\t\t\t", self::$queries);
|
48 |
}
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
protected static function toString(Converdo_Tracker_Query_Interface_QueryInterface $query, array $parameters = [])
|
51 |
{
|
52 |
$output = new Converdo_Support_StringBuilder();
|
lib/Converdo/Tracker/Page/AbstractPage.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class Converdo_Tracker_Page_AbstractPage
|
5 |
+
*
|
6 |
+
* @package Converdo
|
7 |
+
* @author Marc Roosendaal <marc@converdo.nl>
|
8 |
+
* @copyright 2016 Converdo B.V.
|
9 |
+
*/
|
10 |
+
abstract class Converdo_Tracker_Page_AbstractPage
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Returns the key representing the Page Type.
|
14 |
+
*
|
15 |
+
* @return int
|
16 |
+
*/
|
17 |
+
public function type()
|
18 |
+
{
|
19 |
+
return 0;
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Returns an array with mapped Page Subtypes.
|
24 |
+
*
|
25 |
+
* @return array
|
26 |
+
*/
|
27 |
+
public function types()
|
28 |
+
{
|
29 |
+
return [];
|
30 |
+
}
|
31 |
+
}
|
lib/Converdo/Tracker/Page/Cart.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class Converdo_Tracker_Page_Cart
|
5 |
+
*
|
6 |
+
* @package Converdo
|
7 |
+
* @author Marc Roosendaal <marc@converdo.nl>
|
8 |
+
* @copyright 2016 Converdo B.V.
|
9 |
+
*/
|
10 |
+
class Converdo_Tracker_Page_Cart extends Converdo_Tracker_Page_AbstractPage
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* @inheritdoc
|
14 |
+
* @return int
|
15 |
+
*/
|
16 |
+
public function type()
|
17 |
+
{
|
18 |
+
return 2;
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @inheritdoc
|
23 |
+
* @return array
|
24 |
+
*/
|
25 |
+
public function types()
|
26 |
+
{
|
27 |
+
return [
|
28 |
+
'checkout_cart_index' => 200,
|
29 |
+
];
|
30 |
+
}
|
31 |
+
}
|
lib/Converdo/Tracker/Page/Category.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class Converdo_Tracker_Page_Category
|
5 |
+
*
|
6 |
+
* @package Converdo
|
7 |
+
* @author Marc Roosendaal <marc@converdo.nl>
|
8 |
+
* @copyright 2016 Converdo B.V.
|
9 |
+
*/
|
10 |
+
class Converdo_Tracker_Page_Category extends Converdo_Tracker_Page_AbstractPage
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* @inheritdoc
|
14 |
+
* @return int
|
15 |
+
*/
|
16 |
+
public function type()
|
17 |
+
{
|
18 |
+
return 3;
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @inheritdoc
|
23 |
+
* @return array
|
24 |
+
*/
|
25 |
+
public function types()
|
26 |
+
{
|
27 |
+
return [
|
28 |
+
'catalog_category_view' => 300,
|
29 |
+
];
|
30 |
+
}
|
31 |
+
}
|
lib/Converdo/Tracker/Page/Checkout.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class Converdo_Tracker_Page_Checkout
|
5 |
+
*
|
6 |
+
* @package Converdo
|
7 |
+
* @author Marc Roosendaal <marc@converdo.nl>
|
8 |
+
* @copyright 2016 Converdo B.V.
|
9 |
+
*/
|
10 |
+
class Converdo_Tracker_Page_Checkout extends Converdo_Tracker_Page_AbstractPage
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* @inheritdoc
|
14 |
+
* @return int
|
15 |
+
*/
|
16 |
+
public function type()
|
17 |
+
{
|
18 |
+
return 4;
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @inheritdoc
|
23 |
+
* @return array
|
24 |
+
*/
|
25 |
+
public function types()
|
26 |
+
{
|
27 |
+
return [
|
28 |
+
'checkout_onepage_index' => 400,
|
29 |
+
'checkout_onepage_success' => 401,
|
30 |
+
];
|
31 |
+
}
|
32 |
+
}
|
lib/Converdo/Tracker/Page/Contact.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class Converdo_Tracker_Page_Contact
|
5 |
+
*
|
6 |
+
* @package Converdo
|
7 |
+
* @author Marc Roosendaal <marc@converdo.nl>
|
8 |
+
* @copyright 2016 Converdo B.V.
|
9 |
+
*/
|
10 |
+
class Converdo_Tracker_Page_Contact extends Converdo_Tracker_Page_AbstractPage
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* @inheritdoc
|
14 |
+
* @return int
|
15 |
+
*/
|
16 |
+
public function type()
|
17 |
+
{
|
18 |
+
return 5;
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @inheritdoc
|
23 |
+
* @return array
|
24 |
+
*/
|
25 |
+
public function types()
|
26 |
+
{
|
27 |
+
return [
|
28 |
+
'contacts' => 500,
|
29 |
+
];
|
30 |
+
}
|
31 |
+
}
|
lib/Converdo/Tracker/Page/Customer.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class Converdo_Tracker_Page_AbstractPage
|
5 |
+
*
|
6 |
+
* @package Converdo
|
7 |
+
* @author Marc Roosendaal <marc@converdo.nl>
|
8 |
+
* @copyright 2016 Converdo B.V.
|
9 |
+
*/
|
10 |
+
class Converdo_Tracker_Page_Customer extends Converdo_Tracker_Page_AbstractPage
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* @inheritdoc
|
14 |
+
* @return int
|
15 |
+
*/
|
16 |
+
public function type()
|
17 |
+
{
|
18 |
+
return 1;
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @inheritdoc
|
23 |
+
* @return array
|
24 |
+
*/
|
25 |
+
public function types()
|
26 |
+
{
|
27 |
+
return [
|
28 |
+
'customer_account_login' => 100,
|
29 |
+
'customer_account_create' => 101,
|
30 |
+
'customer_account_index' => 102,
|
31 |
+
'customer_account_forgotpassword' => 103,
|
32 |
+
'customer_account_edit' => 104,
|
33 |
+
'customer_address_form' => 105,
|
34 |
+
'sales_order_history' => 106,
|
35 |
+
'sales_billing_agreement_index' => 107,
|
36 |
+
'sales_recurring_profile_index' => 108,
|
37 |
+
'review_customer_index' => 109,
|
38 |
+
'wishlist_index_index' => 110,
|
39 |
+
'oauth_customer_token_index' => 111,
|
40 |
+
'newsletter_manage_index' => 112,
|
41 |
+
'downloadable_customer_products' => 113,
|
42 |
+
'customer_account_logoutSuccess' => 114,
|
43 |
+
];
|
44 |
+
}
|
45 |
+
}
|
lib/Converdo/Tracker/Page/Homepage.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class Converdo_Tracker_Page_Homepage
|
5 |
+
*
|
6 |
+
* @package Converdo
|
7 |
+
* @author Marc Roosendaal <marc@converdo.nl>
|
8 |
+
* @copyright 2016 Converdo B.V.
|
9 |
+
*/
|
10 |
+
class Converdo_Tracker_Page_Homepage extends Converdo_Tracker_Page_AbstractPage
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* @inheritdoc
|
14 |
+
* @return int
|
15 |
+
*/
|
16 |
+
public function type()
|
17 |
+
{
|
18 |
+
return 6;
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @inheritdoc
|
23 |
+
* @return array
|
24 |
+
*/
|
25 |
+
public function types()
|
26 |
+
{
|
27 |
+
return [
|
28 |
+
'cms_index_index' => 600,
|
29 |
+
];
|
30 |
+
}
|
31 |
+
}
|
lib/Converdo/Tracker/Page/Product.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class Converdo_Tracker_Page_Product
|
5 |
+
*
|
6 |
+
* @package Converdo
|
7 |
+
* @author Marc Roosendaal <marc@converdo.nl>
|
8 |
+
* @copyright 2016 Converdo B.V.
|
9 |
+
*/
|
10 |
+
class Converdo_Tracker_Page_Product extends Converdo_Tracker_Page_AbstractPage
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* @inheritdoc
|
14 |
+
* @return int
|
15 |
+
*/
|
16 |
+
public function type()
|
17 |
+
{
|
18 |
+
return 7;
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @inheritdoc
|
23 |
+
* @return array
|
24 |
+
*/
|
25 |
+
public function types()
|
26 |
+
{
|
27 |
+
return [
|
28 |
+
'catalog_product_view' => 700,
|
29 |
+
];
|
30 |
+
}
|
31 |
+
}
|
lib/Converdo/Tracker/Page/Search.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class Converdo_Tracker_Page_Search
|
5 |
+
*
|
6 |
+
* @package Converdo
|
7 |
+
* @author Marc Roosendaal <marc@converdo.nl>
|
8 |
+
* @copyright 2016 Converdo B.V.
|
9 |
+
*/
|
10 |
+
class Converdo_Tracker_Page_Search extends Converdo_Tracker_Page_AbstractPage
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* @inheritdoc
|
14 |
+
* @return int
|
15 |
+
*/
|
16 |
+
public function type()
|
17 |
+
{
|
18 |
+
return 8;
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @inheritdoc
|
23 |
+
* @return array
|
24 |
+
*/
|
25 |
+
public function types()
|
26 |
+
{
|
27 |
+
return [
|
28 |
+
'catalogsearch_result_index' => 800,
|
29 |
+
'catalogsearch_advanced_index' => 801,
|
30 |
+
'catalogsearch_advanced_result' => 802,
|
31 |
+
'catalogsearch_term_popular' => 803,
|
32 |
+
];
|
33 |
+
}
|
34 |
+
}
|
lib/Converdo/Tracker/Processor/CheckoutProcessor.php
CHANGED
@@ -35,9 +35,9 @@ class Converdo_Tracker_Processor_CheckoutProcessor extends Converdo_Tracker_Proc
|
|
35 |
|
36 |
foreach ($collection as $order) {
|
37 |
foreach ($order->getAllVisibleItems() as $key => $product) {
|
38 |
-
$product
|
39 |
-
$product
|
40 |
-
$category
|
41 |
|
42 |
if (($categoryIds = $product->getCategoryIds()) && count($categoryIds)) {
|
43 |
$category = Mage::getModel('catalog/category')->load($categoryIds[0]);
|
@@ -50,13 +50,15 @@ class Converdo_Tracker_Processor_CheckoutProcessor extends Converdo_Tracker_Proc
|
|
50 |
]);
|
51 |
}
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
|
|
60 |
}
|
61 |
}
|
62 |
}
|
35 |
|
36 |
foreach ($collection as $order) {
|
37 |
foreach ($order->getAllVisibleItems() as $key => $product) {
|
38 |
+
$product = Mage::getModel('catalog/product')->load($product->product_id);
|
39 |
+
$product = new Converdo_Entity_Product($product);
|
40 |
+
$category = "";
|
41 |
|
42 |
if (($categoryIds = $product->getCategoryIds()) && count($categoryIds)) {
|
43 |
$category = Mage::getModel('catalog/category')->load($categoryIds[0]);
|
50 |
]);
|
51 |
}
|
52 |
|
53 |
+
foreach ($collection as $finalOrder) {
|
54 |
+
Converdo_Support_QueryParser::add(new Converdo_Tracker_Query_EcommerceTracking, [
|
55 |
+
0 => [Converdo_Support_QueryType::integer(), $finalOrder->getIncrementId()],
|
56 |
+
1 => [Converdo_Support_QueryType::float(), $finalOrder->getBaseGrandTotal()],
|
57 |
+
2 => [Converdo_Support_QueryType::float(), number_format($finalOrder->getGrandTotal() - $finalOrder->getShippingAmount() - $finalOrder->getShippingTaxAmount(), 2)],
|
58 |
+
3 => [Converdo_Support_QueryType::float(), $finalOrder->getBaseTaxAmount()],
|
59 |
+
4 => [Converdo_Support_QueryType::float(), $finalOrder->getBaseShippingAmount()],
|
60 |
+
]);
|
61 |
+
}
|
62 |
}
|
63 |
}
|
64 |
}
|
lib/Converdo/Tracker/Processor/CustomVariableProcessor.php
CHANGED
@@ -16,7 +16,7 @@ class Converdo_Tracker_Processor_CustomVariableProcessor extends Converdo_Tracke
|
|
16 |
public function responsible(Converdo_Analytics_Block_Tracker $block)
|
17 |
{
|
18 |
$this->configuration = $block->configuration;
|
19 |
-
|
20 |
return true;
|
21 |
}
|
22 |
|
16 |
public function responsible(Converdo_Analytics_Block_Tracker $block)
|
17 |
{
|
18 |
$this->configuration = $block->configuration;
|
19 |
+
|
20 |
return true;
|
21 |
}
|
22 |
|
lib/Converdo/Tracker/Processor/ProductViewProcessor.php
CHANGED
@@ -95,11 +95,14 @@ class Converdo_Tracker_Processor_ProductViewProcessor extends Converdo_Tracker_P
|
|
95 |
'typ' => $this->product->getType(),
|
96 |
|
97 |
// Product Attributes
|
98 |
-
'att' =>
|
99 |
|
100 |
// Product Is In Stock
|
101 |
'stb' => $this->product->isInStock(),
|
102 |
|
|
|
|
|
|
|
103 |
// Product Stock Quantity
|
104 |
'sqn' => $this->product->getStockQuantity(),
|
105 |
'cva' => null,
|
95 |
'typ' => $this->product->getType(),
|
96 |
|
97 |
// Product Attributes
|
98 |
+
'att' => $this->product->getAttributes(),
|
99 |
|
100 |
// Product Is In Stock
|
101 |
'stb' => $this->product->isInStock(),
|
102 |
|
103 |
+
// Product Is In Stock
|
104 |
+
'bra' => $this->product->getBrand(),
|
105 |
+
|
106 |
// Product Stock Quantity
|
107 |
'sqn' => $this->product->getStockQuantity(),
|
108 |
'cva' => null,
|
lib/Converdo/Tracker/Query/EcommerceCartUpdate.php
CHANGED
@@ -26,10 +26,6 @@ class Converdo_Tracker_Query_EcommerceCartUpdate extends Converdo_Tracker_Query_
|
|
26 |
*/
|
27 |
public function parameters()
|
28 |
{
|
29 |
-
if (!($this->entities[0] instanceof Varien_Object)) {
|
30 |
-
return [];
|
31 |
-
}
|
32 |
-
|
33 |
return [
|
34 |
0 => [Converdo_Support_QueryType::float(), number_format($this->entities[0]->getQuote()->getGrandTotal(), 2)],
|
35 |
];
|
26 |
*/
|
27 |
public function parameters()
|
28 |
{
|
|
|
|
|
|
|
|
|
29 |
return [
|
30 |
0 => [Converdo_Support_QueryType::float(), number_format($this->entities[0]->getQuote()->getGrandTotal(), 2)],
|
31 |
];
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Converdo_Analytics</name>
|
4 |
-
<version>1.2.4.
|
5 |
<stability>stable</stability>
|
6 |
<license>MITL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Better E-commerce Analytics. Clear, actionable insight in the behavior of your visitors. Improve your campaigns and conversion rate easily.</summary>
|
10 |
<description>Better E-commerce Analytics. Clear, actionable insight in the behavior of your visitors. Improve your campaigns and conversion rate easily. This plugin, installed in a minute, is all you need to have a complete and powerfull Analytics Suite. View your KPI's and sales funnels, segmented on dozens of dimensions like page type, device, landing page, campaign, etc. This plugin collects your users behaviour so you can view the insights on your dashboard on converdo.com. You can use Converdo Analytics side by side with Google Analytics without a problem. It works asynchronous so it will never impact your user experience. This extension is made especially for Magento ecommerce stores, which provides you powerfull insights out of the box.</description>
|
11 |
-
<notes>-
|
12 |
<authors><author><name>Roeland van Oostenbrugge</name><user>converdo</user><email>roeland@converdo.nl</email></author></authors>
|
13 |
-
<date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Converdo"><dir name="Analytics"><dir name="Block"><file name="Tracker.php" hash="764336768ca80603761bb53fe701d7f1"/></dir><dir name="Helper"><file name="Data.php" hash="c4d21c9630645736d2ea741d4536dd91"/></dir><dir name="Model"><file name="Observer.php" hash="0b1e93efcb995705bda3c99a136f66ae"/></dir><dir name="controllers"><file name="PingController.php" hash="98437b8791e27b3ad1db915c805b5063"/></dir><dir name="etc"><file name="adminhtml.xml" hash="9923bfe8c0f4aa318166e15cd373cf09"/><file name="config.xml" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.5.37</min><max>7.0.5</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Converdo_Analytics</name>
|
4 |
+
<version>1.2.4.8</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>MITL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Better E-commerce Analytics. Clear, actionable insight in the behavior of your visitors. Improve your campaigns and conversion rate easily.</summary>
|
10 |
<description>Better E-commerce Analytics. Clear, actionable insight in the behavior of your visitors. Improve your campaigns and conversion rate easily. This plugin, installed in a minute, is all you need to have a complete and powerfull Analytics Suite. View your KPI's and sales funnels, segmented on dozens of dimensions like page type, device, landing page, campaign, etc. This plugin collects your users behaviour so you can view the insights on your dashboard on converdo.com. You can use Converdo Analytics side by side with Google Analytics without a problem. It works asynchronous so it will never impact your user experience. This extension is made especially for Magento ecommerce stores, which provides you powerfull insights out of the box.</description>
|
11 |
+
<notes>- Enhanced order tracking</notes>
|
12 |
<authors><author><name>Roeland van Oostenbrugge</name><user>converdo</user><email>roeland@converdo.nl</email></author></authors>
|
13 |
+
<date>2017-01-30</date>
|
14 |
+
<time>11:41:27</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Converdo"><dir name="Analytics"><dir name="Block"><file name="Tracker.php" hash="764336768ca80603761bb53fe701d7f1"/></dir><dir name="Helper"><file name="Data.php" hash="c4d21c9630645736d2ea741d4536dd91"/></dir><dir name="Model"><file name="Observer.php" hash="0b1e93efcb995705bda3c99a136f66ae"/></dir><dir name="controllers"><file name="PingController.php" hash="98437b8791e27b3ad1db915c805b5063"/></dir><dir name="etc"><file name="adminhtml.xml" hash="9923bfe8c0f4aa318166e15cd373cf09"/><file name="config.xml" hash="d760ba87420369be1a4e84734fddd2d3"/><file name="system.xml" hash="7f90adaa9874a50b30e7d65cb8eb173b"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="analytics.xml" hash="d3f9d35df1981968a55a331c2b92d473"/></dir><dir name="template"><dir name="analytics"><file name="analytics.phtml" hash="a6455a39c95ec8f8df7c9b4fe6142627"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><file name="converdoanalytics.xml" hash=""/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Converdo_Analytics.xml" hash="119a038ca81bdf03767b1b12d81414ad"/></dir></target><target name="magelib"><dir name="Converdo"><dir name="Entity"><file name="AbstractEntity.php" hash="4130576c917771fdafcb4055363b2861"/><dir name="Interface"><file name="EntityInterface.php" hash="cb6a4e6da90518a9ffa8445314de56c1"/><file name="ProductInterface.php" hash="56d58a99fed4f9ab9ac699dcc59dee81"/></dir><file name="Product.php" hash="07a30cc24308adeb15793ffd0a3e3448"/></dir><dir name="Support"><file name="Crypt.php" hash="265f44cafba70116f72c255dd737a805"/><file name="QueryParser.php" hash="fad8540e335dd0a5e117489207453233"/><file name="QueryType.php" hash="ba9a87192c533cb0faf693f5921775c0"/><file name="StringBuilder.php" hash="282b1a3111f7cdf4c3b88f6320a8c57e"/></dir><dir name="Tracker"><dir name="Page"><file name="AbstractPage.php" hash="e22d9ccfcc4c15ec7712549eb28dcb93"/><file name="Cart.php" hash="344165e416a144925d9c004dd4fe64dc"/><file name="Category.php" hash="ad360cf14714f5f83200f43fc7da6318"/><file name="Checkout.php" hash="0e4943a85a61a9557ccb8df3d5c828ec"/><file name="Contact.php" hash="09d7bf93433926d8b02ec26802933777"/><file name="Customer.php" hash="dc56b1d038618e9cb035bbf7045000db"/><file name="Homepage.php" hash="f7be65045ac07de2bf3e3bae3f70ec5a"/><file name="Product.php" hash="c14b8e3c8f7c0c6af6c2153e6d1b8519"/><file name="Search.php" hash="0c6c32a5ceec293a87b4b339ac669891"/></dir><dir name="Processor"><file name="AbstractProcessor.php" hash="becc5295bdaaf413995b9fe95c9b0d1e"/><file name="CartProcessor.php" hash="d2709554c310b9cbcff93d99d0a9ac4e"/><file name="CategoryViewProcessor.php" hash="7eb98e452fa38adb49d1405e3204944a"/><file name="CheckoutProcessor.php" hash="3dadd261e774f3b0b02e3a157c8fa049"/><file name="CustomUrlProcessor.php" hash="87c6e909697fb6216014187d7fc1eb07"/><file name="CustomVariableProcessor.php" hash="d5a115455dd048ebd49226074d9b9a86"/><file name="FootProcessor.php" hash="b1dbccbc34a6fa541ba9e2ff0ef6adfc"/><file name="HeadProcessor.php" hash="bdf476a4bfcd18d22de9d566ca2c9911"/><dir name="Interface"><file name="ProcessorInterface.php" hash="b4d97a90b6110c09a2bac67ffa4f6634"/></dir><file name="PageViewProcessor.php" hash="cc2c4bc1e163e13a1168196dd70f526a"/><file name="ProductViewProcessor.php" hash="4c63a4417de9a755d0d05213d75d3953"/></dir><dir name="Query"><file name="AbstractQuery.php" hash="8133d2b672874d40f859bd042771a53a"/><file name="CategoryView.php" hash="3607b3096dca90247cc1d5e777f4ec8c"/><file name="CustomUrl.php" hash="75bac9b592363617b4156423d636ad3e"/><file name="CustomVariable.php" hash="c5a1abd4badcefa3ce9fac42d73b5789"/><file name="EcommerceCartUpdate.php" hash="08863f07907557395d624ad99b5071c1"/><file name="EcommerceItem.php" hash="d1269f322fc5c4a1dbdbf9e869a0a541"/><file name="EcommerceTracking.php" hash="e065017782b22675273327dfba4fde6d"/><file name="HeartBeat.php" hash="4329afd34f622d5a5f0444a88ee1a3f7"/><dir name="Interface"><file name="QueryInterface.php" hash="5c80f20d543987cd3af1a74639fdd2ed"/></dir><file name="LinkTracking.php" hash="656ff44dd821b4167c9e5bbb10dea087"/><file name="PageTracking.php" hash="6d1c5d56750221a945b6268b6dccce05"/><file name="PageView.php" hash="f1ef5fd152710d341d476d0056e89ce4"/><file name="ProductView.php" hash="567375f931e8d93b662ca41189077a5c"/><file name="SiteId.php" hash="68e69921ca9e3a677436705d64c75b46"/><file name="TrackerUrl.php" hash="94d890dea4033fc8c1717ce3bf1861aa"/></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Converdo_Magento.csv" hash=""/></dir><dir name="nl_NL"><file name="Converdo_Magento.csv" hash=""/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="converdoanalytics"><dir name="css"><file name="system_config_edit.css" hash="fd6f5337fd9a9b69b85079e17aa0e40b"/></dir><dir name="images"><file name="favicon.png" hash="674c9388eba1ea89e200fe6b1a62fc24"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.5.37</min><max>7.0.5</max></php></required></dependencies>
|
18 |
</package>
|