analytics - Version 1.1.0

Version Notes

Download this release

Release Info

Developer Segment
Extension analytics
Version 1.1.0
Comparing to
See all releases


Code changes from version 1.0.0 to 1.1.0

app/.DS_Store DELETED
Binary file
app/code/.DS_Store DELETED
Binary file
app/code/community/.DS_Store DELETED
Binary file
app/code/community/Segment/Analytics/Helper/Data.php CHANGED
@@ -2,69 +2,86 @@
2
  class Segment_Analytics_Helper_Data extends Mage_Core_Helper_Abstract
3
  {
4
  public function getWriteKey()
5
- {
6
  return Mage::getStoreConfig('segment_analytics/options/write_key');
7
  }
8
-
9
  public function isAdmin()
10
  {
11
  return Mage::app()->getStore()->isAdmin();
12
  }
13
-
14
  public function isEnabled()
15
  {
16
  return !$this->isAdmin() && $this->getWriteKey();
17
  }
18
-
19
  public function getCategoryNamesFromIds($ids)
20
  {
21
  $ids = is_array($ids) ? $ids : array($ids);
22
  $categories = Mage::getModel('catalog/category')->getCollection()
23
  ->addAttributeToSelect('name')
24
- ->addFieldToFilter('entity_id', array('in'=>$ids));
25
-
26
  $names = array();
27
  foreach($categories as $category)
28
  {
29
- $names[] = $category->getName();
30
  }
31
- return $names;
32
  }
33
 
34
  /**
35
- * Changes standard page titles per segment API. Hopefully
36
  * this is kept to a minimum
37
  * @todo refactor if this goes beyond page
38
- */
39
  public function getNormalizedPageTitle($title)
40
  {
41
  if(strpos($title, $this->__('Search results for')) !== false)
42
  {
43
  $title = 'Search Results';
44
  }
45
-
46
  return $title;
47
  }
48
-
49
  public function getNormalizedCustomerInformation($data)
50
  {
51
  $swap = array(
52
  'firstname'=>'first_name',
53
  'lastname'=>'last_name');
54
-
 
55
  foreach($swap as $old=>$new)
56
  {
57
  if(!array_key_exists($old, $data))
58
  {
59
  continue;
60
- }
61
  $data[$new] = $data[$old];
62
  unset($data[$old]);
63
  }
64
-
65
- return $this->_normalizeDatesToISO8601($data);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  }
67
-
68
  public function getNormalizedProductInformation($product)
69
  {
70
  //if passed id, load the product
@@ -72,23 +89,23 @@ class Segment_Analytics_Helper_Data extends Mage_Core_Helper_Abstract
72
  {
73
  $product = Mage::getModel('catalog/product_api')->info($product);
74
  }
75
-
76
- //calculate revenue, if present
77
  $product['id'] = $product['product_id'];
78
  if(array_key_exists('cost',$product))
79
  {
80
  $product['revenue'] = $product['price'] - $product['cost'];
81
- }
82
-
83
  //ensure category names/labels are sent along
84
  $categories = Mage::getModel('catalog/category')->getCollection()
85
  ->addAttributeToSelect('name')
86
- ->addFieldToFilter('entity_id', array('in'=>$product['category_ids']));
87
  foreach($categories as $category)
88
  {
89
- $product['categories'][] = $category->getName();
90
  }
91
-
92
  //cast numerics as floats per segment requirements
93
  $as_float = array('price','weight');
94
  foreach($as_float as $key)
@@ -98,20 +115,20 @@ class Segment_Analytics_Helper_Data extends Mage_Core_Helper_Abstract
98
  }
99
 
100
  //segments wants "id" not product_id
101
- if(array_key_exists('product_id', $product))
102
  {
103
  $product['id'] = $product['product_id'];
104
  unset($product['product_id']);
105
  }
106
-
107
  $product = $this->getDataCastAsBooleans($product);
108
  return $this->_normalizeDatesToISO8601($product);
109
  }
110
-
111
  /**
112
  * Central place for casting of '1' and '0' as boolean
113
  * where we know it needs to happen. Segment API requirement
114
- */
115
  public function getDataCastAsBooleans($data)
116
  {
117
  $keys_boolean = array('has_options','is_active','customer_is_guest','customer_note_notify',
@@ -121,10 +138,10 @@ class Segment_Analytics_Helper_Data extends Mage_Core_Helper_Abstract
121
  {
122
  if(!array_key_exists($key, $data)) { continue; }
123
  $data[$key] = (boolean) $data[$key];
124
- }
125
  return $this->_normalizeDatesToISO8601($data);
126
  }
127
-
128
  protected function _normalizeDatesToISO8601($data)
129
  {
130
  $date_fields = array('created_at', 'updated_at');
@@ -138,9 +155,9 @@ class Segment_Analytics_Helper_Data extends Mage_Core_Helper_Abstract
138
  }
139
  return $data;
140
  }
141
-
142
  public function normalizeReviewwData($data)
143
  {
144
  return $this->_normalizeDatesToISO8601($data);
145
- }
146
  }
2
  class Segment_Analytics_Helper_Data extends Mage_Core_Helper_Abstract
3
  {
4
  public function getWriteKey()
5
+ {
6
  return Mage::getStoreConfig('segment_analytics/options/write_key');
7
  }
8
+
9
  public function isAdmin()
10
  {
11
  return Mage::app()->getStore()->isAdmin();
12
  }
13
+
14
  public function isEnabled()
15
  {
16
  return !$this->isAdmin() && $this->getWriteKey();
17
  }
18
+
19
  public function getCategoryNamesFromIds($ids)
20
  {
21
  $ids = is_array($ids) ? $ids : array($ids);
22
  $categories = Mage::getModel('catalog/category')->getCollection()
23
  ->addAttributeToSelect('name')
24
+ ->addFieldToFilter('entity_id', array('in'=>$ids));
25
+
26
  $names = array();
27
  foreach($categories as $category)
28
  {
29
+ $names[] = $category->getName();
30
  }
31
+ return $names;
32
  }
33
 
34
  /**
35
+ * Changes standard page titles per segment API. Hopefully
36
  * this is kept to a minimum
37
  * @todo refactor if this goes beyond page
38
+ */
39
  public function getNormalizedPageTitle($title)
40
  {
41
  if(strpos($title, $this->__('Search results for')) !== false)
42
  {
43
  $title = 'Search Results';
44
  }
45
+
46
  return $title;
47
  }
48
+
49
  public function getNormalizedCustomerInformation($data)
50
  {
51
  $swap = array(
52
  'firstname'=>'first_name',
53
  'lastname'=>'last_name');
54
+
55
+ //nomalize items from $swap
56
  foreach($swap as $old=>$new)
57
  {
58
  if(!array_key_exists($old, $data))
59
  {
60
  continue;
61
+ }
62
  $data[$new] = $data[$old];
63
  unset($data[$old]);
64
  }
65
+
66
+ //normalize dates
67
+ $data = $this->_normalizeDatesToISO8601($data);
68
+
69
+ //only
70
+ $fields = trim(Mage::getStoreConfig('segment_analytics/options/customer_traits'));
71
+ $to_send = preg_split('%[\n\r]%', $fields, -1, PREG_SPLIT_NO_EMPTY);
72
+
73
+ $data_final = array();
74
+ foreach($to_send as $field)
75
+ {
76
+ $data_final[$field] = array_key_exists($field, $data) ? $data[$field] : null;
77
+ }
78
+
79
+ $data_final = $this->getDataCastAsBooleans($data_final);
80
+
81
+ return $data_final;
82
+
83
  }
84
+
85
  public function getNormalizedProductInformation($product)
86
  {
87
  //if passed id, load the product
89
  {
90
  $product = Mage::getModel('catalog/product_api')->info($product);
91
  }
92
+
93
+ //calculate revenue, if present
94
  $product['id'] = $product['product_id'];
95
  if(array_key_exists('cost',$product))
96
  {
97
  $product['revenue'] = $product['price'] - $product['cost'];
98
+ }
99
+
100
  //ensure category names/labels are sent along
101
  $categories = Mage::getModel('catalog/category')->getCollection()
102
  ->addAttributeToSelect('name')
103
+ ->addFieldToFilter('entity_id', array('in'=>$product['category_ids']));
104
  foreach($categories as $category)
105
  {
106
+ $product['categories'][] = $category->getName();
107
  }
108
+
109
  //cast numerics as floats per segment requirements
110
  $as_float = array('price','weight');
111
  foreach($as_float as $key)
115
  }
116
 
117
  //segments wants "id" not product_id
118
+ if(array_key_exists('product_id', $product))
119
  {
120
  $product['id'] = $product['product_id'];
121
  unset($product['product_id']);
122
  }
123
+
124
  $product = $this->getDataCastAsBooleans($product);
125
  return $this->_normalizeDatesToISO8601($product);
126
  }
127
+
128
  /**
129
  * Central place for casting of '1' and '0' as boolean
130
  * where we know it needs to happen. Segment API requirement
131
+ */
132
  public function getDataCastAsBooleans($data)
133
  {
134
  $keys_boolean = array('has_options','is_active','customer_is_guest','customer_note_notify',
138
  {
139
  if(!array_key_exists($key, $data)) { continue; }
140
  $data[$key] = (boolean) $data[$key];
141
+ }
142
  return $this->_normalizeDatesToISO8601($data);
143
  }
144
+
145
  protected function _normalizeDatesToISO8601($data)
146
  {
147
  $date_fields = array('created_at', 'updated_at');
155
  }
156
  return $data;
157
  }
158
+
159
  public function normalizeReviewwData($data)
160
  {
161
  return $this->_normalizeDatesToISO8601($data);
162
+ }
163
  }
app/code/community/Segment/Analytics/Model/Controller/Identity.php CHANGED
@@ -15,6 +15,10 @@ class Segment_Analytics_Model_Controller_Identity extends Segment_Analytics_Mode
15
  ->getSource()
16
  ->getOptionText($customer->getData('gender'));
17
 
 
 
 
 
18
  $block->setUserId($customer->getId())
19
  ->addData($customer->getData())
20
  ->setFullName($customer->getName())
@@ -41,6 +45,18 @@ class Segment_Analytics_Model_Controller_Identity extends Segment_Analytics_Mode
41
  ->unsetData('lastname')
42
  ->unsetData('middlename');
43
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  $data = $block->getData();
45
  $data = Mage::helper('segment_analytics')->getNormalizedCustomerInformation($data);
46
  $block->setData($data);
15
  ->getSource()
16
  ->getOptionText($customer->getData('gender'));
17
 
18
+ $address = Mage::getModel('customer/address')->load(
19
+ $customer->getDefaultBilling()
20
+ );
21
+
22
  $block->setUserId($customer->getId())
23
  ->addData($customer->getData())
24
  ->setFullName($customer->getName())
45
  ->unsetData('lastname')
46
  ->unsetData('middlename');
47
 
48
+ if($address)
49
+ {
50
+ $region = Mage::getModel('directory/region')->load($address->getRegionId());
51
+ $street = $address->getStreet();
52
+ $street = implode("\n", $street);
53
+ $block
54
+ ->setData('city', $address->getCity())
55
+ ->setData('country', $address->getCountryId())
56
+ ->setData('postalCode', $address->getPostcode())
57
+ ->setData('state', $region->getCode())
58
+ ->setData('street', $street);
59
+ }
60
  $data = $block->getData();
61
  $data = Mage::helper('segment_analytics')->getNormalizedCustomerInformation($data);
62
  $block->setData($data);
app/code/community/Segment/Analytics/Model/Controller/Orderplaced.php CHANGED
@@ -4,35 +4,33 @@ class Segment_Analytics_Model_Controller_Orderplaced extends Segment_Analytics_M
4
  public function getBlock($block)
5
  {
6
  $params = $block->getParams();
7
-
8
  $info = Mage::getModel('sales/order_api')
9
  ->info($params['increment_id']);
10
-
11
  $params['total'] = (float) $info['grand_total'];
12
- $params['status'] = $info['status'];
 
13
  $params['shipping'] = (float) $info['shipping_amount'];
14
  $params['tax'] = (float) $info['tax_amount'];
 
15
  $params['products'] = array();
16
  foreach($info['items'] as $item)
17
  {
18
- $tmp = array();
19
  $tmp['sku'] = $item['sku'];
20
- $tmp['name'] = $item['name'];;
21
  $tmp['price'] = (float) $item['price'];
22
  $tmp['quantity'] = (float) $item['qty_ordered'];
23
- $tmp['product_id'] = (int) $item['product_id'];
24
 
25
- //in case we ever add the boolean order items
26
- $tmp = Mage::helper('segment_analytics')->getDataCastAsBooleans($item);
27
  $params['products'][] = $tmp;
28
  }
29
 
30
- //too much information?
31
- //$block->setParams($info);
32
-
33
  //the serialized information
34
  $block->setParams($params);
35
-
36
  return $block;
37
  }
38
- }
4
  public function getBlock($block)
5
  {
6
  $params = $block->getParams();
7
+
8
  $info = Mage::getModel('sales/order_api')
9
  ->info($params['increment_id']);
10
+
11
  $params['total'] = (float) $info['grand_total'];
12
+ $params['revenue'] = (float) $info['subtotal'];
13
+ $params['status'] = $info['status'];
14
  $params['shipping'] = (float) $info['shipping_amount'];
15
  $params['tax'] = (float) $info['tax_amount'];
16
+ $params['discount'] = (-1 * (float) $info['discount_amount']);
17
  $params['products'] = array();
18
  foreach($info['items'] as $item)
19
  {
20
+ $tmp = array();
21
  $tmp['sku'] = $item['sku'];
22
+ $tmp['name'] = $item['name'];
23
  $tmp['price'] = (float) $item['price'];
24
  $tmp['quantity'] = (float) $item['qty_ordered'];
25
+ $tmp['product_id'] = (int) $item['product_id'];
26
 
 
 
27
  $params['products'][] = $tmp;
28
  }
29
 
30
+
 
 
31
  //the serialized information
32
  $block->setParams($params);
33
+
34
  return $block;
35
  }
36
+ }
app/code/community/Segment/Analytics/Model/Observer.php CHANGED
@@ -2,7 +2,7 @@
2
  class Segment_Analytics_Model_Observer
3
  {
4
  const CONTAINER_BLOCKNAME = 'segment_analytics_before_body_end';
5
-
6
  public function addContainerBlock($observer)
7
  {
8
  #Mage::Log($_SERVER['SCRIPT_URI']);
@@ -13,29 +13,29 @@ class Segment_Analytics_Model_Observer
13
  Mage::Log("No Layout Object in " . __METHOD__);
14
  return;
15
  }
16
-
17
  $before_body_end = $layout->getBlock('before_body_end');
18
  if(!$before_body_end)
19
  {
20
  Mage::Log("No before body end in " . __METHOD__);
21
  return;
22
  }
23
-
24
  if(!Mage::helper('segment_analytics')->isEnabled())
25
  {
26
  return;
27
  }
28
-
29
  $container = $layout->createBlock('core/text_list', self::CONTAINER_BLOCKNAME);
30
  $before_body_end->append($container);
31
- $front = Segment_Analytics_Model_Front_Controller::getInstance();
32
  $blocks = $front->getBlocks();
33
- // var_dump($blocks);
34
  foreach($blocks as $block)
35
  {
36
  if(!$block) { continue; }
37
  $items = $block = is_array($block) ? $block : array($block);
38
-
39
  foreach($items as $block)
40
  {
41
  $container->append($block);
@@ -46,157 +46,157 @@ class Segment_Analytics_Model_Observer
46
 
47
  /**
48
  * Adds the "always" items
49
- */
50
  public function addFrotnendScripts($observer)
51
  {
52
  $layout = $observer->getLayout();
53
  if(!$layout)
54
  {
55
  return;
56
- }
57
  if(!Mage::helper('segment_analytics')->isEnabled())
58
  {
59
  return;
60
- }
61
-
62
- $front = Segment_Analytics_Model_Front_Controller::getInstance();
63
- $front->addAction('init');
64
- $front->addAction('page');
65
  }
66
 
67
- public function loggedIn($observer)
68
  {
69
- $front = Segment_Analytics_Model_Front_Controller::getInstance();
70
  $front->addDeferredAction('alias');
71
  $front->addDeferredAction('identity');
72
  $front->addDeferredAction('customerloggedin');
73
- }
74
-
75
- public function loggedOut($observer)
76
  {
77
- $front = Segment_Analytics_Model_Front_Controller::getInstance();
78
  $front->addDeferredAction('customerloggedout', array(
79
  'customer'=>$this->_getCustomerData()
80
  ));
81
- }
82
-
83
  public function addToCart($observer)
84
  {
85
  $product = $observer->getProduct();
86
- $front = Segment_Analytics_Model_Front_Controller::getInstance();
87
  $front->addDeferredAction('addtocart',
88
  array('sku'=>$product->getSku())
89
- );
90
  }
91
-
92
  public function removeFromCart($observer)
93
  {
94
  $product = $observer->getQuoteItem()->getProduct();
95
- $front = Segment_Analytics_Model_Front_Controller::getInstance();
96
  $front->addDeferredAction('removefromcart',
97
  array('sku'=>$product->getSku())
98
- );
99
  }
100
-
101
  public function customerRegistered($observer)
102
  {
103
  $customer = $observer->getCustomer();
104
- $front = Segment_Analytics_Model_Front_Controller::getInstance();
105
  $front->addDeferredAction('customerregistered',
106
  array('customer_id'=>$customer->getEntityId())
107
- );
108
  }
109
-
110
  public function loadedSearch($observer)
111
  {
112
  $o = $observer->getDataObject();
113
  if(!$o){return;}
114
- $front = Segment_Analytics_Model_Front_Controller::getInstance();
115
  $front->addDeferredAction('searchedproducts',
116
  array('query'=>$o->getQueryText())
117
- );
118
  }
119
-
120
  public function categoryViewForFiltering($observer)
121
  {
122
  $action = $observer->getAction();
123
  if(!$action){ return; }
124
-
125
  $request = $action->getRequest();
126
  if(!$request) { return; }
127
-
128
  $params = $request->getParams();
129
-
130
- //use presense of "dir" to flag for filtering.
131
  //no need for an action handle check
132
  if(!array_key_exists('dir', $params))
133
  {
134
  return;
135
  }
136
-
137
- $front = Segment_Analytics_Model_Front_Controller::getInstance();
138
  $front->addDeferredAction('filteredproducts',
139
  array('params'=>$params)
140
- );
141
-
142
  }
143
-
144
  public function productView($observer)
145
  {
146
  $action = $observer->getAction();
147
  if(!$action){ return; }
148
-
149
  $request = $action->getRequest();
150
  if(!$request) { return; }
151
-
152
  $params = $request->getParams();
153
-
154
  if (!in_array($action->getFullActionName(), array('catalog_product_view')))
155
  {
156
  return;
157
- }
158
-
159
- $front = Segment_Analytics_Model_Front_Controller::getInstance();
160
  $front->addDeferredAction('viewedproduct',
161
  array('params'=>$params)
162
- );
163
  }
164
-
165
  public function favSaved($observer)
166
  {
167
- $front = Segment_Analytics_Model_Front_Controller::getInstance();
168
  $item = $observer->getData('data_object');
169
-
170
  if($item->getResourceName() == 'amlist/item')
171
  {
172
  $front->addDeferredAction('amlistfav',
173
  array('product_id'=>$item->getData('product_id'))
174
- );
175
  }
176
  }
177
-
178
  public function reviewView($observer)
179
  {
180
  $action = $observer->getAction();
181
  if(!$action){ return; }
182
-
183
  $request = $action->getRequest();
184
  if(!$request) { return; }
185
-
186
  $params = $request->getParams();
187
-
188
  if (!in_array($action->getFullActionName(), array('review_product_list')))
189
  {
190
  return;
191
  }
192
-
193
- $front = Segment_Analytics_Model_Front_Controller::getInstance();
194
  $front->addDeferredAction('viewedreviews',
195
  array('params'=>$params)
196
- );
197
-
198
  }
199
-
200
  public function newsletterSubscriber($observer)
201
  {
202
  $subscriber = $observer->getDataObject();
@@ -205,21 +205,21 @@ class Segment_Analytics_Model_Observer
205
  return;
206
  }
207
 
208
- $front = Segment_Analytics_Model_Front_Controller::getInstance();
209
  $front->addDeferredAction('subscribenewsletter',
210
  array('subscriber'=>$subscriber->getData())
211
- );
212
  }
213
-
214
  public function wishlistAddProduct($observer)
215
  {
216
  $product = $observer->getProduct();
217
  $wishlist = $observer->getWishlist();
218
-
219
- $front = Segment_Analytics_Model_Front_Controller::getInstance();
220
  $front->addDeferredAction('addedtowishlist',
221
  array('params'=>array('product_id'=>$product->getId()))
222
- );
223
 
224
  }
225
 
@@ -228,31 +228,31 @@ class Segment_Analytics_Model_Observer
228
  if(!Mage::helper('segment_analytics')->isEnabled())
229
  {
230
  return;
231
- }
232
-
233
  $action = $observer->getAction();
234
- if(!$action){ return; }
235
-
236
  $layout = Mage::getSingleton('core/layout');
237
-
238
  $content = $layout->getBlock('content');
239
  if(!$content) { return; }
240
-
241
  $content->append(
242
  $layout->createBlock('segment_analytics/template')
243
  ->setTemplate('segment_analytics/image-frontend.phtml')
244
  );
245
  }
246
-
247
  public function orderPlaced($observer)
248
  {
249
- $front = Segment_Analytics_Model_Front_Controller::getInstance();
250
  $front->addDeferredAction('orderplaced',
251
  array('params'=>array(
252
  'order_id'=>$observer->getOrder()->getId(),
253
  'increment_id'=>$observer->getOrder()->getIncrementId(),
254
  ))
255
- );
256
  }
257
 
258
  public function logBlockHtml($observer)
@@ -264,12 +264,12 @@ class Segment_Analytics_Model_Observer
264
 
265
  Mage::Log($observer->getTransport()->getHtml(), Zend_Log::INFO, 'segment.log');
266
  }
267
-
268
  public function addClickedShareJavascript($observer)
269
  {
270
  $action = $observer->getAction();
271
- if(!$action){ return; }
272
-
273
  if($action->getFullActionName() != 'catalog_product_view')
274
  {
275
  return;
@@ -282,23 +282,23 @@ class Segment_Analytics_Model_Observer
282
  {
283
  return;
284
  }
285
-
286
  $block = $layout->createBlock('segment_analytics/template')
287
  ->setTemplate('segment_analytics/share-frontend.phtml');
288
-
289
- $content->append($block);
290
  }
291
-
292
  public function addClickedReviewTabJavascript($observer)
293
  {
294
  $action = $observer->getAction();
295
- if(!$action){ return; }
296
-
297
  if($action->getFullActionName() != 'catalog_product_view')
298
  {
299
  return;
300
  }
301
-
302
  $layout = Mage::getSingleton('core/layout');
303
 
304
  $content = $layout->getBlock('content');
@@ -308,22 +308,22 @@ class Segment_Analytics_Model_Observer
308
  }
309
  $block = $layout->createBlock('segment_analytics/template')
310
  ->setTemplate('segment_analytics/review-frontend.phtml');
311
-
312
  $content->append($block);
313
  }
314
-
315
  protected function _getCustomer()
316
  {
317
- $customer = Mage::getSingleton('customer/session')->getCustomer();
318
-
319
  //pull entire customer, including eav attributes not initially populated
320
  $full_customer = Mage::getModel('customer/customer')->getCollection()
321
  ->addAttributeToSelect('*')->addFieldToFilter('entity_id', $customer->getId())
322
  ->getFirstItem();
323
-
324
  return $full_customer;
325
- }
326
-
327
  protected function _getCustomerData()
328
  {
329
  $customer = $this->_getCustomer();
2
  class Segment_Analytics_Model_Observer
3
  {
4
  const CONTAINER_BLOCKNAME = 'segment_analytics_before_body_end';
5
+
6
  public function addContainerBlock($observer)
7
  {
8
  #Mage::Log($_SERVER['SCRIPT_URI']);
13
  Mage::Log("No Layout Object in " . __METHOD__);
14
  return;
15
  }
16
+
17
  $before_body_end = $layout->getBlock('before_body_end');
18
  if(!$before_body_end)
19
  {
20
  Mage::Log("No before body end in " . __METHOD__);
21
  return;
22
  }
23
+
24
  if(!Mage::helper('segment_analytics')->isEnabled())
25
  {
26
  return;
27
  }
28
+
29
  $container = $layout->createBlock('core/text_list', self::CONTAINER_BLOCKNAME);
30
  $before_body_end->append($container);
31
+ $front = Segment_Analytics_Model_Front_Controller::getInstance();
32
  $blocks = $front->getBlocks();
33
+
34
  foreach($blocks as $block)
35
  {
36
  if(!$block) { continue; }
37
  $items = $block = is_array($block) ? $block : array($block);
38
+
39
  foreach($items as $block)
40
  {
41
  $container->append($block);
46
 
47
  /**
48
  * Adds the "always" items
49
+ */
50
  public function addFrotnendScripts($observer)
51
  {
52
  $layout = $observer->getLayout();
53
  if(!$layout)
54
  {
55
  return;
56
+ }
57
  if(!Mage::helper('segment_analytics')->isEnabled())
58
  {
59
  return;
60
+ }
61
+
62
+ $front = Segment_Analytics_Model_Front_Controller::getInstance();
63
+ $front->addAction('init');
64
+ $front->addAction('page');
65
  }
66
 
67
+ public function loggedIn($observer)
68
  {
69
+ $front = Segment_Analytics_Model_Front_Controller::getInstance();
70
  $front->addDeferredAction('alias');
71
  $front->addDeferredAction('identity');
72
  $front->addDeferredAction('customerloggedin');
73
+ }
74
+
75
+ public function loggedOut($observer)
76
  {
77
+ $front = Segment_Analytics_Model_Front_Controller::getInstance();
78
  $front->addDeferredAction('customerloggedout', array(
79
  'customer'=>$this->_getCustomerData()
80
  ));
81
+ }
82
+
83
  public function addToCart($observer)
84
  {
85
  $product = $observer->getProduct();
86
+ $front = Segment_Analytics_Model_Front_Controller::getInstance();
87
  $front->addDeferredAction('addtocart',
88
  array('sku'=>$product->getSku())
89
+ );
90
  }
91
+
92
  public function removeFromCart($observer)
93
  {
94
  $product = $observer->getQuoteItem()->getProduct();
95
+ $front = Segment_Analytics_Model_Front_Controller::getInstance();
96
  $front->addDeferredAction('removefromcart',
97
  array('sku'=>$product->getSku())
98
+ );
99
  }
100
+
101
  public function customerRegistered($observer)
102
  {
103
  $customer = $observer->getCustomer();
104
+ $front = Segment_Analytics_Model_Front_Controller::getInstance();
105
  $front->addDeferredAction('customerregistered',
106
  array('customer_id'=>$customer->getEntityId())
107
+ );
108
  }
109
+
110
  public function loadedSearch($observer)
111
  {
112
  $o = $observer->getDataObject();
113
  if(!$o){return;}
114
+ $front = Segment_Analytics_Model_Front_Controller::getInstance();
115
  $front->addDeferredAction('searchedproducts',
116
  array('query'=>$o->getQueryText())
117
+ );
118
  }
119
+
120
  public function categoryViewForFiltering($observer)
121
  {
122
  $action = $observer->getAction();
123
  if(!$action){ return; }
124
+
125
  $request = $action->getRequest();
126
  if(!$request) { return; }
127
+
128
  $params = $request->getParams();
129
+
130
+ //use presense of "dir" to flag for filtering.
131
  //no need for an action handle check
132
  if(!array_key_exists('dir', $params))
133
  {
134
  return;
135
  }
136
+
137
+ $front = Segment_Analytics_Model_Front_Controller::getInstance();
138
  $front->addDeferredAction('filteredproducts',
139
  array('params'=>$params)
140
+ );
141
+
142
  }
143
+
144
  public function productView($observer)
145
  {
146
  $action = $observer->getAction();
147
  if(!$action){ return; }
148
+
149
  $request = $action->getRequest();
150
  if(!$request) { return; }
151
+
152
  $params = $request->getParams();
153
+
154
  if (!in_array($action->getFullActionName(), array('catalog_product_view')))
155
  {
156
  return;
157
+ }
158
+
159
+ $front = Segment_Analytics_Model_Front_Controller::getInstance();
160
  $front->addDeferredAction('viewedproduct',
161
  array('params'=>$params)
162
+ );
163
  }
164
+
165
  public function favSaved($observer)
166
  {
167
+ $front = Segment_Analytics_Model_Front_Controller::getInstance();
168
  $item = $observer->getData('data_object');
169
+
170
  if($item->getResourceName() == 'amlist/item')
171
  {
172
  $front->addDeferredAction('amlistfav',
173
  array('product_id'=>$item->getData('product_id'))
174
+ );
175
  }
176
  }
177
+
178
  public function reviewView($observer)
179
  {
180
  $action = $observer->getAction();
181
  if(!$action){ return; }
182
+
183
  $request = $action->getRequest();
184
  if(!$request) { return; }
185
+
186
  $params = $request->getParams();
187
+
188
  if (!in_array($action->getFullActionName(), array('review_product_list')))
189
  {
190
  return;
191
  }
192
+
193
+ $front = Segment_Analytics_Model_Front_Controller::getInstance();
194
  $front->addDeferredAction('viewedreviews',
195
  array('params'=>$params)
196
+ );
197
+
198
  }
199
+
200
  public function newsletterSubscriber($observer)
201
  {
202
  $subscriber = $observer->getDataObject();
205
  return;
206
  }
207
 
208
+ $front = Segment_Analytics_Model_Front_Controller::getInstance();
209
  $front->addDeferredAction('subscribenewsletter',
210
  array('subscriber'=>$subscriber->getData())
211
+ );
212
  }
213
+
214
  public function wishlistAddProduct($observer)
215
  {
216
  $product = $observer->getProduct();
217
  $wishlist = $observer->getWishlist();
218
+
219
+ $front = Segment_Analytics_Model_Front_Controller::getInstance();
220
  $front->addDeferredAction('addedtowishlist',
221
  array('params'=>array('product_id'=>$product->getId()))
222
+ );
223
 
224
  }
225
 
228
  if(!Mage::helper('segment_analytics')->isEnabled())
229
  {
230
  return;
231
+ }
232
+
233
  $action = $observer->getAction();
234
+ if(!$action){ return; }
235
+
236
  $layout = Mage::getSingleton('core/layout');
237
+
238
  $content = $layout->getBlock('content');
239
  if(!$content) { return; }
240
+
241
  $content->append(
242
  $layout->createBlock('segment_analytics/template')
243
  ->setTemplate('segment_analytics/image-frontend.phtml')
244
  );
245
  }
246
+
247
  public function orderPlaced($observer)
248
  {
249
+ $front = Segment_Analytics_Model_Front_Controller::getInstance();
250
  $front->addDeferredAction('orderplaced',
251
  array('params'=>array(
252
  'order_id'=>$observer->getOrder()->getId(),
253
  'increment_id'=>$observer->getOrder()->getIncrementId(),
254
  ))
255
+ );
256
  }
257
 
258
  public function logBlockHtml($observer)
264
 
265
  Mage::Log($observer->getTransport()->getHtml(), Zend_Log::INFO, 'segment.log');
266
  }
267
+
268
  public function addClickedShareJavascript($observer)
269
  {
270
  $action = $observer->getAction();
271
+ if(!$action){ return; }
272
+
273
  if($action->getFullActionName() != 'catalog_product_view')
274
  {
275
  return;
282
  {
283
  return;
284
  }
285
+
286
  $block = $layout->createBlock('segment_analytics/template')
287
  ->setTemplate('segment_analytics/share-frontend.phtml');
288
+
289
+ $content->append($block);
290
  }
291
+
292
  public function addClickedReviewTabJavascript($observer)
293
  {
294
  $action = $observer->getAction();
295
+ if(!$action){ return; }
296
+
297
  if($action->getFullActionName() != 'catalog_product_view')
298
  {
299
  return;
300
  }
301
+
302
  $layout = Mage::getSingleton('core/layout');
303
 
304
  $content = $layout->getBlock('content');
308
  }
309
  $block = $layout->createBlock('segment_analytics/template')
310
  ->setTemplate('segment_analytics/review-frontend.phtml');
311
+
312
  $content->append($block);
313
  }
314
+
315
  protected function _getCustomer()
316
  {
317
+ $customer = Mage::getSingleton('customer/session')->getCustomer();
318
+
319
  //pull entire customer, including eav attributes not initially populated
320
  $full_customer = Mage::getModel('customer/customer')->getCollection()
321
  ->addAttributeToSelect('*')->addFieldToFilter('entity_id', $customer->getId())
322
  ->getFirstItem();
323
+
324
  return $full_customer;
325
+ }
326
+
327
  protected function _getCustomerData()
328
  {
329
  $customer = $this->_getCustomer();
app/code/community/Segment/Analytics/Model/Observer/Admin.php CHANGED
@@ -8,33 +8,23 @@ class Segment_Analytics_Model_Observer_Admin
8
  {
9
  return;
10
  }
11
-
12
  if($action->getRequest()->getParam('section') !== 'segment_analytics')
13
  {
14
  return;
15
  }
16
-
17
  $layout = Mage::getSingleton('core/layout');
18
  $content = $layout->getBlock('content');
19
-
20
  if(!$content)
21
  {
22
  return;
23
  }
24
-
25
  $json = new stdClass;
26
  $json->content = $layout->createBlock('adminhtml/template')
27
  ->setTemplate('segment_analytics/welcome.phtml')
28
  ->toHtml();
29
-
30
- $json = Mage::helper('core')->jsonEncode($json);
31
- $block = $layout->createBlock('adminhtml/template')
32
- ->setTemplate('segment_analytics/welcome-container.phtml')
33
- ->setContentJson($json);
34
-
35
- $content->append($block);
36
-
37
- // var_dump($content);
38
- // exit;
39
  }
40
  }
8
  {
9
  return;
10
  }
11
+
12
  if($action->getRequest()->getParam('section') !== 'segment_analytics')
13
  {
14
  return;
15
  }
16
+
17
  $layout = Mage::getSingleton('core/layout');
18
  $content = $layout->getBlock('content');
19
+
20
  if(!$content)
21
  {
22
  return;
23
  }
24
+
25
  $json = new stdClass;
26
  $json->content = $layout->createBlock('adminhtml/template')
27
  ->setTemplate('segment_analytics/welcome.phtml')
28
  ->toHtml();
 
 
 
 
 
 
 
 
 
 
29
  }
30
  }
app/code/community/Segment/Analytics/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Segment_Analytics>
5
- <version>1.0.0</version>
6
  </Segment_Analytics>
7
  </modules>
8
  <frontend>
@@ -327,4 +327,23 @@
327
  </segment_analytics>
328
  </helpers>
329
  </global>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
330
  </config>
2
  <config>
3
  <modules>
4
  <Segment_Analytics>
5
+ <version>1.1.0</version>
6
  </Segment_Analytics>
7
  </modules>
8
  <frontend>
327
  </segment_analytics>
328
  </helpers>
329
  </global>
330
+
331
+ <default>
332
+ <segment_analytics>
333
+ <options>
334
+ <customer_traits>
335
+ created_at
336
+ email
337
+ first_name'
338
+ last_name
339
+ middle_name
340
+ name
341
+ is_active
342
+ updated_at
343
+ total_orders
344
+ total_spent
345
+ </customer_traits>
346
+ </options>
347
+ </segment_analytics>
348
+ </default>
349
  </config>
app/code/community/Segment/Analytics/etc/system.xml CHANGED
@@ -28,7 +28,16 @@
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
- </write_key>
 
 
 
 
 
 
 
 
 
32
  </fields>
33
  </options>
34
  </groups>
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
+ </write_key>
32
+ <customer_traits>
33
+ <label>Customer Traits</label>
34
+ <comment>Which Magento Customer Data Fields to Send</comment>
35
+ <frontend_type>textarea</frontend_type>
36
+ <sort_order>20</sort_order>
37
+ <show_in_default>1</show_in_default>
38
+ <show_in_website>1</show_in_website>
39
+ <show_in_store>1</show_in_store>
40
+ </customer_traits>
41
  </fields>
42
  </options>
43
  </groups>
app/design/.DS_Store DELETED
Binary file
app/design/adminhtml/default/default/template/segment_analytics/welcome.phtml CHANGED
@@ -1,4 +1,4 @@
1
  <h3>Welcome</h3>
2
  <p>
3
- Intro text/html goes here.
4
  </p>
1
  <h3>Welcome</h3>
2
  <p>
3
+ Analytics for Magento is a Magento extension for Segment that lets you send data to any analytics tool you want without writing any code yourself!
4
  </p>
app/design/frontend/.DS_Store DELETED
Binary file
app/design/frontend/base/.DS_Store DELETED
Binary file
app/design/frontend/base/default/template/segment_analytics/page.phtml CHANGED
@@ -1,11 +1,11 @@
1
  <?php echo $this->renderDataAsJsonVar('segment_analytics_page');?>
2
- <script type="text/javascript">
3
  if(segment_analytics_page.category_names)
4
  {
5
- window.analytics.page(<?php echo $this->getPropertyAsJavascriptString('full_category_name');?>, <?php echo $this->getPropertyAsJavascriptString('full_category_name');?>,{},<?php echo $this->getContextJson(); ?>);
6
  }
7
  else
8
  {
9
  window.analytics.page(<?php echo $this->getPropertyAsJavascriptString('page_name');?>,{},<?php echo $this->getContextJson(); ?>);
10
- }
11
  </script>
1
  <?php echo $this->renderDataAsJsonVar('segment_analytics_page');?>
2
+ <script type="text/javascript">
3
  if(segment_analytics_page.category_names)
4
  {
5
+ window.analytics.page(<?php echo $this->getPropertyAsJavascriptString('full_category_name');?>, <?php echo $this->getPropertyAsJavascriptString('page_name');?>,{},<?php echo $this->getContextJson(); ?>);
6
  }
7
  else
8
  {
9
  window.analytics.page(<?php echo $this->getPropertyAsJavascriptString('page_name');?>,{},<?php echo $this->getContextJson(); ?>);
10
+ }
11
  </script>
app/etc/.DS_Store DELETED
Binary file
package.xml CHANGED
@@ -1,2 +1,2 @@
1
  <?xml version="1.0"?>
2
- <package><name>analytics</name><version>1.0.0</version><stability>stable</stability><license>MIT</license><channel>community</channel><extends></extends><summary>Segment lets you integrate 100+ analytics and marketing tools without writing any code yourself!</summary><description>Analytics for Magento is a Magento extension by Segment that lets you integrate any analytics or marketing tool you want with the flick of a switch! No code required. When you turn on the plugin, Segment automatically starts tracking important actions, like when users view items, add products to carts, and complete orders. To send this data along to your preferred tools, just go to the Segment control panel and toggle them on. This will save you months of time installing analytics.</description><notes></notes><authors><author><name>Segment</name><user>segmentio</user><email>friends@segment.io</email></author></authors><date>2014-08-27</date><time>14:16:20</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="code"><dir name="community"><dir name="Segment"><dir name="Analytics"><dir name="Block"><file name="Json.php" hash="77a1bf5dc11b0379bac45ffe92503920"/><file name="Template.php" hash="ad6f341d5288024dadcfa052b94f1cc5"/></dir><dir name="controllers"><file name="IndexController.php" hash="f25a06d702a86f32d0e3667b7a52e51c"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a4f61645101a34f67e08215a2a8c2bb1"/><file name="config.xml" hash="5b7a9e4d71e63f13b72eea5a8c584aca"/><file name="system.xml" hash="2409544d3ed47080d92e0f1fa6462844"/></dir><dir name="Helper"><file name="Data.php" hash="1f9dbac5666d28ae93dc4a78ec491eec"/></dir><dir name="Model"><file name="Observer.php" hash="5d7dec868e794dfbbfc18373adaa19bd"/><file name="Session.php" hash="b704f5a8e83a1e88710cce75c14ca8b2"/><dir name="Controller"><file name="Addedtowishlist.php" hash="d7554a3dfeba4389403da77cd8b9b577"/><file name="Addtocart.php" hash="0ed8cda5125f80e3adb88092ba98c010"/><file name="Alias.php" hash="01957c9ecb7bd18ebbf6b683aa1e26d8"/><file name="Amlistfav.php" hash="77c241aeb10e847809c261fb987ea231"/><file name="Base.php" hash="dbd5d3c31ca986fab5874ba436d92a0a"/><file name="Customerloggedin.php" hash="b90cac939fb3c2cf26bbd7ebc21b0d15"/><file name="Customerloggedout.php" hash="b17fa8edb2705a7a95f1e6d1211d2fb6"/><file name="Customerregistered.php" hash="bab7b09c54e80aea887b762730bace85"/><file name="Filteredproducts.php" hash="d9f5aa27812bcb2707765c8295daa33d"/><file name="Identity.php" hash="36f14a9431cabac05bbf6d3303b9b298"/><file name="Init.php" hash="880bd8d529a07f6a04616e2c98664fe8"/><file name="Layerednavfilter.php" hash="e687405d3e661929fd8ddaf07d1a4e34"/><file name="Orderplaced.php" hash="9484057c4f72c550d8cc9a4ea9d8ca5d"/><file name="Page.php" hash="1877a140c41d0fffa30f691fe19ca807"/><file name="Removefromcart.php" hash="73728c33dfa7e422ce052f260dc075d1"/><file name="Reviewedproduct.php" hash="7e5b66d243c7ac56f9e2e1cfc1a4778a"/><file name="Searchedproducts.php" hash="b7cbb325af5125831577be64c38d38b7"/><file name="Subscribenewsletter.php" hash="53bfffba6959a93f815aae40c90a12a5"/><file name="Viewedproduct.php" hash="eb7c8ad13434f25ce1b5b51583308e4a"/><file name="Viewedreviews.php" hash="154c63d724e842afdf8aa018bd551146"/></dir><dir name="Front"><file name="Controller.php" hash="15ad3f72050f44af9bf1eef6311221a4"/></dir><dir name="Observer"><file name="Admin.php" hash="0f5c6957505dc3135ff23a2b4bb005ff"/><file name="Customer.php" hash="1268ea7f63cae14b688d28889f83d1d4"/><file name="Layered.php" hash="df5693db18782d72e12c8712f20b1031"/><file name="Review.php" hash="8ae59c8446076c1e8876fff3e0a15edf"/></dir><dir name="Query"><file name="Totalpurchased.php" hash="ffb2adc54cfb045d2206a5637cb1c980"/><file name="Totalspent.php" hash="38981ad7ad5aa871d158a1f57062a123"/></dir><dir name="Resource"><file name="Setup.php" hash="05b44bd356c73b475c570b4f39858847"/></dir></dir><dir name="sql"><dir name="segment_analytics_setup"><file name="install-0.0.2.php" hash="6ed374aa1a926ea2da213b7b48688b81"/><file name="upgrade-0.0.2-0.0.3.php" hash="4f5832020a9db0fee5311ed0bfe06df9"/></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="segment_analytics"><file name="welcome-container.phtml" hash="675be69e78118174cc1913bdee1f5eb0"/><file name="welcome.phtml" hash="8a04ca3a7ae4e1c652d64a3486e52704"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="segment_analytics"><file name="addedtowishlist.phtml" hash="510ea8734d75965f337fb7196ea86591"/><file name="addtocart.phtml" hash="fb095200ccc633a634acee8e034915e8"/><file name="alias.phtml" hash="3e2f76491ca3870b7145d95613489515"/><file name="amlistfav.phtml" hash="8950bdf6d8bf6a758c3a27261dbcfeea"/><file name="customerloggedin.phtml" hash="b6459b72a3af74500c3e0fd600b9b66d"/><file name="customerloggedout.phtml" hash="7b45941a2b39f3a3bb66180b511f073e"/><file name="customerregistered.phtml" hash="2ae49ebdc261a2ac12666e3f8c88007b"/><file name="filteredproducts.phtml" hash="7bfea3e857aa5cf94d80ac560569215c"/><file name="identity.phtml" hash="9fba8707a755dad51fb4bb2ff66dce15"/><file name="image-frontend.phtml" hash="a82ed48dfcfef10b4e78a03872bda182"/><file name="init.phtml" hash="50ba787142268624339c493b36f057f0"/><file name="layerednavfilter.phtml" hash="c3f57076a76864e8d7c1f939de687b00"/><file name="orderplaced.phtml" hash="1cbe1c7731bb30848bf0cf1204c6e895"/><file name="page.phtml" hash="f4d6d0b78e49e673627bb3477f9fa32a"/><file name="removefromcart.phtml" hash="302e80b60e4fdb78468696fbb728d4e5"/><file name="review-frontend.phtml" hash="de336d1ad12ffe5cf041c041590c01a1"/><file name="reviewedproduct.phtml" hash="322faa7da6e7b93e236ebff643dd45c3"/><file name="searchedproducts.phtml" hash="bbe966c2b2069ab4cacc204435686c6f"/><file name="share-frontend.phtml" hash="d8a2f53dfb00c271ea653861df7caacc"/><file name="subscribenewsletter.phtml" hash="796e37fa23ec051fd8ff62e80ddb8301"/><file name="viewedproduct.phtml" hash="63948db8120cffa034f291fb295bb1ad"/><file name="viewedreviews.phtml" hash="2e433131130d2f7580f25e3b3d3b03c7"/></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Segment_Analytics.xml" hash="b594b15ca2fb8187ab8fb49673c91e03"/></dir></dir></dir></target></contents></package>
1
  <?xml version="1.0"?>
2
+ <package><name>analytics</name><version>1.1.0</version><stability>stable</stability><license>MIT</license><channel>community</channel><extends></extends><summary>Segment lets you integrate 100+ analytics and marketing tools without writing any code yourself!</summary><description>Analytics for Magento is a Magento extension by Segment that lets you integrate any analytics or marketing tool you want with the flick of a switch! No code required. When you turn on the plugin, Segment automatically starts tracking important actions, like when users view items, add products to carts, and complete orders. To send this data along to your preferred tools, just go to the Segment control panel and toggle them on. This will save you months of time installing analytics.</description><notes></notes><authors><author><name>Segment</name><user>segmentio</user><email>friends@segment.io</email></author></authors><date>2015-08-20</date><time>15:00:31</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="code"><dir name="community"><dir name="Segment"><dir name="Analytics"><dir name="Block"><file name="Json.php" hash="77a1bf5dc11b0379bac45ffe92503920"/><file name="Template.php" hash="ad6f341d5288024dadcfa052b94f1cc5"/></dir><dir name="controllers"><file name="IndexController.php" hash="f25a06d702a86f32d0e3667b7a52e51c"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a4f61645101a34f67e08215a2a8c2bb1"/><file name="config.xml" hash="20f3e92e27f0f4ff58085b5fe9e1904c"/><file name="system.xml" hash="da4f331d72154946bb44a1e270d2d51d"/></dir><dir name="Helper"><file name="Data.php" hash="85d190c0c61f47325011314e57814f00"/></dir><dir name="Model"><file name="Observer.php" hash="e901cf844d7f4cd1cd25dd0cef7917ba"/><file name="Session.php" hash="b704f5a8e83a1e88710cce75c14ca8b2"/><dir name="Controller"><file name="Addedtowishlist.php" hash="d7554a3dfeba4389403da77cd8b9b577"/><file name="Addtocart.php" hash="0ed8cda5125f80e3adb88092ba98c010"/><file name="Alias.php" hash="01957c9ecb7bd18ebbf6b683aa1e26d8"/><file name="Amlistfav.php" hash="77c241aeb10e847809c261fb987ea231"/><file name="Base.php" hash="dbd5d3c31ca986fab5874ba436d92a0a"/><file name="Customerloggedin.php" hash="b90cac939fb3c2cf26bbd7ebc21b0d15"/><file name="Customerloggedout.php" hash="b17fa8edb2705a7a95f1e6d1211d2fb6"/><file name="Customerregistered.php" hash="bab7b09c54e80aea887b762730bace85"/><file name="Filteredproducts.php" hash="d9f5aa27812bcb2707765c8295daa33d"/><file name="Identity.php" hash="72af420e6ae1504fb0a50802a48b5aea"/><file name="Init.php" hash="880bd8d529a07f6a04616e2c98664fe8"/><file name="Layerednavfilter.php" hash="e687405d3e661929fd8ddaf07d1a4e34"/><file name="Orderplaced.php" hash="184d0591c167a9b134d43e7cd39df3cf"/><file name="Page.php" hash="1877a140c41d0fffa30f691fe19ca807"/><file name="Removefromcart.php" hash="73728c33dfa7e422ce052f260dc075d1"/><file name="Reviewedproduct.php" hash="7e5b66d243c7ac56f9e2e1cfc1a4778a"/><file name="Searchedproducts.php" hash="b7cbb325af5125831577be64c38d38b7"/><file name="Subscribenewsletter.php" hash="53bfffba6959a93f815aae40c90a12a5"/><file name="Viewedproduct.php" hash="eb7c8ad13434f25ce1b5b51583308e4a"/><file name="Viewedreviews.php" hash="154c63d724e842afdf8aa018bd551146"/></dir><dir name="Front"><file name="Controller.php" hash="15ad3f72050f44af9bf1eef6311221a4"/></dir><dir name="Observer"><file name="Admin.php" hash="79fdf309e9be6cfa414c76aabff01d03"/><file name="Customer.php" hash="1268ea7f63cae14b688d28889f83d1d4"/><file name="Layered.php" hash="df5693db18782d72e12c8712f20b1031"/><file name="Review.php" hash="8ae59c8446076c1e8876fff3e0a15edf"/></dir><dir name="Query"><file name="Totalpurchased.php" hash="ffb2adc54cfb045d2206a5637cb1c980"/><file name="Totalspent.php" hash="38981ad7ad5aa871d158a1f57062a123"/></dir><dir name="Resource"><file name="Setup.php" hash="05b44bd356c73b475c570b4f39858847"/></dir></dir><dir name="sql"><dir name="segment_analytics_setup"><file name="install-0.0.2.php" hash="6ed374aa1a926ea2da213b7b48688b81"/><file name="upgrade-0.0.2-0.0.3.php" hash="4f5832020a9db0fee5311ed0bfe06df9"/></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="segment_analytics"><file name="welcome-container.phtml" hash="675be69e78118174cc1913bdee1f5eb0"/><file name="welcome.phtml" hash="0a68687ebe8c5ca880387489f1ea2670"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="segment_analytics"><file name="addedtowishlist.phtml" hash="510ea8734d75965f337fb7196ea86591"/><file name="addtocart.phtml" hash="fb095200ccc633a634acee8e034915e8"/><file name="alias.phtml" hash="3e2f76491ca3870b7145d95613489515"/><file name="amlistfav.phtml" hash="8950bdf6d8bf6a758c3a27261dbcfeea"/><file name="customerloggedin.phtml" hash="b6459b72a3af74500c3e0fd600b9b66d"/><file name="customerloggedout.phtml" hash="7b45941a2b39f3a3bb66180b511f073e"/><file name="customerregistered.phtml" hash="2ae49ebdc261a2ac12666e3f8c88007b"/><file name="filteredproducts.phtml" hash="7bfea3e857aa5cf94d80ac560569215c"/><file name="identity.phtml" hash="9fba8707a755dad51fb4bb2ff66dce15"/><file name="image-frontend.phtml" hash="a82ed48dfcfef10b4e78a03872bda182"/><file name="init.phtml" hash="50ba787142268624339c493b36f057f0"/><file name="layerednavfilter.phtml" hash="c3f57076a76864e8d7c1f939de687b00"/><file name="orderplaced.phtml" hash="1cbe1c7731bb30848bf0cf1204c6e895"/><file name="page.phtml" hash="e50ce55425f8b2725ae22a675e10d575"/><file name="removefromcart.phtml" hash="302e80b60e4fdb78468696fbb728d4e5"/><file name="review-frontend.phtml" hash="de336d1ad12ffe5cf041c041590c01a1"/><file name="reviewedproduct.phtml" hash="322faa7da6e7b93e236ebff643dd45c3"/><file name="searchedproducts.phtml" hash="bbe966c2b2069ab4cacc204435686c6f"/><file name="share-frontend.phtml" hash="d8a2f53dfb00c271ea653861df7caacc"/><file name="subscribenewsletter.phtml" hash="796e37fa23ec051fd8ff62e80ddb8301"/><file name="viewedproduct.phtml" hash="63948db8120cffa034f291fb295bb1ad"/><file name="viewedreviews.phtml" hash="2e433131130d2f7580f25e3b3d3b03c7"/></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Segment_Analytics.xml" hash="b594b15ca2fb8187ab8fb49673c91e03"/></dir></dir></dir></target></contents></package>