Version Notes
Initial Public Release
Download this release
Release Info
Developer | Woopra |
Extension | Woopra_Analytics_Event_And_Visitor_Tracking |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/community/Woopra/Analytics/Block/Script.php +299 -0
- app/code/community/Woopra/Analytics/Helper/Data.php +253 -0
- app/code/community/Woopra/Analytics/Model/Observer.php +350 -0
- app/code/community/Woopra/Analytics/etc/config.xml +156 -0
- app/code/community/Woopra/Analytics/etc/system.xml +628 -0
- app/design/frontend/base/default/layout/woopra.xml +18 -0
- app/design/frontend/base/default/template/woopra/script.phtml +188 -0
- app/etc/modules/Woopra_Analytics.xml +19 -0
- package.xml +28 -0
app/code/community/Woopra/Analytics/Block/Script.php
ADDED
@@ -0,0 +1,299 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Woopra Module for Magento
|
4 |
+
*
|
5 |
+
* @package Woopra_Analytics
|
6 |
+
* @author K3Live for Woopra
|
7 |
+
* @copyright Copyright (c) 2013 Woopra (http://www.woopra.com/)
|
8 |
+
* @license Open Software License (OSL 3.0)
|
9 |
+
*/
|
10 |
+
|
11 |
+
class Woopra_Analytics_Block_Script extends Mage_Core_Block_Template
|
12 |
+
{
|
13 |
+
/*
|
14 |
+
* Constructor method
|
15 |
+
*
|
16 |
+
* @access public
|
17 |
+
* @param null
|
18 |
+
* @return null
|
19 |
+
*/
|
20 |
+
public function _construct()
|
21 |
+
{
|
22 |
+
parent::_construct();
|
23 |
+
|
24 |
+
// Decide whether the Woopra Module has been activated
|
25 |
+
$website_id = Mage::helper('woopra')->getApiKey();
|
26 |
+
if(Mage::helper('woopra')->getEnabled() == true) {
|
27 |
+
$this->setTemplate('woopra/script.phtml');
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
/*
|
32 |
+
* Helper method to get data to show in Woopra
|
33 |
+
*
|
34 |
+
* @access public
|
35 |
+
* @param string $key
|
36 |
+
* @return string
|
37 |
+
*/
|
38 |
+
public function getSetting($key = null)
|
39 |
+
{
|
40 |
+
static $data;
|
41 |
+
if(empty($data)) {
|
42 |
+
$data = array(
|
43 |
+
'enabled' => Mage::helper('woopra')->getEnabled(),
|
44 |
+
'test' => Mage::helper('woopra')->getTest(),
|
45 |
+
'visitor_timeout' => Mage::helper('woopra')->getVistorTimeout(),
|
46 |
+
'track_url_parameters' => Mage::helper('woopra')->getTrackUrlParameters(),
|
47 |
+
'hostname' => Mage::helper('woopra')->getHostname(),
|
48 |
+
'subdomain' => Mage::helper('woopra')->getSubdomain(),
|
49 |
+
'tracking_cookie_expiration' => Mage::helper('woopra')->getTrackingCookieExpiration(),
|
50 |
+
'tracking_cookie_name' => Mage::helper('woopra')->getTrackingCookieName(),
|
51 |
+
'tracking_cookie_domain' => Mage::helper('woopra')->getTrackingCookieDomain(),
|
52 |
+
'tracking_cookie_path' => Mage::helper('woopra')->getTrackingCookiePath(),
|
53 |
+
'ping' => Mage::helper('woopra')->getPing(),
|
54 |
+
'ping_interval' => Mage::helper('woopra')->getPingInterval(),
|
55 |
+
'download_tracking' => Mage::helper('woopra')->getDownloadTracking(),
|
56 |
+
'download_tracking_pause' => Mage::helper('woopra')->getDownloadTrackingPause(),
|
57 |
+
'outgoing_tracking' => Mage::helper('woopra')->getOutgoingTracking(),
|
58 |
+
'outgoing_tracking_pause' => Mage::helper('woopra')->getOutgoingTrackingPause(),
|
59 |
+
'url' => $_SERVER['HTTP_HOST']
|
60 |
+
);
|
61 |
+
|
62 |
+
// Add customer records
|
63 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
64 |
+
if(!empty($customer)) {
|
65 |
+
//Customer Name
|
66 |
+
if ($customer->getName() != ' ' && Mage::helper('woopra')->getCustomerName() != NULL) {
|
67 |
+
$data['customer_name'] = $customer->getName();
|
68 |
+
}
|
69 |
+
//Customer Email
|
70 |
+
if (Mage::helper('woopra')->getCustomerEmail() != NULL) {
|
71 |
+
$data['customer_email'] = $customer->getEmail();
|
72 |
+
}
|
73 |
+
|
74 |
+
//Customer Address Array
|
75 |
+
$address = $customer->getDefaultBillingAddress();
|
76 |
+
if(!empty($address)) {
|
77 |
+
$address = $customer->getDefaultShippingAddress();
|
78 |
+
}
|
79 |
+
if(!empty($address)) {
|
80 |
+
//Customer Company
|
81 |
+
if (Mage::helper('woopra')->getCustomerCompany() != NULL) {
|
82 |
+
$data['customer_company'] = $address->getCompany();
|
83 |
+
}
|
84 |
+
//Customer Location
|
85 |
+
if (Mage::helper('woopra')->getCustomerLocation() != NULL) {
|
86 |
+
$data['customer_location'] = $address->getCity() . ', ' . $address->getRegion() . ' (' . $address->getCountryId() . ')';
|
87 |
+
}
|
88 |
+
//Customer Phone
|
89 |
+
if (Mage::helper('woopra')->getCustomerPhone() != NULL) {
|
90 |
+
$data['customer_phone'] = $address->getTelephone();
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
//Customer Group
|
95 |
+
if (Mage::helper('woopra')->getCustomerGroup() != NULL) {
|
96 |
+
$groupId = Mage::getSingleton('customer/session')->getCustomerGroupId();
|
97 |
+
$group = Mage::getModel('customer/group')->load($groupId);
|
98 |
+
$data['customer_group'] = $group->getCode();
|
99 |
+
}
|
100 |
+
|
101 |
+
//Customer Account Creation Date
|
102 |
+
if (Mage::helper('woopra')->getCustomerCreateDate() != NULL) {
|
103 |
+
$date = Mage::app()->getLocale()->storeDate(
|
104 |
+
$customer->getStoreId(),
|
105 |
+
$customer->getCreatedAtTimestamp(),
|
106 |
+
true
|
107 |
+
);
|
108 |
+
if(strtotime($date) != Mage::app()->getLocale()->storeTimeStamp()) {
|
109 |
+
$data['customer_create_date'] = Mage::helper('core')->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true);
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
//Customer Lifetime Array
|
114 |
+
$customerTotals = Mage::getResourceModel('sales/sale_collection')
|
115 |
+
->setCustomerFilter($customer)
|
116 |
+
->load()
|
117 |
+
->getTotals();
|
118 |
+
//Customer Lifetime Sales Count
|
119 |
+
if (Mage::helper('woopra')->getCustomerLifetimeSales() != NULL && $data['group'] != 'NOT LOGGED IN') {
|
120 |
+
$data['customer_lifetime_sales'] = round($customerTotals->getLifetime(), 2);
|
121 |
+
}
|
122 |
+
//Customer Lifetime Orders
|
123 |
+
if (Mage::helper('woopra')->getCustomerNumberOrders() != NULL && $data['group'] != 'NOT LOGGED IN') {
|
124 |
+
$data['customer_number_orders'] = $customerTotals->getNumOrders();
|
125 |
+
}
|
126 |
+
|
127 |
+
//Customer Wishlist Array
|
128 |
+
$wishList = Mage::getSingleton('wishlist/wishlist')->loadByCustomer($customer);
|
129 |
+
$wishListItemCollection = $wishList->getItemCollection();
|
130 |
+
foreach ($wishListItemCollection as $item) {
|
131 |
+
$product = $item->getProduct();
|
132 |
+
$wishlistItems = $wishlistItems + 1;
|
133 |
+
$wishListTotal = $wishListTotal + $product->getPrice();
|
134 |
+
}
|
135 |
+
//Wishlist Items Count
|
136 |
+
if (Mage::helper('woopra')->getCustomerWishlistItems() != NULL) {
|
137 |
+
$data['customer_wishlist_items'] = $wishlistItems;
|
138 |
+
}
|
139 |
+
//Wishlist Total
|
140 |
+
if (Mage::helper('woopra')->getCustomerWishlistTotal() != NULL) {
|
141 |
+
$data['customer_wishlist_total'] = $wishListTotal;
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
//Cart Items Count
|
146 |
+
if (Mage::helper('woopra')->getCustomerCartItems() != NULL) {
|
147 |
+
$data['customer_cart_items'] = Mage::helper('checkout/cart')->getCart()->getItemsCount();
|
148 |
+
}
|
149 |
+
//Cart Total
|
150 |
+
if (Mage::helper('woopra')->getCustomerCartTotal() != NULL) {
|
151 |
+
$data['customer_cart_total'] = round(Mage::getSingleton('checkout/session')->getQuote()->getBaseSubtotal(), 2);
|
152 |
+
}
|
153 |
+
//Current Catagory
|
154 |
+
$currentCategory = Mage::registry('current_category');
|
155 |
+
if(!empty($currentCategory)) {
|
156 |
+
$data['category'] = $currentCategory->getName();
|
157 |
+
}
|
158 |
+
//Current Product
|
159 |
+
$currentProduct = Mage::registry('current_product');
|
160 |
+
if(!empty($currentProduct)) {
|
161 |
+
$data['product_sku'] = $currentProduct->getSku();
|
162 |
+
$data['product_price'] = strip_tags(Mage::app()->getStore()->formatPrice($currentProduct->getPrice()));
|
163 |
+
}
|
164 |
+
|
165 |
+
//Newsletter changes
|
166 |
+
if (Mage::helper('woopra')->getNewsletterSubscribed() != NULL) {
|
167 |
+
$data['woopra_subscriber_changed'] = Mage::getSingleton('core/session')->getData('woopra_subscriber_changed', true);
|
168 |
+
$data['woopra_subscriber_status'] = Mage::getSingleton('core/session')->getData('woopra_subscriber_status', true);
|
169 |
+
$data['woopra_subscriber_email'] = Mage::getSingleton('core/session')->getData('woopra_subscriber_email', true);
|
170 |
+
//Mage::log($data['woopra_subscriber_changed'] ." | ". $data['woopra_subscriber_status'] ." | ". $data['woopra_subscriber_email'], null, 'woopra.log');
|
171 |
+
}
|
172 |
+
|
173 |
+
//Contacts Form
|
174 |
+
if (Mage::helper('woopra')->getContactFormSent() != NULL) {
|
175 |
+
$data['woopra_contacts_index_post'] = Mage::getSingleton('core/session')->getData('woopra_contacts_index_post', true);
|
176 |
+
$data['woopra_contacts_name'] = Mage::getSingleton('core/session')->getData('woopra_contacts_name', true);
|
177 |
+
$data['woopra_contacts_email'] = Mage::getSingleton('core/session')->getData('woopra_contacts_email', true);
|
178 |
+
$data['woopra_contacts_telephone'] = Mage::getSingleton('core/session')->getData('woopra_contacts_telephone', true);
|
179 |
+
$data['woopra_contacts_comment'] = Mage::getSingleton('core/session')->getData('woopra_contacts_comment', true);
|
180 |
+
}
|
181 |
+
|
182 |
+
//Cart/Wishlist/Compare Add/Remove
|
183 |
+
$data['woopra_cart_wishlist_trigger'] = Mage::getSingleton('core/session')->getData('woopra_cart_wishlist_trigger', true);
|
184 |
+
$data['woopra_cart_wishlist_status'] = Mage::getSingleton('core/session')->getData('woopra_cart_wishlist_status', true);
|
185 |
+
$data['woopra_cart_wishlist_name'] = Mage::getSingleton('core/session')->getData('woopra_cart_wishlist_name', true);
|
186 |
+
$data['woopra_cart_wishlist_sku'] = Mage::getSingleton('core/session')->getData('woopra_cart_wishlist_sku', true);
|
187 |
+
$data['woopra_cart_wishlist_price'] = Mage::getSingleton('core/session')->getData('woopra_cart_wishlist_price', true);
|
188 |
+
|
189 |
+
//Site Search
|
190 |
+
if (Mage::helper('woopra')->getCatalogSearch() != NULL) {
|
191 |
+
$data['woopra_search_name'] = Mage::helper('woopra')->getCatalogSearch();
|
192 |
+
$data['woopra_search_trigger'] = Mage::getSingleton('core/session')->getData('woopra_search_trigger', true);
|
193 |
+
$data['woopra_search_keywords'] = Mage::getSingleton('core/session')->getData('woopra_search_keywords', true);
|
194 |
+
}
|
195 |
+
|
196 |
+
//Create Account
|
197 |
+
if (Mage::helper('woopra')->getCustomerCreateAccount() != NULL) {
|
198 |
+
$data['woopra_create_account_trigger'] = Mage::getSingleton('core/session')->getData('woopra_create_account_trigger', true);
|
199 |
+
}
|
200 |
+
|
201 |
+
//Create Account Success
|
202 |
+
if (Mage::helper('woopra')->getCustomerCreateAccountSuccess() != NULL) {
|
203 |
+
$data['woopra_create_account_success_trigger'] = Mage::getSingleton('core/session')->getData('woopra_create_account_success_trigger', true);
|
204 |
+
}
|
205 |
+
|
206 |
+
//Checkout Trigger
|
207 |
+
if (Mage::helper('woopra')->getCheckoutBillingAddress() != NULL) {
|
208 |
+
$data['woopra_checkout_trigger'] = Mage::getSingleton('core/session')->getData('woopra_checkout_trigger', true);
|
209 |
+
}
|
210 |
+
|
211 |
+
//Checkout Success
|
212 |
+
if (Mage::helper('woopra')->getCheckoutSuccess() != NULL) {
|
213 |
+
$data['woopra_checkout_payment_method'] = Mage::getSingleton('core/session')->getData('woopra_checkout_payment_method', true);
|
214 |
+
$data['woopra_checkout_payment_cc_type'] = Mage::getSingleton('core/session')->getData('woopra_checkout_payment_cc_type', true);
|
215 |
+
$data['woopra_checkout_success_trigger'] = Mage::getSingleton('core/session')->getData('woopra_checkout_success_trigger', true);
|
216 |
+
$data['woopra_checkout_success_coupon_code'] = Mage::getSingleton('core/session')->getData('woopra_checkout_success_coupon_code', true);
|
217 |
+
$data['woopra_checkout_success_discount_amount'] = Mage::getSingleton('core/session')->getData('woopra_checkout_success_discount_amount', true);
|
218 |
+
$data['woopra_checkout_success_order_id'] = Mage::getSingleton('core/session')->getData('woopra_checkout_success_order_id', true);
|
219 |
+
$data['woopra_checkout_success_order_subtotal'] = Mage::getSingleton('core/session')->getData('woopra_checkout_success_order_subtotal', true);
|
220 |
+
$data['woopra_checkout_success_order_total'] = Mage::getSingleton('core/session')->getData('woopra_checkout_success_order_total', true);
|
221 |
+
$data['woopra_checkout_success_order_weight'] = Mage::getSingleton('core/session')->getData('woopra_checkout_success_order_weight', true);
|
222 |
+
$data['woopra_checkout_success_shipping_amount'] = Mage::getSingleton('core/session')->getData('woopra_checkout_success_shipping_amount', true);
|
223 |
+
$data['woopra_checkout_success_shipping_description'] = Mage::getSingleton('core/session')->getData('woopra_checkout_success_shipping_description', true);
|
224 |
+
$data['woopra_checkout_success_total_items_ordered'] = Mage::getSingleton('core/session')->getData('woopra_checkout_success_total_items_ordered', true);
|
225 |
+
$data['woopra_checkout_success_profit'] = Mage::getSingleton('core/session')->getData('woopra_checkout_success_profit', true);
|
226 |
+
}
|
227 |
+
|
228 |
+
//CMS No Route
|
229 |
+
if (Mage::helper('woopra')->getCmsNoRoute() != NULL) {
|
230 |
+
$data['woopra_cms_noroute_trigger'] = Mage::getSingleton('core/session')->getData('woopra_cms_noroute_trigger', true);
|
231 |
+
$data['woopra_cms_noroute_path'] = Mage::getSingleton('core/session')->getData('woopra_cms_noroute_path', true);
|
232 |
+
$data['woopra_cms_noroute_url'] = Mage::helper('core/url')->getCurrentUrl();
|
233 |
+
}
|
234 |
+
|
235 |
+
//Coupon Code
|
236 |
+
if (Mage::helper('woopra')->getCouponCodeAdded() != NULL) {
|
237 |
+
$data['woopra_coupon_code_trigger'] = Mage::getSingleton('core/session')->getData('woopra_coupon_code_trigger', true);
|
238 |
+
$data['woopra_coupon_code_status'] = Mage::getSingleton('core/session')->getData('woopra_coupon_code_status', true);
|
239 |
+
$data['woopra_coupon_code'] = Mage::getSingleton('core/session')->getData('woopra_coupon_code', true);
|
240 |
+
$data['woopra_coupon_code_validity'] = Mage::getSingleton('core/session')->getData('woopra_coupon_code_validity', true);
|
241 |
+
$data['woopra_coupon_code_active'] = Mage::getSingleton('core/session')->getData('woopra_coupon_code_active', true);
|
242 |
+
$data['woopra_coupon_code_name'] = Mage::getSingleton('core/session')->getData('woopra_coupon_code_name', true);
|
243 |
+
}
|
244 |
+
|
245 |
+
//Login / Logout Trigger
|
246 |
+
if (Mage::helper('woopra')->getCustomerLogin() != NULL) {
|
247 |
+
$data['woopra_login_logout_trigger'] = Mage::getSingleton('core/session')->getData('woopra_login_logout_trigger', true);
|
248 |
+
$data['woopra_login_logout_status'] = Mage::getSingleton('core/session')->getData('woopra_login_logout_status', true);
|
249 |
+
}
|
250 |
+
|
251 |
+
//Forgot Password
|
252 |
+
if (Mage::helper('woopra')->getForgotPassword() != NULL) {
|
253 |
+
$data['woopra_forgot_password_trigger'] = Mage::getSingleton('core/session')->getData('woopra_forgot_password_trigger', true);
|
254 |
+
$data['woopra_forgot_password_email'] = Mage::getSingleton('core/session')->getData('woopra_forgot_password_email', true);
|
255 |
+
}
|
256 |
+
|
257 |
+
//Changed Password
|
258 |
+
if (Mage::helper('woopra')->getChangedPassword() != NULL) {
|
259 |
+
$data['woopra_password_changed_trigger'] = Mage::getSingleton('core/session')->getData('woopra_password_changed_trigger', true);
|
260 |
+
}
|
261 |
+
|
262 |
+
//Product Tag Added
|
263 |
+
if (Mage::helper('woopra')->getProductTagAdded() != NULL) {
|
264 |
+
$data['woopra_product_tag_added_trigger'] = Mage::getSingleton('core/session')->getData('woopra_product_tag_added_trigger', true);
|
265 |
+
$data['woopra_product_tag_name'] = Mage::getSingleton('core/session')->getData('woopra_product_tag_name', true);
|
266 |
+
}
|
267 |
+
|
268 |
+
//Poll Vote
|
269 |
+
if (Mage::helper('woopra')->getPollVote() != NULL) {
|
270 |
+
$data['woopra_poll_vote_trigger'] = Mage::getSingleton('core/session')->getData('woopra_poll_vote_trigger', true);
|
271 |
+
$data['woopra_poll_vote_title'] = Mage::getSingleton('core/session')->getData('woopra_poll_vote_title', true);
|
272 |
+
$data['woopra_poll_vote_answer'] = Mage::getSingleton('core/session')->getData('woopra_poll_vote_answer', true);
|
273 |
+
}
|
274 |
+
|
275 |
+
//Product Review Posted
|
276 |
+
if (Mage::helper('woopra')->getProductReviewRead() != NULL && Mage::getSingleton('core/session')->getData('woopra_product_review_trigger') == 1) {
|
277 |
+
$data['woopra_cart_wishlist_status'] = 'product_review_posted';
|
278 |
+
$data['woopra_product_review_trigger'] = Mage::getSingleton('core/session')->getData('woopra_product_review_trigger', true);
|
279 |
+
$data['woopra_product_review_nickname'] = Mage::getSingleton('core/session')->getData('woopra_product_review_nickname', true);
|
280 |
+
$data['woopra_product_review_title'] = Mage::getSingleton('core/session')->getData('woopra_product_review_title', true);
|
281 |
+
$data['woopra_product_review_detail'] = Mage::getSingleton('core/session')->getData('woopra_product_review_detail', true);
|
282 |
+
}
|
283 |
+
|
284 |
+
//Estimate Post
|
285 |
+
if (Mage::helper('woopra')->getEstimatePost() != NULL && Mage::getSingleton('core/session')->getData('woopra_estimate_post_trigger') == 1) {
|
286 |
+
$data['woopra_estimate_post_trigger'] = Mage::getSingleton('core/session')->getData('woopra_estimate_post_trigger', true);
|
287 |
+
$data['woopra_estimate_post_country'] = Mage::getSingleton('core/session')->getData('woopra_estimate_post_country', true);
|
288 |
+
$data['woopra_estimate_post_state'] = Mage::getSingleton('core/session')->getData('woopra_estimate_post_state', true);
|
289 |
+
$data['woopra_estimate_post_zip'] = Mage::getSingleton('core/session')->getData('woopra_estimate_post_zip', true);
|
290 |
+
}
|
291 |
+
}
|
292 |
+
|
293 |
+
if(isset($data[$key])) {
|
294 |
+
return $data[$key];
|
295 |
+
} else {
|
296 |
+
return null;
|
297 |
+
}
|
298 |
+
}
|
299 |
+
}
|
app/code/community/Woopra/Analytics/Helper/Data.php
ADDED
@@ -0,0 +1,253 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Woopra Module for Magento
|
4 |
+
*
|
5 |
+
* @package Woopra_Analytics
|
6 |
+
* @author K3Live for Woopra
|
7 |
+
* @copyright Copyright (c) 2013 Woopra (http://www.woopra.com/)
|
8 |
+
* @license Open Software License (OSL 3.0)
|
9 |
+
*/
|
10 |
+
|
11 |
+
class Woopra_Analytics_Helper_Data extends Mage_Core_Helper_Abstract
|
12 |
+
{
|
13 |
+
public function getApiKey()
|
14 |
+
{
|
15 |
+
return Mage::getStoreConfig('woopra_analytics/woopra/account_id');
|
16 |
+
}
|
17 |
+
public function getEnabled()
|
18 |
+
{
|
19 |
+
return (bool)Mage::getStoreConfig('woopra_analytics/woopra/enabled');
|
20 |
+
}
|
21 |
+
public function getHostname()
|
22 |
+
{
|
23 |
+
return Mage::getStoreConfig('woopra_analytics/woopra/hostname');
|
24 |
+
}
|
25 |
+
public function getTest()
|
26 |
+
{
|
27 |
+
return (bool)Mage::getStoreConfig('woopra_analytics/woopra/test');
|
28 |
+
}
|
29 |
+
public function getSubdomain()
|
30 |
+
{
|
31 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_advanced/subdomain');
|
32 |
+
}
|
33 |
+
public function getVistorTimeout()
|
34 |
+
{
|
35 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_advanced/visitor_timeout');
|
36 |
+
}
|
37 |
+
public function getTrackUrlParameters()
|
38 |
+
{
|
39 |
+
return (bool)Mage::getStoreConfig('woopra_analytics/woopra_advanced/track_url_parameters');
|
40 |
+
}
|
41 |
+
public function getTrackingCookieExpiration()
|
42 |
+
{
|
43 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_advanced/tracking_cookie_expiration');
|
44 |
+
}
|
45 |
+
public function getTrackingCookieName()
|
46 |
+
{
|
47 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_advanced/tracking_cookie_name');
|
48 |
+
}
|
49 |
+
public function getTrackingCookieDomain()
|
50 |
+
{
|
51 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_advanced/tracking_cookie_domain');
|
52 |
+
}
|
53 |
+
public function getTrackingCookiePath()
|
54 |
+
{
|
55 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_advanced/tracking_cookie_path');
|
56 |
+
}
|
57 |
+
public function getPing()
|
58 |
+
{
|
59 |
+
return (bool)Mage::getStoreConfig('woopra_analytics/woopra_advanced/ping');
|
60 |
+
}
|
61 |
+
public function getPingInterval()
|
62 |
+
{
|
63 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_advanced/ping_interval');
|
64 |
+
}
|
65 |
+
public function getDownloadTracking()
|
66 |
+
{
|
67 |
+
return (bool)Mage::getStoreConfig('woopra_analytics/woopra_advanced/download_tracking');
|
68 |
+
}
|
69 |
+
public function getDownloadTrackingPause()
|
70 |
+
{
|
71 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_advanced/download_tracking_pause');
|
72 |
+
}
|
73 |
+
public function getOutgoingTracking()
|
74 |
+
{
|
75 |
+
return (bool)Mage::getStoreConfig('woopra_analytics/woopra_advanced/outgoing_tracking');
|
76 |
+
}
|
77 |
+
public function getOutgoingTrackingPause()
|
78 |
+
{
|
79 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_advanced/outgoing_tracking_pause');
|
80 |
+
}
|
81 |
+
public function getCustomerName()
|
82 |
+
{
|
83 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_outputs/customer_name');
|
84 |
+
}
|
85 |
+
public function getCustomerEmail()
|
86 |
+
{
|
87 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_outputs/customer_email');
|
88 |
+
}
|
89 |
+
public function getCustomerCompany()
|
90 |
+
{
|
91 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_outputs/customer_company');
|
92 |
+
}
|
93 |
+
public function getCustomerLocation()
|
94 |
+
{
|
95 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_outputs/customer_location');
|
96 |
+
}
|
97 |
+
public function getCustomerPhone()
|
98 |
+
{
|
99 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_outputs/customer_phone');
|
100 |
+
}
|
101 |
+
public function getCustomerGroup()
|
102 |
+
{
|
103 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_outputs/customer_group');
|
104 |
+
}
|
105 |
+
public function getCustomerLifetimeSales()
|
106 |
+
{
|
107 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_outputs/customer_lifetime_sales');
|
108 |
+
}
|
109 |
+
public function getCustomerNumberOrders()
|
110 |
+
{
|
111 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_outputs/customer_number_orders');
|
112 |
+
}
|
113 |
+
public function getCustomerCreateDate()
|
114 |
+
{
|
115 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_outputs/customer_create_date');
|
116 |
+
}
|
117 |
+
public function getCustomerCartItems()
|
118 |
+
{
|
119 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_outputs/customer_cart_items');
|
120 |
+
}
|
121 |
+
public function getCustomerCartTotal()
|
122 |
+
{
|
123 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_outputs/customer_cart_total');
|
124 |
+
}
|
125 |
+
public function getCustomerWishlistItems()
|
126 |
+
{
|
127 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_outputs/customer_wishlist_items');
|
128 |
+
}
|
129 |
+
public function getCustomerWishlistTotal()
|
130 |
+
{
|
131 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_outputs/customer_wishlist_total');
|
132 |
+
}
|
133 |
+
public function getCatalogSearch()
|
134 |
+
{
|
135 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/catalog_search');
|
136 |
+
}
|
137 |
+
public function getChangedPassword()
|
138 |
+
{
|
139 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/changed_password');
|
140 |
+
}
|
141 |
+
public function getCheckoutBillingAddress()
|
142 |
+
{
|
143 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/checkout_billing_address');
|
144 |
+
}
|
145 |
+
public function getCheckoutShippingAddress()
|
146 |
+
{
|
147 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/checkout_shipping_address');
|
148 |
+
}
|
149 |
+
public function getCheckoutShippingMethod()
|
150 |
+
{
|
151 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/checkout_shipping_method');
|
152 |
+
}
|
153 |
+
public function getCheckoutPaymentMethod()
|
154 |
+
{
|
155 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/checkout_payment_method');
|
156 |
+
}
|
157 |
+
public function getCheckoutReview()
|
158 |
+
{
|
159 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/checkout_review');
|
160 |
+
}
|
161 |
+
public function getCheckoutSuccess()
|
162 |
+
{
|
163 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/checkout_success');
|
164 |
+
}
|
165 |
+
public function getCmsNoRoute()
|
166 |
+
{
|
167 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/cms_no_route');
|
168 |
+
}
|
169 |
+
public function getContactFormSent()
|
170 |
+
{
|
171 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/contact_form_sent');
|
172 |
+
}
|
173 |
+
public function getCouponCodeAdded()
|
174 |
+
{
|
175 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/coupon_added');
|
176 |
+
}
|
177 |
+
public function getCouponCodeRemoved()
|
178 |
+
{
|
179 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/coupon_removed');
|
180 |
+
}
|
181 |
+
public function getCustomerCreateAccount()
|
182 |
+
{
|
183 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/customer_create_account');
|
184 |
+
}
|
185 |
+
public function getCustomerCreateAccountSuccess()
|
186 |
+
{
|
187 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/customer_create_account_success');
|
188 |
+
}
|
189 |
+
public function getCustomerLogin()
|
190 |
+
{
|
191 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/customer_login');
|
192 |
+
}
|
193 |
+
public function getCustomerLogout()
|
194 |
+
{
|
195 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/customer_logout');
|
196 |
+
}
|
197 |
+
public function getEstimatePost()
|
198 |
+
{
|
199 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/estimate_post');
|
200 |
+
}
|
201 |
+
public function getForgotPassword()
|
202 |
+
{
|
203 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/forgot_password');
|
204 |
+
}
|
205 |
+
public function getNewsletterSubscribed()
|
206 |
+
{
|
207 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/newsletter_subscribed');
|
208 |
+
}
|
209 |
+
public function getNewsletterUnsubscribed()
|
210 |
+
{
|
211 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/newsletter_unsubscribed');
|
212 |
+
}
|
213 |
+
public function getPollVote()
|
214 |
+
{
|
215 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/poll_vote');
|
216 |
+
}
|
217 |
+
public function getProductAddedToCart()
|
218 |
+
{
|
219 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/product_added_to_cart');
|
220 |
+
}
|
221 |
+
public function getProductRemovedFromCart()
|
222 |
+
{
|
223 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/product_removed_from_cart');
|
224 |
+
}
|
225 |
+
public function getProductAddedToCompare()
|
226 |
+
{
|
227 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/product_added_to_compare');
|
228 |
+
}
|
229 |
+
public function getProductRemovedFromCompare()
|
230 |
+
{
|
231 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/product_removed_from_compare');
|
232 |
+
}
|
233 |
+
public function getProductAddedToWishlist()
|
234 |
+
{
|
235 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/product_added_to_wishlist');
|
236 |
+
}
|
237 |
+
public function getProductRemovedFromWishlist()
|
238 |
+
{
|
239 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/product_removed_from_wishlist');
|
240 |
+
}
|
241 |
+
public function getProductTagAdded()
|
242 |
+
{
|
243 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/product_tag_added');
|
244 |
+
}
|
245 |
+
public function getProductReviewRead()
|
246 |
+
{
|
247 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/product_review_read');
|
248 |
+
}
|
249 |
+
public function getProductReviewPosted()
|
250 |
+
{
|
251 |
+
return Mage::getStoreConfig('woopra_analytics/woopra_events/product_review_posted');
|
252 |
+
}
|
253 |
+
}
|
app/code/community/Woopra/Analytics/Model/Observer.php
ADDED
@@ -0,0 +1,350 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Woopra Module for Magento
|
4 |
+
*
|
5 |
+
* @package Woopra_Analytics
|
6 |
+
* @author K3Live for Woopra
|
7 |
+
* @copyright Copyright (c) 2013 Woopra (http://www.woopra.com/)
|
8 |
+
* @license Open Software License (OSL 3.0)
|
9 |
+
*/
|
10 |
+
|
11 |
+
class Woopra_Analytics_Model_Observer extends Varien_Event_Observer
|
12 |
+
{
|
13 |
+
public function newsletterSubscriberChange(Varien_Event_Observer $observer)
|
14 |
+
{
|
15 |
+
if (Mage::helper('woopra')->getNewsletterSubscribed() != NULL) {
|
16 |
+
$event = $observer->getEvent();
|
17 |
+
$model = $event->getSubscriber();
|
18 |
+
$subscriber_email = $model->getData(subscriber_email);
|
19 |
+
if ($model->getIsStatusChanged() == 1 && $model->getData(subscriber_status) == 1) {
|
20 |
+
Mage::getSingleton('core/session')->setData('woopra_subscriber_changed', 1);
|
21 |
+
Mage::getSingleton('core/session')->setData('woopra_subscriber_status', Mage::helper('woopra')->getNewsletterSubscribed());
|
22 |
+
Mage::getSingleton('core/session')->setData('woopra_subscriber_email', $subscriber_email);
|
23 |
+
} else if ($model->getIsStatusChanged() == 1 && $model->getData(subscriber_status) == 3) {
|
24 |
+
Mage::getSingleton('core/session')->setData('woopra_subscriber_changed', 1);
|
25 |
+
Mage::getSingleton('core/session')->setData('woopra_subscriber_status', Mage::helper('woopra')->getNewsletterUnsubscribed());
|
26 |
+
Mage::getSingleton('core/session')->setData('woopra_subscriber_email', $subscriber_email);
|
27 |
+
} else {
|
28 |
+
}
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
public function controllerActionBefore(Varien_Event_Observer $observer)
|
33 |
+
{
|
34 |
+
//Mage::log($observer->getEvent()->getControllerAction()->getFullActionName(), null, 'woopra.log');
|
35 |
+
|
36 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'customer_account_loginPost' && Mage::helper('woopra')->getCustomerLogin() != NULL)
|
37 |
+
{
|
38 |
+
Mage::getSingleton('core/session')->setData('woopra_login_logout_trigger', 1);
|
39 |
+
Mage::getSingleton('core/session')->setData('woopra_login_logout_status', Mage::helper('woopra')->getCustomerLogin());
|
40 |
+
}
|
41 |
+
|
42 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'customer_account_logoutSuccess' && Mage::helper('woopra')->getCustomerLogout() != NULL)
|
43 |
+
{
|
44 |
+
Mage::getSingleton('core/session')->setData('woopra_login_logout_trigger', 1);
|
45 |
+
Mage::getSingleton('core/session')->setData('woopra_login_logout_status', Mage::helper('woopra')->getCustomerLogout());
|
46 |
+
}
|
47 |
+
|
48 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'contacts_index_post' && Mage::helper('woopra')->getContactFormSent() != NULL)
|
49 |
+
{
|
50 |
+
$request = $observer->getEvent()->getControllerAction()->getRequest()->getParams();
|
51 |
+
Mage::getSingleton('core/session')->setData('woopra_contacts_index_post', 1);
|
52 |
+
Mage::getSingleton('core/session')->setData('woopra_contacts_name', addslashes($request['name']));
|
53 |
+
Mage::getSingleton('core/session')->setData('woopra_contacts_email', $request['email']);
|
54 |
+
Mage::getSingleton('core/session')->setData('woopra_contacts_telephone', addslashes($request['telephone']));
|
55 |
+
Mage::getSingleton('core/session')->setData('woopra_contacts_comment', addslashes($request['comment']));
|
56 |
+
//Mage::log($request['name']." | ".$request['email']." | ".$request['telephone']." | ".$request['comment'], null, 'woopra.log');
|
57 |
+
}
|
58 |
+
|
59 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'checkout_cart_add' && Mage::helper('woopra')->getProductAddedToCart() != NULL)
|
60 |
+
{
|
61 |
+
$request = $observer->getEvent()->getControllerAction()->getRequest()->getParams();
|
62 |
+
$product = Mage::getModel('catalog/product')->load($request['product'])->getData();
|
63 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_trigger', 1);
|
64 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_status', Mage::helper('woopra')->getProductAddedToCart());
|
65 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_name', addslashes($product['name']));
|
66 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_sku', addslashes($product['sku']));
|
67 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_price', round($product['price'], 2));
|
68 |
+
//Mage::log($product['name']." | ".$product['sku']." | ".round($product['price'], 2), null, 'woopra.log');
|
69 |
+
}
|
70 |
+
|
71 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'checkout_cart_delete' && Mage::helper('woopra')->getProductRemovedFromCart() != NULL)
|
72 |
+
{
|
73 |
+
$request = $observer->getEvent()->getControllerAction()->getRequest()->getParams();
|
74 |
+
$product_id = Mage::getModel('checkout/cart')->getQuote()->getItemById($request['id'])->getProduct()->getId();
|
75 |
+
$product = Mage::getModel('catalog/product')->load($product_id)->getData();
|
76 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_trigger', 1);
|
77 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_status', Mage::helper('woopra')->getProductRemovedFromCart());
|
78 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_name', addslashes($product['name']));
|
79 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_sku', addslashes($product['sku']));
|
80 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_price', round($product['price'], 2));
|
81 |
+
//Mage::log($product['name']." | ".$product['sku']." | ".round($product['price'], 2), null, 'woopra.log');
|
82 |
+
}
|
83 |
+
|
84 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'wishlist_index_add' && Mage::helper('woopra')->getProductAddedToWishlist() != NULL)
|
85 |
+
{
|
86 |
+
$request = $observer->getEvent()->getControllerAction()->getRequest()->getParams();
|
87 |
+
$product = Mage::getModel('catalog/product')->load($request['product'])->getData();
|
88 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_trigger', 1);
|
89 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_status', Mage::helper('woopra')->getProductAddedToWishlist());
|
90 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_name', addslashes($product['name']));
|
91 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_sku', addslashes($product['sku']));
|
92 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_price', round($product['price'], 2));
|
93 |
+
//Mage::log($product['name']." | ".$product['sku']." | ".round($product['price'], 2), null, 'woopra.log');
|
94 |
+
}
|
95 |
+
|
96 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'wishlist_index_remove' && Mage::helper('woopra')->getProductRemovedFromWishlist() != NULL)
|
97 |
+
{
|
98 |
+
$request = $observer->getEvent()->getControllerAction()->getRequest()->getParams();
|
99 |
+
$product_id = Mage::getModel('wishlist/item')->load($request['item'])->getProduct()->getId();
|
100 |
+
$product = Mage::getModel('catalog/product')->load($product_id)->getData();
|
101 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_trigger', 1);
|
102 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_status', Mage::helper('woopra')->getProductRemovedFromWishlist());
|
103 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_name', $product['name']);
|
104 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_sku', $product['sku']);
|
105 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_price', round($product['price'], 2));
|
106 |
+
//Mage::log($product['name']." | ".$product['sku']." | ".round($product['price'], 2), null, 'woopra.log');
|
107 |
+
}
|
108 |
+
|
109 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'catalog_product_compare_add' && Mage::helper('woopra')->getProductAddedToCompare() != NULL)
|
110 |
+
{
|
111 |
+
$request = $observer->getEvent()->getControllerAction()->getRequest()->getParams();
|
112 |
+
$product = Mage::getModel('catalog/product')->load($request['product'])->getData();
|
113 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_trigger', 1);
|
114 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_status', Mage::helper('woopra')->getProductAddedToCompare());
|
115 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_name', addslashes($product['name']));
|
116 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_sku', addslashes($product['sku']));
|
117 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_price', round($product['price'], 2));
|
118 |
+
//Mage::log($product['name']." | ".$product['sku']." | ".round($product['price'], 2), null, 'woopra.log');
|
119 |
+
}
|
120 |
+
|
121 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'catalog_product_compare_remove' && Mage::helper('woopra')->getProductRemovedFromCompare() != NULL)
|
122 |
+
{
|
123 |
+
$request = $observer->getEvent()->getControllerAction()->getRequest()->getParams();
|
124 |
+
$product = Mage::getModel('catalog/product')->load($request['product'])->getData();
|
125 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_trigger', 1);
|
126 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_status', Mage::helper('woopra')->getProductRemovedFromCompare());
|
127 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_name', $product['name']);
|
128 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_sku', $product['sku']);
|
129 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_price', round($product['price'], 2));
|
130 |
+
//Mage::log($product['name']." | ".$product['sku']." | ".round($product['price'], 2), null, 'woopra.log');
|
131 |
+
}
|
132 |
+
|
133 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'checkout_onepage_index' && Mage::helper('woopra')->getCheckoutBillingAddress() != NULL)
|
134 |
+
{
|
135 |
+
Mage::getSingleton('core/session')->setData('woopra_checkout_trigger', 1);
|
136 |
+
}
|
137 |
+
|
138 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'checkout_onepage_savePayment' && Mage::helper('woopra')->getCheckoutPaymentMethod() != NULL)
|
139 |
+
{
|
140 |
+
$request = $observer->getEvent()->getControllerAction()->getRequest()->getParams();
|
141 |
+
Mage::getSingleton('core/session')->setData('woopra_checkout_trigger', 1);
|
142 |
+
Mage::getSingleton('core/session')->setData('woopra_checkout_payment_method', $request['payment']['method']);
|
143 |
+
if ($request['payment']['method'] == 'ccsave')
|
144 |
+
{
|
145 |
+
Mage::getSingleton('core/session')->setData('woopra_checkout_payment_cc_type', $request['payment']['cc_type']);
|
146 |
+
}
|
147 |
+
//Mage::log($request['payment']['cc_type'], null, 'woopra.log');
|
148 |
+
}
|
149 |
+
|
150 |
+
if(($observer->getEvent()->getControllerAction()->getFullActionName() == 'checkout_onepage_success' || $observer->getEvent()->getControllerAction()->getFullActionName() == 'checkout_multishipping_success') && Mage::helper('woopra')->getCheckoutSuccess() != NULL)
|
151 |
+
{
|
152 |
+
//$request = $observer->getEvent()->getControllerAction()->getRequest()->getParams();
|
153 |
+
$lastOrderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
|
154 |
+
$order = Mage::getModel('sales/order')->loadByIncrementId($lastOrderId);
|
155 |
+
$cost = 0;
|
156 |
+
Mage::getSingleton('core/session')->setData('woopra_checkout_success_trigger', 1);
|
157 |
+
Mage::getSingleton('core/session')->setData('woopra_checkout_success_coupon_code', addslashes($order->getCouponCode()));
|
158 |
+
Mage::getSingleton('core/session')->setData('woopra_checkout_success_discount_amount', round($order->getDiscountAmount(), 2));
|
159 |
+
Mage::getSingleton('core/session')->setData('woopra_checkout_success_order_id', addslashes($lastOrderId));
|
160 |
+
Mage::getSingleton('core/session')->setData('woopra_checkout_success_order_subtotal', round($order->getSubtotal(), 2));
|
161 |
+
Mage::getSingleton('core/session')->setData('woopra_checkout_success_order_total', round($order->getGrandTotal(), 2));
|
162 |
+
Mage::getSingleton('core/session')->setData('woopra_checkout_success_order_weight', round($order->getWeight(), 2));
|
163 |
+
Mage::getSingleton('core/session')->setData('woopra_checkout_success_shipping_amount', round($order->getShippingAmount(), 2));
|
164 |
+
Mage::getSingleton('core/session')->setData('woopra_checkout_success_shipping_description', addslashes($order->getShippingDescription()));
|
165 |
+
Mage::getSingleton('core/session')->setData('woopra_checkout_success_total_items_ordered', round($order->getTotalQtyOrdered(), 0));
|
166 |
+
$items = $order->getAllVisibleItems();
|
167 |
+
foreach ($items as $itemId => $item)
|
168 |
+
{
|
169 |
+
$cost = $cost + Mage::getModel('catalog/product')->load($item->getProductId())->getData('cost');
|
170 |
+
}
|
171 |
+
$profit = $order->getSubtotal() - $cost;
|
172 |
+
if ($cost != 0)
|
173 |
+
{
|
174 |
+
Mage::getSingleton('core/session')->setData('woopra_checkout_success_profit', round($profit, 2));
|
175 |
+
}
|
176 |
+
//Mage::log($order, null, 'woopra.log');
|
177 |
+
}
|
178 |
+
|
179 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'catalogsearch_result_index' && Mage::helper('woopra')->getCatalogSearch() != NULL)
|
180 |
+
{
|
181 |
+
$request = $observer->getEvent()->getControllerAction()->getRequest()->getParams();
|
182 |
+
Mage::getSingleton('core/session')->setData('woopra_search_trigger', 1);
|
183 |
+
Mage::getSingleton('core/session')->setData('woopra_search_keywords', addslashes($request['q']));
|
184 |
+
//Mage::log($request['q'], null, 'woopra.log');
|
185 |
+
}
|
186 |
+
|
187 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'catalogsearch_advanced_result' && Mage::helper('woopra')->getCatalogSearch() != NULL)
|
188 |
+
{
|
189 |
+
$request = $observer->getEvent()->getControllerAction()->getRequest()->getParams();
|
190 |
+
foreach ($request as $key => $answer) {
|
191 |
+
if (is_array($answer) == true) {
|
192 |
+
foreach ($answer as $subkey => $subanswer) {
|
193 |
+
$subtotal = $subtotal." ".$subkey.":".$subanswer;
|
194 |
+
$answer = $subtotal;
|
195 |
+
}
|
196 |
+
$subtotal = NULL;
|
197 |
+
}
|
198 |
+
$search_keywords = $search_keywords." | ".$key.": ".$answer;
|
199 |
+
}
|
200 |
+
Mage::getSingleton('core/session')->setData('woopra_search_trigger', 1);
|
201 |
+
Mage::getSingleton('core/session')->setData('woopra_search_keywords', addslashes($search_keywords));
|
202 |
+
//Mage::log($search_keywords, null, 'woopra.log');
|
203 |
+
}
|
204 |
+
|
205 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'review_product_list' && Mage::helper('woopra')->getProductReviewRead() != NULL)
|
206 |
+
{
|
207 |
+
$request = $observer->getEvent()->getControllerAction()->getRequest()->getParams();
|
208 |
+
$product = Mage::getModel('catalog/product')->load($request['id'])->getData();
|
209 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_trigger', 1);
|
210 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_status', Mage::helper('woopra')->getProductReviewRead());
|
211 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_name', addslashes($product['name']));
|
212 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_sku', addslashes($product['sku']));
|
213 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_price', round($product['price'], 2));
|
214 |
+
//Mage::log($product['name']." | ".$product['sku']." | ".round($product['price'], 2), null, 'woopra.log');
|
215 |
+
}
|
216 |
+
|
217 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'review_product_post' && Mage::helper('woopra')->getProductReviewPosted() != NULL)
|
218 |
+
{
|
219 |
+
$request = $observer->getEvent()->getControllerAction()->getRequest()->getParams();
|
220 |
+
$product = Mage::getModel('catalog/product')->load($request['id'])->getData();
|
221 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_trigger', 1);
|
222 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_status', Mage::helper('woopra')->getProductReviewPosted());
|
223 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_name', addslashes($product['name']));
|
224 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_sku', addslashes($product['sku']));
|
225 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_price', round($product['price'], 2));
|
226 |
+
Mage::getSingleton('core/session')->setData('woopra_product_review_trigger', 1);
|
227 |
+
Mage::getSingleton('core/session')->setData('woopra_product_review_nickname', addslashes($request['nickname']));
|
228 |
+
Mage::getSingleton('core/session')->setData('woopra_product_review_title', addslashes($request['title']));
|
229 |
+
Mage::getSingleton('core/session')->setData('woopra_product_review_detail', addslashes($request['detail']));
|
230 |
+
//Mage::log($product['name']." | ".$product['sku']." | ".round($product['price'], 2)." | ".$request['nickname']." | ".$request['title']." | ".$request['detail'], null, 'woopra.log');
|
231 |
+
}
|
232 |
+
|
233 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'customer_account_forgotpasswordpost' && Mage::helper('woopra')->getForgotPassword() != NULL)
|
234 |
+
{
|
235 |
+
$request = $observer->getEvent()->getControllerAction()->getRequest()->getParams();
|
236 |
+
Mage::getSingleton('core/session')->setData('woopra_forgot_password_trigger', 1);
|
237 |
+
Mage::getSingleton('core/session')->setData('woopra_forgot_password_email', $request['email']);
|
238 |
+
//Mage::log($request['email'], null, 'woopra.log');
|
239 |
+
}
|
240 |
+
|
241 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'customer_account_editPost' && Mage::helper('woopra')->getChangedPassword() != NULL)
|
242 |
+
{
|
243 |
+
$request = $observer->getEvent()->getControllerAction()->getRequest()->getParams();
|
244 |
+
if ($request['change_password'] == 1 && $request['current_password'] != $request['password']) {
|
245 |
+
Mage::getSingleton('core/session')->setData('woopra_password_changed_trigger', 1);
|
246 |
+
}
|
247 |
+
//Mage::log($request, null, 'woopra.log');
|
248 |
+
}
|
249 |
+
|
250 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'tag_index_save' && Mage::helper('woopra')->getProductTagAdded() != NULL)
|
251 |
+
{
|
252 |
+
$request = $observer->getEvent()->getControllerAction()->getRequest()->getParams();
|
253 |
+
$product = Mage::getModel('catalog/product')->load($request['product'])->getData();
|
254 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_trigger', 1);
|
255 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_status', Mage::helper('woopra')->getProductTagAdded());
|
256 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_name', addslashes($product['name']));
|
257 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_sku', addslashes($product['sku']));
|
258 |
+
Mage::getSingleton('core/session')->setData('woopra_cart_wishlist_price', round($product['price'], 2));
|
259 |
+
Mage::getSingleton('core/session')->setData('woopra_product_tag_added_trigger', 1);
|
260 |
+
Mage::getSingleton('core/session')->setData('woopra_product_tag_name', addslashes($request['productTagName']));
|
261 |
+
//Mage::log($product['name']." | ".$product['sku']." | ".round($product['price'], 2)." | ".$request['productTagName'], null, 'woopra.log');
|
262 |
+
}
|
263 |
+
|
264 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'checkout_cart_couponPost' && Mage::helper('woopra')->getCouponCodeAdded() != NULL)
|
265 |
+
{
|
266 |
+
$request = $observer->getEvent()->getControllerAction()->getRequest()->getParams();
|
267 |
+
$coupon_id = Mage::getModel('salesrule/coupon')->load($request['coupon_code'], 'code');
|
268 |
+
Mage::getSingleton('core/session')->setData('woopra_coupon_code_trigger', 1);
|
269 |
+
if ($request['remove'] == 1) {
|
270 |
+
Mage::getSingleton('core/session')->setData('woopra_coupon_code_status', Mage::helper('woopra')->getCouponCodeRemoved());
|
271 |
+
} else {
|
272 |
+
Mage::getSingleton('core/session')->setData('woopra_coupon_code_status', Mage::helper('woopra')->getCouponCodeAdded());
|
273 |
+
//Mage::log($coupon_id->getData(), null, 'woopra.log');
|
274 |
+
}
|
275 |
+
if ($coupon_id['coupon_id'] != null) {
|
276 |
+
$coupon_rules = Mage::getModel('salesrule/rule')->load($coupon_id->getRuleId());
|
277 |
+
Mage::getSingleton('core/session')->setData('woopra_coupon_code_validity', 'valid');
|
278 |
+
Mage::getSingleton('core/session')->setData('woopra_coupon_code_name', addslashes($coupon_rules->getData('name')));
|
279 |
+
//Mage::log($coupon_rules->getData(), null, 'woopra.log');
|
280 |
+
if ($coupon_rules->getData('is_active') == 1) {
|
281 |
+
Mage::getSingleton('core/session')->setData('woopra_coupon_code_active', 'active');
|
282 |
+
//Mage::log($coupon_rules->getData('is_active').' | = active', null, 'woopra.log');
|
283 |
+
} else {
|
284 |
+
Mage::getSingleton('core/session')->setData('woopra_coupon_code_active', 'inactive');
|
285 |
+
//Mage::log($coupon_rules->getData('is_active').' | = inactive', null, 'woopra.log');
|
286 |
+
}
|
287 |
+
} else {
|
288 |
+
Mage::getSingleton('core/session')->setData('woopra_coupon_code_validity', 'invalid');
|
289 |
+
Mage::getSingleton('core/session')->setData('woopra_coupon_code_name', '-');
|
290 |
+
Mage::getSingleton('core/session')->setData('woopra_coupon_code_active', '-');
|
291 |
+
}
|
292 |
+
Mage::getSingleton('core/session')->setData('woopra_coupon_code', addslashes($request['coupon_code']));
|
293 |
+
//Mage::log($observer, null, 'woopra.log');
|
294 |
+
}
|
295 |
+
|
296 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'customer_account_create' && Mage::helper('woopra')->getCustomerCreateAccount() != NULL)
|
297 |
+
{
|
298 |
+
Mage::getSingleton('core/session')->setData('woopra_create_account_trigger', 1);
|
299 |
+
//Mage::log('Create account started.', null, 'woopra.log');
|
300 |
+
}
|
301 |
+
|
302 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'customer_account_createpost' && Mage::helper('woopra')->getCustomerCreateAccount() != NULL)
|
303 |
+
{
|
304 |
+
$request = $observer->getEvent()->getControllerAction()->getRequest()->getParams();
|
305 |
+
Mage::getSingleton('core/session')->setData('woopra_create_account_success_trigger', 1);
|
306 |
+
if ($request['is_subscribed' == 1]) {
|
307 |
+
Mage::getSingleton('core/session')->setData('woopra_subscriber_changed', 1);
|
308 |
+
Mage::getSingleton('core/session')->setData('woopra_subscriber_status', Mage::helper('woopra')->getNewsletterSubscribed());
|
309 |
+
Mage::getSingleton('core/session')->setData('woopra_subscriber_email', $request[email]);
|
310 |
+
}
|
311 |
+
//Mage::log($request, null, 'woopra.log');
|
312 |
+
}
|
313 |
+
|
314 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'checkout_cart_estimatePost' && Mage::helper('woopra')->getEstimatePost() != NULL)
|
315 |
+
{
|
316 |
+
$request = $observer->getEvent()->getControllerAction()->getRequest()->getParams();
|
317 |
+
$region = Mage::getModel('directory/region')->load($request['region_id']);
|
318 |
+
Mage::getSingleton('core/session')->setData('woopra_estimate_post_trigger', 1);
|
319 |
+
Mage::getSingleton('core/session')->setData('woopra_estimate_post_country', $request['country_id']);
|
320 |
+
Mage::getSingleton('core/session')->setData('woopra_estimate_post_state', $region->getName());
|
321 |
+
Mage::getSingleton('core/session')->setData('woopra_estimate_post_zip', $request['estimate_postcode']);
|
322 |
+
//Mage::log($request['country_id']." | ".$region->getName()." | ".$request['estimate_postcode'], null, 'woopra.log');
|
323 |
+
}
|
324 |
+
|
325 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'cms_index_noRoute' && Mage::helper('woopra')->getCmsNoRoute() != NULL)
|
326 |
+
{
|
327 |
+
$request = $observer->getEvent()->getControllerAction()->getRequest()->getOriginalPathInfo();
|
328 |
+
Mage::getSingleton('core/session')->setData('woopra_cms_noroute_trigger', 1);
|
329 |
+
Mage::getSingleton('core/session')->setData('woopra_cms_noroute_path', $request);
|
330 |
+
//Mage::log($request, null, 'woopra.log');
|
331 |
+
}
|
332 |
+
|
333 |
+
if($observer->getEvent()->getControllerAction()->getFullActionName() == 'poll_vote_add' && Mage::helper('woopra')->getPollVote() != NULL)
|
334 |
+
{
|
335 |
+
$request = $observer->getEvent()->getControllerAction()->getRequest()->getParams();
|
336 |
+
$poll_title = Mage::getModel('poll/poll')->load($request['poll_id'])->getData();
|
337 |
+
$poll_answers = Mage::getResourceModel('poll/poll_answer_collection')->addPollFilter($request['poll_id'])->getData();
|
338 |
+
foreach ($poll_answers as $key => $answer) {
|
339 |
+
if ($answer['answer_id'] == $request['vote']) {
|
340 |
+
$answer_title = $answer['answer_title'];
|
341 |
+
}
|
342 |
+
}
|
343 |
+
Mage::getSingleton('core/session')->setData('woopra_poll_vote_trigger', 1);
|
344 |
+
Mage::getSingleton('core/session')->setData('woopra_poll_vote_title', addslashes($poll_title['poll_title']));
|
345 |
+
Mage::getSingleton('core/session')->setData('woopra_poll_vote_answer', addslashes($answer_title));
|
346 |
+
Mage::log($poll_title['poll_title']." | ".$answer_title, null, 'woopra.log');
|
347 |
+
}
|
348 |
+
}
|
349 |
+
}
|
350 |
+
?>
|
app/code/community/Woopra/Analytics/etc/config.xml
ADDED
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Woopra Module for Magento
|
5 |
+
*
|
6 |
+
* @package Woopra_Analytics
|
7 |
+
* @author K3Live for Woopra
|
8 |
+
* @copyright Copyright (c) 2013 Woopra (http://www.woopra.com/)
|
9 |
+
* @license Open Software License (OSL 3.0)
|
10 |
+
*/
|
11 |
+
-->
|
12 |
+
<config>
|
13 |
+
<modules>
|
14 |
+
<Woopra_Analytics>
|
15 |
+
<version>1.0.0</version>
|
16 |
+
</Woopra_Analytics>
|
17 |
+
</modules>
|
18 |
+
<global>
|
19 |
+
<blocks>
|
20 |
+
<woopra>
|
21 |
+
<class>Woopra_Analytics_Block</class>
|
22 |
+
</woopra>
|
23 |
+
</blocks>
|
24 |
+
<helpers>
|
25 |
+
<woopra>
|
26 |
+
<class>Woopra_Analytics_Helper</class>
|
27 |
+
</woopra>
|
28 |
+
</helpers>
|
29 |
+
<models>
|
30 |
+
<woopra>
|
31 |
+
<class>Woopra_Analytics_Model</class>
|
32 |
+
</woopra>
|
33 |
+
</models>
|
34 |
+
<events>
|
35 |
+
<newsletter_subscriber_save_after>
|
36 |
+
<observers>
|
37 |
+
<newsletter_subscriber_change>
|
38 |
+
<type>singleton</type>
|
39 |
+
<class>woopra/observer</class>
|
40 |
+
<method>newsletterSubscriberChange</method>
|
41 |
+
</newsletter_subscriber_change>
|
42 |
+
</observers>
|
43 |
+
</newsletter_subscriber_save_after>
|
44 |
+
<controller_action_predispatch>
|
45 |
+
<observers>
|
46 |
+
<controller_action_before>
|
47 |
+
<class>woopra/observer</class>
|
48 |
+
<method>controllerActionBefore</method>
|
49 |
+
</controller_action_before>
|
50 |
+
</observers>
|
51 |
+
</controller_action_predispatch>
|
52 |
+
</events>
|
53 |
+
</global>
|
54 |
+
<frontend>
|
55 |
+
<layout>
|
56 |
+
<updates>
|
57 |
+
<woopra>
|
58 |
+
<file>woopra.xml</file>
|
59 |
+
</woopra>
|
60 |
+
</updates>
|
61 |
+
</layout>
|
62 |
+
</frontend>
|
63 |
+
<default>
|
64 |
+
<woopra_analytics>
|
65 |
+
<woopra>
|
66 |
+
<enabled>1</enabled>
|
67 |
+
<hostname></hostname>
|
68 |
+
<account_id></account_id>
|
69 |
+
<test>0</test>
|
70 |
+
</woopra>
|
71 |
+
<woopra_advanced>
|
72 |
+
<subdomain></subdomain>
|
73 |
+
<visitor_timeout></visitor_timeout>
|
74 |
+
<track_url_parameters>0</track_url_parameters>
|
75 |
+
<tracking_cookie_expiration></tracking_cookie_expiration>
|
76 |
+
<tracking_cookie_name></tracking_cookie_name>
|
77 |
+
<tracking_cookie_domain></tracking_cookie_domain>
|
78 |
+
<tracking_cookie_path></tracking_cookie_path>
|
79 |
+
<ping>1</ping>
|
80 |
+
<ping_interval></ping_interval>
|
81 |
+
<download_tracking>1</download_tracking>
|
82 |
+
<download_tracking_pause></download_tracking_pause>
|
83 |
+
<outgoing_tracking>1</outgoing_tracking>
|
84 |
+
<outgoing_tracking_pause></outgoing_tracking_pause>
|
85 |
+
</woopra_advanced>
|
86 |
+
<woopra_outputs>
|
87 |
+
<customer_name>customer_name</customer_name>
|
88 |
+
<customer_email>customer_email</customer_email>
|
89 |
+
<customer_company>customer_company</customer_company>
|
90 |
+
<customer_location>customer_location</customer_location>
|
91 |
+
<customer_phone>customer_phone</customer_phone>
|
92 |
+
<customer_group>customer_group</customer_group>
|
93 |
+
<customer_lifetime_sales>customer_lifetime_sales</customer_lifetime_sales>
|
94 |
+
<customer_number_orders>customer_number_orders</customer_number_orders>
|
95 |
+
<customer_create_date>customer_create_date</customer_create_date>
|
96 |
+
<customer_cart_items>customer_cart_items</customer_cart_items>
|
97 |
+
<customer_cart_total>customer_cart_total</customer_cart_total>
|
98 |
+
<customer_wishlist_items>customer_wishlist_items</customer_wishlist_items>
|
99 |
+
<customer_wishlist_total>customer_wishlist_total</customer_wishlist_total>
|
100 |
+
</woopra_outputs>
|
101 |
+
<woopra_events>
|
102 |
+
<catalog_search>catalog_search</catalog_search>
|
103 |
+
<changed_password>changed_password</changed_password>
|
104 |
+
<checkout_billing_address>checkout_billing_address</checkout_billing_address>
|
105 |
+
<checkout_shipping_address>checkout_shipping_address</checkout_shipping_address>
|
106 |
+
<checkout_shipping_method>checkout_shipping_method</checkout_shipping_method>
|
107 |
+
<checkout_payment_method>checkout_payment_method</checkout_payment_method>
|
108 |
+
<checkout_review>checkout_review</checkout_review>
|
109 |
+
<checkout_success>checkout_success</checkout_success>
|
110 |
+
<cms_no_route>cms_no_route</cms_no_route>
|
111 |
+
<contact_form_sent>contact_form_sent</contact_form_sent>
|
112 |
+
<coupon_added>coupon_added</coupon_added>
|
113 |
+
<coupon_removed>coupon_removed</coupon_removed>
|
114 |
+
<customer_create_account>customer_create_account</customer_create_account>
|
115 |
+
<customer_create_account_success>customer_create_account_success</customer_create_account_success>
|
116 |
+
<customer_login>customer_login</customer_login>
|
117 |
+
<customer_logout>customer_logout</customer_logout>
|
118 |
+
<estimate_post>estimate_post</estimate_post>
|
119 |
+
<forgot_password>forgot_password</forgot_password>
|
120 |
+
<newsletter_subscribed>newsletter_subscribed</newsletter_subscribed>
|
121 |
+
<newsletter_unsubscribed>newsletter_unsubscribed</newsletter_unsubscribed>
|
122 |
+
<poll_vote>poll_vote</poll_vote>
|
123 |
+
<product_added_to_cart>product_added_to_cart</product_added_to_cart>
|
124 |
+
<product_removed_from_cart>product_removed_from_cart</product_removed_from_cart>
|
125 |
+
<product_added_to_compare>product_added_to_compare</product_added_to_compare>
|
126 |
+
<product_removed_from_compare>product_removed_from_compare</product_removed_from_compare>
|
127 |
+
<product_added_to_wishlist>product_added_to_wishlist</product_added_to_wishlist>
|
128 |
+
<product_removed_from_wishlist>product_removed_from_wishlist</product_removed_from_wishlist>
|
129 |
+
<product_tag_added>product_tag_added</product_tag_added>
|
130 |
+
<product_review_read>product_review_read</product_review_read>
|
131 |
+
<product_review_posted>product_review_posted</product_review_posted>
|
132 |
+
</woopra_events>
|
133 |
+
</woopra_analytics>
|
134 |
+
</default>
|
135 |
+
<adminhtml>
|
136 |
+
<acl>
|
137 |
+
<resources>
|
138 |
+
<admin>
|
139 |
+
<children>
|
140 |
+
<system>
|
141 |
+
<children>
|
142 |
+
<config>
|
143 |
+
<children>
|
144 |
+
<woopra_analytics>
|
145 |
+
<title>Woopra</title>
|
146 |
+
</woopra_analytics>
|
147 |
+
</children>
|
148 |
+
</config>
|
149 |
+
</children>
|
150 |
+
</system>
|
151 |
+
</children>
|
152 |
+
</admin>
|
153 |
+
</resources>
|
154 |
+
</acl>
|
155 |
+
</adminhtml>
|
156 |
+
</config>
|
app/code/community/Woopra/Analytics/etc/system.xml
ADDED
@@ -0,0 +1,628 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Woopra Module for Magento
|
5 |
+
*
|
6 |
+
* @package Woopra_Analytics
|
7 |
+
* @author K3Live for Woopra
|
8 |
+
* @copyright Copyright (c) 2013 Woopra (http://www.woopra.com/)
|
9 |
+
* @license Open Software License (OSL 3.0)
|
10 |
+
*/
|
11 |
+
-->
|
12 |
+
<config>
|
13 |
+
<tabs>
|
14 |
+
<woopra translate="label" module="woopra">
|
15 |
+
<label>Woopra</label>
|
16 |
+
<sort_order>100</sort_order>
|
17 |
+
</woopra>
|
18 |
+
</tabs>
|
19 |
+
<sections>
|
20 |
+
<woopra_analytics translate="label" module="woopra">
|
21 |
+
<label>Woopra Analytics</label>
|
22 |
+
<tab>woopra</tab>
|
23 |
+
<sort_order>1001</sort_order>
|
24 |
+
<show_in_default>1</show_in_default>
|
25 |
+
<show_in_website>1</show_in_website>
|
26 |
+
<show_in_store>1</show_in_store>
|
27 |
+
<groups>
|
28 |
+
<woopra translate="label" module="woopra">
|
29 |
+
<label>Basic Woopra Setup</label>
|
30 |
+
<frontend_type>text</frontend_type>
|
31 |
+
<sort_order>10</sort_order>
|
32 |
+
<show_in_default>1</show_in_default>
|
33 |
+
<show_in_website>1</show_in_website>
|
34 |
+
<show_in_store>1</show_in_store>
|
35 |
+
<expanded>1</expanded>
|
36 |
+
<fields>
|
37 |
+
<enabled translate="label">
|
38 |
+
<label>Enable Module:</label>
|
39 |
+
<comment>Enable or disable the Woopra module.</comment>
|
40 |
+
<frontend_type>select</frontend_type>
|
41 |
+
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
42 |
+
<sort_order>10</sort_order>
|
43 |
+
<show_in_default>1</show_in_default>
|
44 |
+
<show_in_website>1</show_in_website>
|
45 |
+
<show_in_store>1</show_in_store>
|
46 |
+
</enabled>
|
47 |
+
<hostname translate="label">
|
48 |
+
<label>Hostname</label>
|
49 |
+
<comment>Enter hostname to track (ie: example.com).</comment>
|
50 |
+
<frontend_type>text</frontend_type>
|
51 |
+
<sort_order>20</sort_order>
|
52 |
+
<show_in_default>1</show_in_default>
|
53 |
+
<show_in_website>1</show_in_website>
|
54 |
+
<show_in_store>1</show_in_store>
|
55 |
+
</hostname>
|
56 |
+
<account_id translate="label">
|
57 |
+
<label>Woopra API key</label>
|
58 |
+
<comment>Your API key can be found on woopra.com under My Websites -> Setup -> API Key.</comment>
|
59 |
+
<frontend_type>text</frontend_type>
|
60 |
+
<validate>validate-alphanum</validate>
|
61 |
+
<sort_order>30</sort_order>
|
62 |
+
<show_in_default>1</show_in_default>
|
63 |
+
<show_in_website>1</show_in_website>
|
64 |
+
<show_in_store>1</show_in_store>
|
65 |
+
</account_id>
|
66 |
+
<test translate="label">
|
67 |
+
<label>Show Test Alert</label>
|
68 |
+
<frontend_type>select</frontend_type>
|
69 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
70 |
+
<sort_order>40</sort_order>
|
71 |
+
<show_in_default>1</show_in_default>
|
72 |
+
<show_in_website>1</show_in_website>
|
73 |
+
<show_in_store>1</show_in_store>
|
74 |
+
</test>
|
75 |
+
</fields>
|
76 |
+
</woopra>
|
77 |
+
<woopra_advanced translate="label" module="woopra">
|
78 |
+
<label>Advanced Woopra Setup</label>
|
79 |
+
<frontend_type>text</frontend_type>
|
80 |
+
<sort_order>20</sort_order>
|
81 |
+
<show_in_default>1</show_in_default>
|
82 |
+
<show_in_website>1</show_in_website>
|
83 |
+
<show_in_store>1</show_in_store>
|
84 |
+
<expanded>0</expanded>
|
85 |
+
<fields>
|
86 |
+
<subdomain translate="label">
|
87 |
+
<label>Subdomain Aggregation</label>
|
88 |
+
<comment>Enter subdomain and root domain to track (ie: 'subdomain', 'rootdomain.com'). Note: Surround subdomain and root domain with apostrophes, separated by a comma!</comment>
|
89 |
+
<frontend_type>text</frontend_type>
|
90 |
+
<sort_order>5</sort_order>
|
91 |
+
<show_in_default>1</show_in_default>
|
92 |
+
<show_in_website>1</show_in_website>
|
93 |
+
<show_in_store>1</show_in_store>
|
94 |
+
</subdomain>
|
95 |
+
<visitor_timeout translate="label">
|
96 |
+
<label>Visitor Timeout</label>
|
97 |
+
<comment>The idle time in minutes after which visitors are considered no longer on your website. (Default: 30)</comment>
|
98 |
+
<frontend_type>text</frontend_type>
|
99 |
+
<validate>validate-digits</validate>
|
100 |
+
<sort_order>10</sort_order>
|
101 |
+
<show_in_default>1</show_in_default>
|
102 |
+
<show_in_website>1</show_in_website>
|
103 |
+
<show_in_store>1</show_in_store>
|
104 |
+
</visitor_timeout>
|
105 |
+
<track_url_parameters translate="label">
|
106 |
+
<label>Track URL Parameters</label>
|
107 |
+
<comment>Include queries in the url. (Default No)</comment>
|
108 |
+
<frontend_type>select</frontend_type>
|
109 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
110 |
+
<sort_order>20</sort_order>
|
111 |
+
<show_in_default>1</show_in_default>
|
112 |
+
<show_in_website>1</show_in_website>
|
113 |
+
<show_in_store>1</show_in_store>
|
114 |
+
</track_url_parameters>
|
115 |
+
<tracking_cookie_expiration translate="label">
|
116 |
+
<label>Tracking Cookie Expiration</label>
|
117 |
+
<comment>The tracking cookie expiration in days (Default: 365)</comment>
|
118 |
+
<frontend_type>text</frontend_type>
|
119 |
+
<validate>validate-digits</validate>
|
120 |
+
<sort_order>30</sort_order>
|
121 |
+
<show_in_default>1</show_in_default>
|
122 |
+
<show_in_website>1</show_in_website>
|
123 |
+
<show_in_store>1</show_in_store>
|
124 |
+
</tracking_cookie_expiration>
|
125 |
+
<tracking_cookie_name translate="label">
|
126 |
+
<label>Tracking Cookie Name</label>
|
127 |
+
<comment>Change the name of the cookie stored by Woopra (Default: woopraTracker)</comment>
|
128 |
+
<frontend_type>text</frontend_type>
|
129 |
+
<sort_order>40</sort_order>
|
130 |
+
<show_in_default>1</show_in_default>
|
131 |
+
<show_in_website>1</show_in_website>
|
132 |
+
<show_in_store>1</show_in_store>
|
133 |
+
</tracking_cookie_name>
|
134 |
+
<tracking_cookie_domain translate="label">
|
135 |
+
<label>Tracking Cookie Domain</label>
|
136 |
+
<comment>Change the tracking cookie domain</comment>
|
137 |
+
<frontend_type>text</frontend_type>
|
138 |
+
<sort_order>50</sort_order>
|
139 |
+
<show_in_default>1</show_in_default>
|
140 |
+
<show_in_website>1</show_in_website>
|
141 |
+
<show_in_store>1</show_in_store>
|
142 |
+
</tracking_cookie_domain>
|
143 |
+
<tracking_cookie_path translate="label">
|
144 |
+
<label>Tracking Cookie Path</label>
|
145 |
+
<comment>Change the tracking cookie path (Default: /)</comment>
|
146 |
+
<frontend_type>text</frontend_type>
|
147 |
+
<sort_order>60</sort_order>
|
148 |
+
<show_in_default>1</show_in_default>
|
149 |
+
<show_in_website>1</show_in_website>
|
150 |
+
<show_in_store>1</show_in_store>
|
151 |
+
</tracking_cookie_path>
|
152 |
+
<ping translate="label">
|
153 |
+
<label>Ping</label>
|
154 |
+
<comment>Enable/Disable the periodic pings (Default: Enable)</comment>
|
155 |
+
<frontend_type>select</frontend_type>
|
156 |
+
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
157 |
+
<sort_order>70</sort_order>
|
158 |
+
<show_in_default>1</show_in_default>
|
159 |
+
<show_in_website>1</show_in_website>
|
160 |
+
<show_in_store>1</show_in_store>
|
161 |
+
</ping>
|
162 |
+
<ping_interval translate="label">
|
163 |
+
<label>Ping Interval</label>
|
164 |
+
<comment>Change ping interval (Default: 12000 milliseconds)</comment>
|
165 |
+
<frontend_type>text</frontend_type>
|
166 |
+
<validate>validate-digits</validate>
|
167 |
+
<sort_order>80</sort_order>
|
168 |
+
<show_in_default>1</show_in_default>
|
169 |
+
<show_in_website>1</show_in_website>
|
170 |
+
<show_in_store>1</show_in_store>
|
171 |
+
</ping_interval>
|
172 |
+
<download_tracking translate="label">
|
173 |
+
<label>Download Tracking</label>
|
174 |
+
<comment>Enable/Disable download tracking (Default: Enable)</comment>
|
175 |
+
<frontend_type>select</frontend_type>
|
176 |
+
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
177 |
+
<sort_order>90</sort_order>
|
178 |
+
<show_in_default>1</show_in_default>
|
179 |
+
<show_in_website>1</show_in_website>
|
180 |
+
<show_in_store>1</show_in_store>
|
181 |
+
</download_tracking>
|
182 |
+
<download_tracking_pause translate="label">
|
183 |
+
<label>Download Tracking Pause</label>
|
184 |
+
<comment>Change download pause to guarantee the tracking request is sent (Default: 200 milliseconds)</comment>
|
185 |
+
<frontend_type>text</frontend_type>
|
186 |
+
<validate>validate-digits</validate>
|
187 |
+
<sort_order>100</sort_order>
|
188 |
+
<show_in_default>1</show_in_default>
|
189 |
+
<show_in_website>1</show_in_website>
|
190 |
+
<show_in_store>1</show_in_store>
|
191 |
+
</download_tracking_pause>
|
192 |
+
<outgoing_tracking translate="label">
|
193 |
+
<label>Outgoing Link Tracking</label>
|
194 |
+
<comment>Enable/Disable outgoing links tracking (Default: Enable)</comment>
|
195 |
+
<frontend_type>select</frontend_type>
|
196 |
+
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
197 |
+
<sort_order>110</sort_order>
|
198 |
+
<show_in_default>1</show_in_default>
|
199 |
+
<show_in_website>1</show_in_website>
|
200 |
+
<show_in_store>1</show_in_store>
|
201 |
+
</outgoing_tracking>
|
202 |
+
<outgoing_tracking_pause translate="label">
|
203 |
+
<label>Outgoing Link Tracking Pause</label>
|
204 |
+
<comment>Change outgoing link pause to guarantee the tracking request is sent (Default: 200 milliseconds)</comment>
|
205 |
+
<frontend_type>text</frontend_type>
|
206 |
+
<validate>validate-digits</validate>
|
207 |
+
<sort_order>120</sort_order>
|
208 |
+
<show_in_default>1</show_in_default>
|
209 |
+
<show_in_website>1</show_in_website>
|
210 |
+
<show_in_store>1</show_in_store>
|
211 |
+
</outgoing_tracking_pause>
|
212 |
+
</fields>
|
213 |
+
</woopra_advanced>
|
214 |
+
<woopra_outputs translate="label" module="woopra">
|
215 |
+
<label>Name/Disable Woopra Outputs</label>
|
216 |
+
<frontend_type>text</frontend_type>
|
217 |
+
<sort_order>30</sort_order>
|
218 |
+
<show_in_default>1</show_in_default>
|
219 |
+
<show_in_website>1</show_in_website>
|
220 |
+
<show_in_store>1</show_in_store>
|
221 |
+
<expanded>0</expanded>
|
222 |
+
<comment>You can disable outputs here that you do not want to use. On some servers a performance gain may be noticed by disabling unused calls.</comment>
|
223 |
+
<fields>
|
224 |
+
<customer_name translate="label">
|
225 |
+
<label>Customer Name</label>
|
226 |
+
<comment>Customer name output name (empty to disable).</comment>
|
227 |
+
<frontend_type>text</frontend_type>
|
228 |
+
<sort_order>10</sort_order>
|
229 |
+
<show_in_default>1</show_in_default>
|
230 |
+
<show_in_website>1</show_in_website>
|
231 |
+
<show_in_store>1</show_in_store>
|
232 |
+
</customer_name>
|
233 |
+
<customer_email translate="label">
|
234 |
+
<label>Customer Email</label>
|
235 |
+
<comment>Customer email output name (empty to disable).</comment>
|
236 |
+
<frontend_type>text</frontend_type>
|
237 |
+
<sort_order>20</sort_order>
|
238 |
+
<show_in_default>1</show_in_default>
|
239 |
+
<show_in_website>1</show_in_website>
|
240 |
+
<show_in_store>1</show_in_store>
|
241 |
+
</customer_email>
|
242 |
+
<customer_company translate="label">
|
243 |
+
<label>Customer Company</label>
|
244 |
+
<comment>Customer company output name (empty to disable).</comment>
|
245 |
+
<frontend_type>text</frontend_type>
|
246 |
+
<sort_order>30</sort_order>
|
247 |
+
<show_in_default>1</show_in_default>
|
248 |
+
<show_in_website>1</show_in_website>
|
249 |
+
<show_in_store>1</show_in_store>
|
250 |
+
</customer_company>
|
251 |
+
<customer_location translate="label">
|
252 |
+
<label>Customer Location</label>
|
253 |
+
<comment>Customer location output name (empty to disable).</comment>
|
254 |
+
<frontend_type>text</frontend_type>
|
255 |
+
<sort_order>40</sort_order>
|
256 |
+
<show_in_default>1</show_in_default>
|
257 |
+
<show_in_website>1</show_in_website>
|
258 |
+
<show_in_store>1</show_in_store>
|
259 |
+
</customer_location>
|
260 |
+
<customer_phone translate="label">
|
261 |
+
<label>Customer Phone</label>
|
262 |
+
<comment>Customer phone output name (empty to disable).</comment>
|
263 |
+
<frontend_type>text</frontend_type>
|
264 |
+
<sort_order>50</sort_order>
|
265 |
+
<show_in_default>1</show_in_default>
|
266 |
+
<show_in_website>1</show_in_website>
|
267 |
+
<show_in_store>1</show_in_store>
|
268 |
+
</customer_phone>
|
269 |
+
<customer_group translate="label">
|
270 |
+
<label>Customer Group</label>
|
271 |
+
<comment>Customer group output name (empty to disable).</comment>
|
272 |
+
<frontend_type>text</frontend_type>
|
273 |
+
<sort_order>60</sort_order>
|
274 |
+
<show_in_default>1</show_in_default>
|
275 |
+
<show_in_website>1</show_in_website>
|
276 |
+
<show_in_store>1</show_in_store>
|
277 |
+
</customer_group>
|
278 |
+
<customer_lifetime_sales translate="label">
|
279 |
+
<label>Lifetime Sales</label>
|
280 |
+
<comment>Customer lifetime sales output name (empty to disable).</comment>
|
281 |
+
<frontend_type>text</frontend_type>
|
282 |
+
<sort_order>70</sort_order>
|
283 |
+
<show_in_default>1</show_in_default>
|
284 |
+
<show_in_website>1</show_in_website>
|
285 |
+
<show_in_store>1</show_in_store>
|
286 |
+
</customer_lifetime_sales>
|
287 |
+
<customer_number_orders translate="label">
|
288 |
+
<label>Lifetime Orders Placed</label>
|
289 |
+
<comment>Customer number of orders output name (empty to disable).</comment>
|
290 |
+
<frontend_type>text</frontend_type>
|
291 |
+
<sort_order>80</sort_order>
|
292 |
+
<show_in_default>1</show_in_default>
|
293 |
+
<show_in_website>1</show_in_website>
|
294 |
+
<show_in_store>1</show_in_store>
|
295 |
+
</customer_number_orders>
|
296 |
+
<customer_create_date translate="label">
|
297 |
+
<label>Create Account Date</label>
|
298 |
+
<comment>Customer account creation date output name (empty to disable).</comment>
|
299 |
+
<frontend_type>text</frontend_type>
|
300 |
+
<sort_order>90</sort_order>
|
301 |
+
<show_in_default>1</show_in_default>
|
302 |
+
<show_in_website>1</show_in_website>
|
303 |
+
<show_in_store>1</show_in_store>
|
304 |
+
</customer_create_date>
|
305 |
+
<customer_cart_items translate="label">
|
306 |
+
<label>Total Items in Cart</label>
|
307 |
+
<comment>Customer total items in cart output name (empty to disable).</comment>
|
308 |
+
<frontend_type>text</frontend_type>
|
309 |
+
<sort_order>100</sort_order>
|
310 |
+
<show_in_default>1</show_in_default>
|
311 |
+
<show_in_website>1</show_in_website>
|
312 |
+
<show_in_store>1</show_in_store>
|
313 |
+
</customer_cart_items>
|
314 |
+
<customer_cart_total translate="label">
|
315 |
+
<label>Cart Total</label>
|
316 |
+
<comment>Customer cart total output name (empty to disable).</comment>
|
317 |
+
<frontend_type>text</frontend_type>
|
318 |
+
<sort_order>110</sort_order>
|
319 |
+
<show_in_default>1</show_in_default>
|
320 |
+
<show_in_website>1</show_in_website>
|
321 |
+
<show_in_store>1</show_in_store>
|
322 |
+
</customer_cart_total>
|
323 |
+
<customer_wishlist_items translate="label">
|
324 |
+
<label>Total Items in Wishlist</label>
|
325 |
+
<comment>Customer total items in wishlist output name (empty to disable).</comment>
|
326 |
+
<frontend_type>text</frontend_type>
|
327 |
+
<sort_order>120</sort_order>
|
328 |
+
<show_in_default>1</show_in_default>
|
329 |
+
<show_in_website>1</show_in_website>
|
330 |
+
<show_in_store>1</show_in_store>
|
331 |
+
</customer_wishlist_items>
|
332 |
+
<customer_wishlist_total translate="label">
|
333 |
+
<label>Wishlist Total</label>
|
334 |
+
<comment>Customer wishlist total output name (empty to disable).</comment>
|
335 |
+
<frontend_type>text</frontend_type>
|
336 |
+
<sort_order>130</sort_order>
|
337 |
+
<show_in_default>1</show_in_default>
|
338 |
+
<show_in_website>1</show_in_website>
|
339 |
+
<show_in_store>1</show_in_store>
|
340 |
+
</customer_wishlist_total>
|
341 |
+
</fields>
|
342 |
+
</woopra_outputs>
|
343 |
+
<woopra_events translate="label" module="woopra">
|
344 |
+
<label>Name/Disable Woopra Event Tracking</label>
|
345 |
+
<frontend_type>text</frontend_type>
|
346 |
+
<sort_order>40</sort_order>
|
347 |
+
<show_in_default>1</show_in_default>
|
348 |
+
<show_in_website>1</show_in_website>
|
349 |
+
<show_in_store>1</show_in_store>
|
350 |
+
<expanded>0</expanded>
|
351 |
+
<comment>You can disable event tracking here that you do not want to use. On some servers a performance gain may be noticed by disabling unused calls.</comment>
|
352 |
+
<fields>
|
353 |
+
<catalog_search translate="label">
|
354 |
+
<label>Catalog Search</label>
|
355 |
+
<comment>Catalog search event tracking name (empty to disable).</comment>
|
356 |
+
<frontend_type>text</frontend_type>
|
357 |
+
<sort_order>10</sort_order>
|
358 |
+
<show_in_default>1</show_in_default>
|
359 |
+
<show_in_website>1</show_in_website>
|
360 |
+
<show_in_store>1</show_in_store>
|
361 |
+
</catalog_search>
|
362 |
+
<changed_password translate="label">
|
363 |
+
<label>Changed Password</label>
|
364 |
+
<comment>Changed password event tracking name (empty to disable).</comment>
|
365 |
+
<frontend_type>text</frontend_type>
|
366 |
+
<sort_order>15</sort_order>
|
367 |
+
<show_in_default>1</show_in_default>
|
368 |
+
<show_in_website>1</show_in_website>
|
369 |
+
<show_in_store>1</show_in_store>
|
370 |
+
</changed_password>
|
371 |
+
<checkout_billing_address translate="label">
|
372 |
+
<label>Checkout Billing Address</label>
|
373 |
+
<comment>Checkout step billing address event tracking name (empty to disable).</comment>
|
374 |
+
<frontend_type>text</frontend_type>
|
375 |
+
<sort_order>20</sort_order>
|
376 |
+
<show_in_default>1</show_in_default>
|
377 |
+
<show_in_website>1</show_in_website>
|
378 |
+
<show_in_store>1</show_in_store>
|
379 |
+
</checkout_billing_address>
|
380 |
+
<checkout_shipping_address translate="label">
|
381 |
+
<label>Checkout Shipping Address</label>
|
382 |
+
<comment>Checkout step shipping address event tracking name (empty to disable).</comment>
|
383 |
+
<frontend_type>text</frontend_type>
|
384 |
+
<sort_order>30</sort_order>
|
385 |
+
<show_in_default>1</show_in_default>
|
386 |
+
<show_in_website>1</show_in_website>
|
387 |
+
<show_in_store>1</show_in_store>
|
388 |
+
</checkout_shipping_address>
|
389 |
+
<checkout_shipping_method translate="label">
|
390 |
+
<label>Checkout Shipping Method</label>
|
391 |
+
<comment>Checkout step billing address event tracking name (empty to disable).</comment>
|
392 |
+
<frontend_type>text</frontend_type>
|
393 |
+
<sort_order>40</sort_order>
|
394 |
+
<show_in_default>1</show_in_default>
|
395 |
+
<show_in_website>1</show_in_website>
|
396 |
+
<show_in_store>1</show_in_store>
|
397 |
+
</checkout_shipping_method>
|
398 |
+
<checkout_payment_method translate="label">
|
399 |
+
<label>Checkout Payment Method</label>
|
400 |
+
<comment>Checkout step payment method event tracking name (empty to disable).</comment>
|
401 |
+
<frontend_type>text</frontend_type>
|
402 |
+
<sort_order>50</sort_order>
|
403 |
+
<show_in_default>1</show_in_default>
|
404 |
+
<show_in_website>1</show_in_website>
|
405 |
+
<show_in_store>1</show_in_store>
|
406 |
+
</checkout_payment_method>
|
407 |
+
<checkout_review translate="label">
|
408 |
+
<label>Checkout Review</label>
|
409 |
+
<comment>Checkout step review event tracking name (empty to disable).</comment>
|
410 |
+
<frontend_type>text</frontend_type>
|
411 |
+
<sort_order>60</sort_order>
|
412 |
+
<show_in_default>1</show_in_default>
|
413 |
+
<show_in_website>1</show_in_website>
|
414 |
+
<show_in_store>1</show_in_store>
|
415 |
+
</checkout_review>
|
416 |
+
<checkout_success translate="label">
|
417 |
+
<label>Checkout Success</label>
|
418 |
+
<comment>Checkout success event tracking name (empty to disable).</comment>
|
419 |
+
<frontend_type>text</frontend_type>
|
420 |
+
<sort_order>70</sort_order>
|
421 |
+
<show_in_default>1</show_in_default>
|
422 |
+
<show_in_website>1</show_in_website>
|
423 |
+
<show_in_store>1</show_in_store>
|
424 |
+
</checkout_success>
|
425 |
+
<cms_no_route translate="label">
|
426 |
+
<label>CMS No Route</label>
|
427 |
+
<comment>CMS no route (404) event tracking name (empty to disable).</comment>
|
428 |
+
<frontend_type>text</frontend_type>
|
429 |
+
<sort_order>80</sort_order>
|
430 |
+
<show_in_default>1</show_in_default>
|
431 |
+
<show_in_website>1</show_in_website>
|
432 |
+
<show_in_store>1</show_in_store>
|
433 |
+
</cms_no_route>
|
434 |
+
<contact_form_sent translate="label">
|
435 |
+
<label>Contact Form Sent</label>
|
436 |
+
<comment>Contact form sent event tracking name (empty to disable).</comment>
|
437 |
+
<frontend_type>text</frontend_type>
|
438 |
+
<sort_order>90</sort_order>
|
439 |
+
<show_in_default>1</show_in_default>
|
440 |
+
<show_in_website>1</show_in_website>
|
441 |
+
<show_in_store>1</show_in_store>
|
442 |
+
</contact_form_sent>
|
443 |
+
<coupon_added translate="label">
|
444 |
+
<label>Coupon Code Added</label>
|
445 |
+
<comment>Coupon code added event tracking name (empty to disable).</comment>
|
446 |
+
<frontend_type>text</frontend_type>
|
447 |
+
<sort_order>100</sort_order>
|
448 |
+
<show_in_default>1</show_in_default>
|
449 |
+
<show_in_website>1</show_in_website>
|
450 |
+
<show_in_store>1</show_in_store>
|
451 |
+
</coupon_added>
|
452 |
+
<coupon_removed translate="label">
|
453 |
+
<label>Coupon Code Removed</label>
|
454 |
+
<comment>Coupon code removed event tracking name (empty to disable).</comment>
|
455 |
+
<frontend_type>text</frontend_type>
|
456 |
+
<sort_order>110</sort_order>
|
457 |
+
<show_in_default>1</show_in_default>
|
458 |
+
<show_in_website>1</show_in_website>
|
459 |
+
<show_in_store>1</show_in_store>
|
460 |
+
</coupon_removed>
|
461 |
+
<customer_create_account translate="label">
|
462 |
+
<label>Customer Create Account</label>
|
463 |
+
<comment>Customer create account event tracking name (empty to disable).</comment>
|
464 |
+
<frontend_type>text</frontend_type>
|
465 |
+
<sort_order>120</sort_order>
|
466 |
+
<show_in_default>1</show_in_default>
|
467 |
+
<show_in_website>1</show_in_website>
|
468 |
+
<show_in_store>1</show_in_store>
|
469 |
+
</customer_create_account>
|
470 |
+
<customer_create_account_success translate="label">
|
471 |
+
<label>Customer Create Account Success</label>
|
472 |
+
<comment>Customer create account success event tracking name (empty to disable).</comment>
|
473 |
+
<frontend_type>text</frontend_type>
|
474 |
+
<sort_order>125</sort_order>
|
475 |
+
<show_in_default>1</show_in_default>
|
476 |
+
<show_in_website>1</show_in_website>
|
477 |
+
<show_in_store>1</show_in_store>
|
478 |
+
</customer_create_account_success>
|
479 |
+
<customer_login translate="label">
|
480 |
+
<label>Customer Login</label>
|
481 |
+
<comment>Customer login event tracking name (empty to disable).</comment>
|
482 |
+
<frontend_type>text</frontend_type>
|
483 |
+
<sort_order>130</sort_order>
|
484 |
+
<show_in_default>1</show_in_default>
|
485 |
+
<show_in_website>1</show_in_website>
|
486 |
+
<show_in_store>1</show_in_store>
|
487 |
+
</customer_login>
|
488 |
+
<customer_logout translate="label">
|
489 |
+
<label>Customer Logout</label>
|
490 |
+
<comment>Customer logout event tracking name (empty to disable).</comment>
|
491 |
+
<frontend_type>text</frontend_type>
|
492 |
+
<sort_order>140</sort_order>
|
493 |
+
<show_in_default>1</show_in_default>
|
494 |
+
<show_in_website>1</show_in_website>
|
495 |
+
<show_in_store>1</show_in_store>
|
496 |
+
</customer_logout>
|
497 |
+
<estimate_post translate="label">
|
498 |
+
<label>Estimate Post</label>
|
499 |
+
<comment>Estimate post event tracking name (empty to disable).</comment>
|
500 |
+
<frontend_type>text</frontend_type>
|
501 |
+
<sort_order>150</sort_order>
|
502 |
+
<show_in_default>1</show_in_default>
|
503 |
+
<show_in_website>1</show_in_website>
|
504 |
+
<show_in_store>1</show_in_store>
|
505 |
+
</estimate_post>
|
506 |
+
<forgot_password translate="label">
|
507 |
+
<label>Forgot Password</label>
|
508 |
+
<comment>Forgot password event tracking name (empty to disable).</comment>
|
509 |
+
<frontend_type>text</frontend_type>
|
510 |
+
<sort_order>160</sort_order>
|
511 |
+
<show_in_default>1</show_in_default>
|
512 |
+
<show_in_website>1</show_in_website>
|
513 |
+
<show_in_store>1</show_in_store>
|
514 |
+
</forgot_password>
|
515 |
+
<newsletter_subscribed translate="label">
|
516 |
+
<label>Newsletter Subscribed</label>
|
517 |
+
<comment>Newsletter subscribed event tracking name (empty to disable).</comment>
|
518 |
+
<frontend_type>text</frontend_type>
|
519 |
+
<sort_order>170</sort_order>
|
520 |
+
<show_in_default>1</show_in_default>
|
521 |
+
<show_in_website>1</show_in_website>
|
522 |
+
<show_in_store>1</show_in_store>
|
523 |
+
</newsletter_subscribed>
|
524 |
+
<newsletter_unsubscribed translate="label">
|
525 |
+
<label>Newsletter Unsubscribed</label>
|
526 |
+
<comment>Newsletter unsubscribed event tracking name (empty to disable).</comment>
|
527 |
+
<frontend_type>text</frontend_type>
|
528 |
+
<sort_order>180</sort_order>
|
529 |
+
<show_in_default>1</show_in_default>
|
530 |
+
<show_in_website>1</show_in_website>
|
531 |
+
<show_in_store>1</show_in_store>
|
532 |
+
</newsletter_unsubscribed>
|
533 |
+
<poll_vote translate="label">
|
534 |
+
<label>Poll Vote</label>
|
535 |
+
<comment>Poll vote event tracking name (empty to disable).</comment>
|
536 |
+
<frontend_type>text</frontend_type>
|
537 |
+
<sort_order>190</sort_order>
|
538 |
+
<show_in_default>1</show_in_default>
|
539 |
+
<show_in_website>1</show_in_website>
|
540 |
+
<show_in_store>1</show_in_store>
|
541 |
+
</poll_vote>
|
542 |
+
<product_added_to_cart translate="label">
|
543 |
+
<label>Product Added To Cart</label>
|
544 |
+
<comment>Product added to cart event tracking name (empty to disable).</comment>
|
545 |
+
<frontend_type>text</frontend_type>
|
546 |
+
<sort_order>195</sort_order>
|
547 |
+
<show_in_default>1</show_in_default>
|
548 |
+
<show_in_website>1</show_in_website>
|
549 |
+
<show_in_store>1</show_in_store>
|
550 |
+
</product_added_to_cart>
|
551 |
+
<product_removed_from_cart translate="label">
|
552 |
+
<label>Product Removed From Cart</label>
|
553 |
+
<comment>Product removed from cart event tracking name (empty to disable).</comment>
|
554 |
+
<frontend_type>text</frontend_type>
|
555 |
+
<sort_order>200</sort_order>
|
556 |
+
<show_in_default>1</show_in_default>
|
557 |
+
<show_in_website>1</show_in_website>
|
558 |
+
<show_in_store>1</show_in_store>
|
559 |
+
</product_removed_from_cart>
|
560 |
+
<product_added_to_compare translate="label">
|
561 |
+
<label>Product Added To Compare</label>
|
562 |
+
<comment>Product added to compare event tracking name (empty to disable).</comment>
|
563 |
+
<frontend_type>text</frontend_type>
|
564 |
+
<sort_order>210</sort_order>
|
565 |
+
<show_in_default>1</show_in_default>
|
566 |
+
<show_in_website>1</show_in_website>
|
567 |
+
<show_in_store>1</show_in_store>
|
568 |
+
</product_added_to_compare>
|
569 |
+
<product_removed_from_compare translate="label">
|
570 |
+
<label>Product Removed From Compare</label>
|
571 |
+
<comment>Product removed from compare event tracking name (empty to disable).</comment>
|
572 |
+
<frontend_type>text</frontend_type>
|
573 |
+
<sort_order>220</sort_order>
|
574 |
+
<show_in_default>1</show_in_default>
|
575 |
+
<show_in_website>1</show_in_website>
|
576 |
+
<show_in_store>1</show_in_store>
|
577 |
+
</product_removed_from_compare>
|
578 |
+
<product_added_to_wishlist translate="label">
|
579 |
+
<label>Product Added To Wishlist</label>
|
580 |
+
<comment>Product added to wishlist event tracking name (empty to disable).</comment>
|
581 |
+
<frontend_type>text</frontend_type>
|
582 |
+
<sort_order>230</sort_order>
|
583 |
+
<show_in_default>1</show_in_default>
|
584 |
+
<show_in_website>1</show_in_website>
|
585 |
+
<show_in_store>1</show_in_store>
|
586 |
+
</product_added_to_wishlist>
|
587 |
+
<product_removed_from_wishlist translate="label">
|
588 |
+
<label>Product Removed From Wishlist</label>
|
589 |
+
<comment>Product removed from wishlist event tracking name (empty to disable).</comment>
|
590 |
+
<frontend_type>text</frontend_type>
|
591 |
+
<sort_order>240</sort_order>
|
592 |
+
<show_in_default>1</show_in_default>
|
593 |
+
<show_in_website>1</show_in_website>
|
594 |
+
<show_in_store>1</show_in_store>
|
595 |
+
</product_removed_from_wishlist>
|
596 |
+
<product_tag_added translate="label">
|
597 |
+
<label>Product Tag Added</label>
|
598 |
+
<comment>Product tag added event tracking name (empty to disable).</comment>
|
599 |
+
<frontend_type>text</frontend_type>
|
600 |
+
<sort_order>250</sort_order>
|
601 |
+
<show_in_default>1</show_in_default>
|
602 |
+
<show_in_website>1</show_in_website>
|
603 |
+
<show_in_store>1</show_in_store>
|
604 |
+
</product_tag_added>
|
605 |
+
<product_review_read translate="label">
|
606 |
+
<label>Product Review Read</label>
|
607 |
+
<comment>Product review read event tracking name (empty to disable).</comment>
|
608 |
+
<frontend_type>text</frontend_type>
|
609 |
+
<sort_order>260</sort_order>
|
610 |
+
<show_in_default>1</show_in_default>
|
611 |
+
<show_in_website>1</show_in_website>
|
612 |
+
<show_in_store>1</show_in_store>
|
613 |
+
</product_review_read>
|
614 |
+
<product_review_posted translate="label">
|
615 |
+
<label>Product Review Posted</label>
|
616 |
+
<comment>Product review posted event tracking name (empty to disable).</comment>
|
617 |
+
<frontend_type>text</frontend_type>
|
618 |
+
<sort_order>270</sort_order>
|
619 |
+
<show_in_default>1</show_in_default>
|
620 |
+
<show_in_website>1</show_in_website>
|
621 |
+
<show_in_store>1</show_in_store>
|
622 |
+
</product_review_posted>
|
623 |
+
</fields>
|
624 |
+
</woopra_events>
|
625 |
+
</groups>
|
626 |
+
</woopra_analytics>
|
627 |
+
</sections>
|
628 |
+
</config>
|
app/design/frontend/base/default/layout/woopra.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Woopra Module for Magento
|
5 |
+
*
|
6 |
+
* @package Woopra_Analytics
|
7 |
+
* @author K3Live for Woopra
|
8 |
+
* @copyright Copyright (c) 2013 Woopra (http://www.woopra.com/)
|
9 |
+
* @license Open Software License (OSL 3.0)
|
10 |
+
*/
|
11 |
+
-->
|
12 |
+
<layout>
|
13 |
+
<default>
|
14 |
+
<reference name="before_body_end">
|
15 |
+
<block type="woopra/script" name="woopra" as="woopra" template="woopra/script.phtml"/>
|
16 |
+
</reference>
|
17 |
+
</default>
|
18 |
+
</layout>
|
app/design/frontend/base/default/template/woopra/script.phtml
ADDED
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Woopra Module for Magento
|
4 |
+
*
|
5 |
+
* @package Woopra_Analytics
|
6 |
+
* @author K3Live for Woopra
|
7 |
+
* @copyright Copyright (c) 2013 Woopra (http://www.woopra.com/)
|
8 |
+
* @license Open Software License (OSL 3.0)
|
9 |
+
*/
|
10 |
+
?>
|
11 |
+
<?php if($this->getSetting('enabled')) { ?>
|
12 |
+
|
13 |
+
<!-- Start of Woopra Code -->
|
14 |
+
<?php if ($this->getSetting('woopra_checkout_trigger') == 1) { ?>
|
15 |
+
<script type="text/javascript">
|
16 |
+
Checkout.prototype.gotoSection = function(section) {
|
17 |
+
woopra_action = section;
|
18 |
+
if (woopra_action == '')
|
19 |
+
woopra_action = '<?php echo Mage::helper('woopra')->getCheckoutBillingAddress(); ?>';
|
20 |
+
else if (woopra_action == 'billing')
|
21 |
+
woopra_action = '<?php echo Mage::helper('woopra')->getCheckoutBillingAddress(); ?>';
|
22 |
+
else if (woopra_action == 'shipping')
|
23 |
+
woopra_action = '<?php echo Mage::helper('woopra')->getCheckoutShippingAddress(); ?>';
|
24 |
+
else if (woopra_action == 'shipping_method')
|
25 |
+
woopra_action = '<?php echo Mage::helper('woopra')->getCheckoutShippingMethod(); ?>';
|
26 |
+
else if (woopra_action == 'payment')
|
27 |
+
woopra_action = '<?php echo Mage::helper('woopra')->getCheckoutPaymentMethod(); ?>';
|
28 |
+
else if (woopra_action == 'review')
|
29 |
+
woopra_action = '<?php echo Mage::helper('woopra')->getCheckoutReview(); ?>';
|
30 |
+
try {
|
31 |
+
woopraTracker.pushEvent({
|
32 |
+
name: ''+woopra_action+''
|
33 |
+
});
|
34 |
+
} catch(err) { }
|
35 |
+
section = $('opc-'+section);
|
36 |
+
section.addClassName('allow');
|
37 |
+
this.accordion.openSection(section);
|
38 |
+
};
|
39 |
+
</script>
|
40 |
+
<?php } ?>
|
41 |
+
<script type="text/javascript">
|
42 |
+
function woopraReady(tracker) {
|
43 |
+
<?php if ($this->getSetting('tracking_cookie_expiration') != NULL) { ?> var expires = new Date();<?php echo "\n"; ?>
|
44 |
+
expires.setDate(expires.getDate() + <?php echo $this->getSetting('tracking_cookie_expiration'); ?>);
|
45 |
+
tracker.option('cookie_expire', expires);<?php echo "\n"; } ?>
|
46 |
+
<?php if ($this->getSetting('tracking_cookie_name') != NULL) { ?> tracker.option('cookie_name', '<?php echo $this->getSetting('tracking_cookie_name'); ?>');<?php echo "\n"; } ?>
|
47 |
+
<?php if ($this->getSetting('tracking_cookie_domain') != NULL) { ?> tracker.option('cookie_domain', '<?php echo $this->getSetting('tracking_cookie_domain'); ?>');<?php echo "\n"; } ?>
|
48 |
+
<?php if ($this->getSetting('tracking_cookie_path') != NULL) { ?> tracker.option('cookie_path', '<?php echo $this->getSetting('tracking_cookie_path'); ?>');<?php echo "\n"; } ?>
|
49 |
+
<?php if ($this->getSetting('ping') == 0) { ?> tracker.option('ping', false);<?php echo "\n"; } ?>
|
50 |
+
<?php if ($this->getSetting('ping_interval') != NULL && $this->getSetting('ping') == 1) { ?> tracker.option('ping_interval', <?php echo $this->getSetting('ping_interval'); ?>);<?php echo "\n"; } ?>
|
51 |
+
<?php if ($this->getSetting('download_tracking') == 0) { ?> tracker.option('download_tracking', false);<?php echo "\n"; } ?>
|
52 |
+
<?php if ($this->getSetting('download_tracking_pause') != NULL && $this->getSetting('download_tracking') == 1) { ?> tracker.option('download_pause', <?php echo $this->getSetting('download_tracking_pause'); ?>);<?php echo "\n"; } ?>
|
53 |
+
<?php if ($this->getSetting('outgoing_tracking') == 0) { ?> tracker.option('outgoing_tracking', false);<?php echo "\n"; } ?>
|
54 |
+
<?php if ($this->getSetting('outgoing_tracking_pause') != NULL && $this->getSetting('outgoing_tracking') == 1) { ?> tracker.option('outgoing_pause', <?php echo $this->getSetting('outgoing_tracking_pause'); ?>);<?php echo "\n"; } ?>
|
55 |
+
<?php if ($this->getSetting('hostname') != NULL) { ?> tracker.setDomain('<?php echo $this->getSetting('hostname'); ?>');<?php echo "\n"; ?>
|
56 |
+
<?php } else { ?> tracker.setDomain('<?php echo $this->getSetting('url'); ?>');<?php echo "\n"; } ?>
|
57 |
+
<?php if ($this->getSetting('visitor_timeout') != NULL) { ?> tracker.setIdleTimeout(<?php echo $this->getSetting('visitor_timeout') * 60 * 1000; ?>);<?php echo "\n"; ?>
|
58 |
+
<?php } else { ?> tracker.setIdleTimeout(1800000);<?php echo "\n"; } ?>
|
59 |
+
<?php if ($this->getSetting('subdomain') != NULL) { ?> tracker.option(<?php echo $this->getSetting('subdomain'); ?>);<?php echo "\n"; } ?>
|
60 |
+
<?php if ($this->getSetting('customer_name') != NULL) { ?> tracker.addVisitorProperty('<?php echo Mage::helper('woopra')->getCustomerName(); ?>', '<?php echo $this->getSetting('customer_name'); ?>');<?php echo "\n"; } ?>
|
61 |
+
<?php if ($this->getSetting('customer_email') != NULL) { ?> tracker.addVisitorProperty('<?php echo Mage::helper('woopra')->getCustomerEmail(); ?>', '<?php echo $this->getSetting('customer_email'); ?>');<?php echo "\n"; } ?>
|
62 |
+
<?php if ($this->getSetting('customer_company') != NULL) { ?> tracker.addVisitorProperty('<?php echo Mage::helper('woopra')->getCustomerCompany(); ?>', '<?php echo $this->getSetting('customer_company'); ?>');<?php echo "\n"; } ?>
|
63 |
+
<?php if ($this->getSetting('customer_location') != NULL) { ?> tracker.addVisitorProperty('<?php echo Mage::helper('woopra')->getCustomerLocation(); ?>', '<?php echo $this->getSetting('customer_location'); ?>');<?php echo "\n"; } ?>
|
64 |
+
<?php if ($this->getSetting('customer_phone') != NULL) { ?> tracker.addVisitorProperty('<?php echo Mage::helper('woopra')->getCustomerPhone(); ?>', '<?php echo $this->getSetting('customer_phone'); ?>');<?php echo "\n"; } ?>
|
65 |
+
<?php if ($this->getSetting('customer_group') != NULL) { ?> tracker.addVisitorProperty('<?php echo Mage::helper('woopra')->getCustomerGroup(); ?>', '<?php echo $this->getSetting('customer_group'); ?>');<?php echo "\n"; } ?>
|
66 |
+
<?php if ($this->getSetting('customer_lifetime_sales') != NULL) { ?> tracker.addVisitorProperty('<?php echo Mage::helper('woopra')->getCustomerLifetimeSales(); ?>', '<?php echo $this->getSetting('customer_lifetime_sales'); ?>');<?php echo "\n"; } ?>
|
67 |
+
<?php if ($this->getSetting('customer_number_orders') != NULL) { ?> tracker.addVisitorProperty('<?php echo Mage::helper('woopra')->getCustomerNumberOrders(); ?>', '<?php echo $this->getSetting('customer_number_orders'); ?>');<?php echo "\n"; } ?>
|
68 |
+
<?php if ($this->getSetting('customer_create_date') != NULL) { ?> tracker.addVisitorProperty('<?php echo Mage::helper('woopra')->getCustomerCreateDate(); ?>', '<?php echo $this->getSetting('customer_create_date'); ?>');<?php echo "\n"; } ?>
|
69 |
+
<?php if ($this->getSetting('customer_cart_items') != NULL) { ?> tracker.addVisitorProperty('<?php echo Mage::helper('woopra')->getCustomerCartItems(); ?>', '<?php echo $this->getSetting('customer_cart_items'); ?>');<?php echo "\n"; } ?>
|
70 |
+
<?php if ($this->getSetting('customer_cart_total') != NULL) { ?> tracker.addVisitorProperty('<?php echo Mage::helper('woopra')->getCustomerCartTotal(); ?>', '<?php echo $this->getSetting('customer_cart_total'); ?>');<?php echo "\n"; } ?>
|
71 |
+
<?php if ($this->getSetting('customer_wishlist_items') != NULL) { ?> tracker.addVisitorProperty('<?php echo Mage::helper('woopra')->getCustomerWishlistItems(); ?>', '<?php echo $this->getSetting('customer_wishlist_items'); ?>');<?php echo "\n"; } ?>
|
72 |
+
<?php if ($this->getSetting('customer_wishlist_total') != NULL) { ?> tracker.addVisitorProperty('<?php echo Mage::helper('woopra')->getCustomerWishlistTotal(); ?>', '<?php echo $this->getSetting('customer_wishlist_total'); ?>');<?php echo "\n"; } ?>
|
73 |
+
<?php if ($this->getSetting('woopra_cart_wishlist_trigger') == 1) { ?> tracker.pushEvent({<?php echo "\n";?>
|
74 |
+
name: '<?php echo $this->getSetting('woopra_cart_wishlist_status'); ?>',
|
75 |
+
product_name: '<?php echo $this->getSetting('woopra_cart_wishlist_name'); ?>',
|
76 |
+
product_sku: '<?php echo $this->getSetting('woopra_cart_wishlist_sku'); ?>',
|
77 |
+
product_price: '<?php echo $this->getSetting('woopra_cart_wishlist_price'); ?>'<?php if ($this->getSetting('woopra_product_review_trigger') == 1 || $this->getSetting('woopra_product_tag_added_trigger') == 1) { ?>,
|
78 |
+
<?php if ($this->getSetting('woopra_product_review_trigger') == 1) { ?>
|
79 |
+
review_nickname: '<?php echo $this->getSetting('woopra_product_review_nickname'); ?>',
|
80 |
+
review_title: '<?php echo $this->getSetting('woopra_product_review_title'); ?>',
|
81 |
+
review_detail: '<?php echo $this->getSetting('woopra_product_review_detail'); ?>'<?php } ?>
|
82 |
+
<?php if ($this->getSetting('woopra_product_tag_added_trigger') == 1) { ?>
|
83 |
+
product_tagged: '<?php echo $this->getSetting('woopra_product_tag_name'); ?>'<?php } ?>
|
84 |
+
<?php } echo "\n";?>
|
85 |
+
<?php echo " });\n"; } ?>
|
86 |
+
<?php if ($this->getSetting('woopra_subscriber_changed') == 1) { ?> tracker.pushEvent({<?php echo "\n";?>
|
87 |
+
name: '<?php echo $this->getSetting('woopra_subscriber_status'); ?>',
|
88 |
+
email: '<?php echo $this->getSetting('woopra_subscriber_email'); ?>'
|
89 |
+
<?php echo " });\n"; } ?>
|
90 |
+
<?php if ($this->getSetting('woopra_contacts_index_post') == 1) { ?> tracker.pushEvent({<?php echo "\n";?>
|
91 |
+
name: '<?php echo Mage::helper('woopra')->getContactFormSent(); ?>',
|
92 |
+
customer_name: '<?php echo $this->getSetting('woopra_contacts_name'); ?>',
|
93 |
+
customer_email: '<?php echo $this->getSetting('woopra_contacts_email'); ?>',
|
94 |
+
customer_telephone: '<?php echo $this->getSetting('woopra_contacts_telephone'); ?>',
|
95 |
+
customer_comment: '<?php echo $this->getSetting('woopra_contacts_comment'); ?>'
|
96 |
+
<?php echo " });\n"; } ?>
|
97 |
+
<?php if ($this->getSetting('woopra_search_trigger') == 1) { ?> tracker.pushEvent({<?php echo "\n";?>
|
98 |
+
name: '<?php echo Mage::helper('woopra')->getCatalogSearch(); ?>',
|
99 |
+
keywords: '<?php echo $this->getSetting('woopra_search_keywords'); ?>'
|
100 |
+
<?php echo " });\n"; } ?>
|
101 |
+
<?php if ($this->getSetting('woopra_cms_noroute_trigger') == 1) { ?> tracker.pushEvent({<?php echo "\n";?>
|
102 |
+
name: '<?php echo Mage::helper('woopra')->getCmsNoRoute(); ?>',
|
103 |
+
path: '<?php echo $this->getSetting('woopra_cms_noroute_path'); ?>',
|
104 |
+
url: '<?php echo $this->getSetting('woopra_cms_noroute_url'); ?>'
|
105 |
+
<?php echo " });\n"; } ?>
|
106 |
+
<?php if ($this->getSetting('woopra_forgot_password_trigger') == 1) { ?> tracker.pushEvent({<?php echo "\n";?>
|
107 |
+
name: '<?php echo Mage::helper('woopra')->getForgotPassword(); ?>',
|
108 |
+
email: '<?php echo $this->getSetting('woopra_forgot_password_email'); ?>'
|
109 |
+
<?php echo " });\n"; } ?>
|
110 |
+
<?php if ($this->getSetting('woopra_estimate_post_trigger') == 1) { ?> tracker.pushEvent({<?php echo "\n";?>
|
111 |
+
name: '<?php echo Mage::helper('woopra')->getEstimatePost(); ?>',
|
112 |
+
country: '<?php echo $this->getSetting('woopra_estimate_post_country'); ?>',
|
113 |
+
state: '<?php echo $this->getSetting('woopra_estimate_post_state'); ?>',
|
114 |
+
zip: '<?php echo $this->getSetting('woopra_estimate_post_zip'); ?>'
|
115 |
+
<?php echo " });\n"; } ?>
|
116 |
+
<?php if ($this->getSetting('woopra_password_changed_trigger') == 1) { ?> tracker.pushEvent({<?php echo "\n";?>
|
117 |
+
name: '<?php echo Mage::helper('woopra')->getChangedPassword(); ?>'
|
118 |
+
<?php echo " });\n"; } ?>
|
119 |
+
<?php if ($this->getSetting('woopra_create_account_trigger') == 1) { ?> tracker.pushEvent({<?php echo "\n";?>
|
120 |
+
name: '<?php echo Mage::helper('woopra')->getCustomerCreateAccount(); ?>'
|
121 |
+
<?php echo " });\n"; } ?>
|
122 |
+
<?php if ($this->getSetting('woopra_create_account_success_trigger') == 1) { ?> tracker.pushEvent({<?php echo "\n";?>
|
123 |
+
name: '<?php echo Mage::helper('woopra')->getCustomerCreateAccountSuccess(); ?>'
|
124 |
+
<?php echo " });\n"; } ?>
|
125 |
+
<?php if ($this->getSetting('woopra_poll_vote_trigger') == 1) { ?> tracker.pushEvent({<?php echo "\n";?>
|
126 |
+
name: '<?php echo Mage::helper('woopra')->getPollVote(); ?>',
|
127 |
+
poll_title: '<?php echo $this->getSetting('woopra_poll_vote_title'); ?>',
|
128 |
+
poll_vote: '<?php echo $this->getSetting('woopra_poll_vote_answer'); ?>'
|
129 |
+
<?php echo " });\n"; } ?>
|
130 |
+
<?php if ($this->getSetting('woopra_coupon_code_trigger') == 1) { ?> tracker.pushEvent({<?php echo "\n";?>
|
131 |
+
name: '<?php echo $this->getSetting('woopra_coupon_code_status'); ?>',
|
132 |
+
coupon_code: '<?php echo $this->getSetting('woopra_coupon_code'); ?>',
|
133 |
+
coupon_code_active: '<?php echo $this->getSetting('woopra_coupon_code_active'); ?>',
|
134 |
+
coupon_code_name: '<?php echo $this->getSetting('woopra_coupon_code_name'); ?>',
|
135 |
+
coupon_code_validity: '<?php echo $this->getSetting('woopra_coupon_code_validity'); ?>'
|
136 |
+
<?php echo " });\n"; } ?>
|
137 |
+
<?php if ($this->getSetting('woopra_login_logout_trigger') == 1) { ?> tracker.pushEvent({<?php echo "\n";?>
|
138 |
+
name: '<?php echo $this->getSetting('woopra_login_logout_status'); ?>'
|
139 |
+
<?php echo " });\n"; } ?>
|
140 |
+
<?php if ($this->getSetting('woopra_checkout_success_trigger') == 1) { ?> tracker.pushEvent({<?php echo "\n";?>
|
141 |
+
name: '<?php echo Mage::helper('woopra')->getCheckoutSuccess(); ?>',
|
142 |
+
<?php if ($this->getSetting('woopra_checkout_success_coupon_code') != NULL) { ?> coupon_code: '<?php echo $this->getSetting('woopra_checkout_success_coupon_code'); ?>',<?php echo "\n"; } ?>
|
143 |
+
<?php if ($this->getSetting('woopra_checkout_success_discount_amount') != 0) { ?> discount_amount: '<?php echo $this->getSetting('woopra_checkout_success_discount_amount'); ?>',<?php echo "\n"; } ?>
|
144 |
+
<?php if ($this->getSetting('woopra_checkout_payment_cc_type') != NULL) { ?> payment_cc_type: '<?php echo $this->getSetting('woopra_checkout_payment_cc_type'); ?>',<?php echo "\n"; } ?>
|
145 |
+
<?php if ($this->getSetting('woopra_checkout_success_profit') != NULL) { ?> profit: '<?php echo $this->getSetting('woopra_checkout_success_profit'); ?>',<?php echo "\n"; } ?>
|
146 |
+
order_id: '<?php echo $this->getSetting('woopra_checkout_success_order_id'); ?>',
|
147 |
+
subtotal: '<?php echo $this->getSetting('woopra_checkout_success_order_subtotal'); ?>',
|
148 |
+
total: '<?php echo $this->getSetting('woopra_checkout_success_order_total'); ?>',
|
149 |
+
weight: '<?php echo $this->getSetting('woopra_checkout_success_order_weight'); ?>',
|
150 |
+
payment_method: '<?php echo $this->getSetting('woopra_checkout_payment_method'); ?>',
|
151 |
+
shipping_amount: '<?php echo $this->getSetting('woopra_checkout_success_shipping_amount'); ?>',
|
152 |
+
shipping_method: '<?php echo $this->getSetting('woopra_checkout_success_shipping_description'); ?>',
|
153 |
+
total_items_ordered: '<?php echo $this->getSetting('woopra_checkout_success_total_items_ordered'); ?>'
|
154 |
+
<?php echo " });\n"; } ?>
|
155 |
+
<?php if ($this->getSetting('track_url_parameters') == 1) { ?> tracker.trackPageview({type:'pageview',url:window.location.pathname+window.location.search,title:document.title});<?php echo "\n"; ?>
|
156 |
+
<?php } else { ?> tracker.track();<?php echo "\n"; } ?>
|
157 |
+
return false;
|
158 |
+
}
|
159 |
+
(function(){
|
160 |
+
var wsc = document.createElement('script');
|
161 |
+
wsc.src = document.location.protocol+'//static.woopra.com/js/woopra.js';
|
162 |
+
wsc.type = 'text/javascript';
|
163 |
+
wsc.async = true;
|
164 |
+
var ssc = document.getElementsByTagName('script')[0];
|
165 |
+
ssc.parentNode.insertBefore(wsc, ssc);
|
166 |
+
})();
|
167 |
+
</script>
|
168 |
+
|
169 |
+
<?php if($this->getSetting('test')) { ?>
|
170 |
+
<script type="text/javascript">
|
171 |
+
alert('Woopra module is correctly installed, you can safely turn off the test alert.\n' +
|
172 |
+
'Data available to Woopra:\n' +
|
173 |
+
'Name: <?php echo $this->getSetting('customer_name'); ?>\n' +
|
174 |
+
'Email: <?php echo $this->getSetting('customer_email'); ?>\n' +
|
175 |
+
'Company: <?php echo $this->getSetting('customer_company'); ?>\n' +
|
176 |
+
'Location: <?php echo $this->getSetting('customer_location'); ?>\n' +
|
177 |
+
'Phone: <?php echo $this->getSetting('customer_phone'); ?>\n' +
|
178 |
+
'Group: <?php echo $this->getSetting('customer_group'); ?>\n' +
|
179 |
+
'Lifetime Sales: <?php echo $this->getSetting('customer_lifetime_sales'); ?>\n' +
|
180 |
+
'Number of Orders: <?php echo $this->getSetting('customer_number_orders'); ?>\n' +
|
181 |
+
'Account Create Date: <?php echo $this->getSetting('customer_create_date'); ?>\n' +
|
182 |
+
'Cart Items: <?php echo $this->getSetting('customer_cart_items'); ?>\n' +
|
183 |
+
'Cart Total: <?php echo $this->getSetting('customer_cart_total'); ?>\n' +
|
184 |
+
'Wishlist Items: <?php echo $this->getSetting('customer_wishlist_items'); ?>\n' +
|
185 |
+
'Wishlist Total: <?php echo $this->getSetting('customer_wishlist_total'); ?>\n');
|
186 |
+
</script><?php } ?>
|
187 |
+
<!-- End of Woopra Code -->
|
188 |
+
<?php } ?>
|
app/etc/modules/Woopra_Analytics.xml
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Woopra Module for Magento
|
5 |
+
*
|
6 |
+
* @package Woopra_Analytics
|
7 |
+
* @author K3Live for Woopra
|
8 |
+
* @copyright Copyright (c) 2013 Woopra (http://www.woopra.com/)
|
9 |
+
* @license Open Software License (OSL 3.0)
|
10 |
+
*/
|
11 |
+
-->
|
12 |
+
<config>
|
13 |
+
<modules>
|
14 |
+
<Woopra_Analytics>
|
15 |
+
<active>true</active>
|
16 |
+
<codePool>community</codePool>
|
17 |
+
</Woopra_Analytics>
|
18 |
+
</modules>
|
19 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Woopra_Analytics_Event_And_Visitor_Tracking</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/OSL-3.0">Open Software License (OSL)</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Track each step users take from anonymous visitor to converted unique customer with Woopra realtime analytics.</summary>
|
10 |
+
<description>Woopra has created the most advanced analytics tool on the Magento platform. This extension enables Woopra to build a comprehensive, real-time profile and timeline for every visitor. Tracking users from anonymous visitor, to converted unique customer. Watch each step a visitor takes and step-in to assist when needed with built-in real-time chat. Discover which customers are high-value, which ones are ready to purchase, and which ones are at risk of leaving.<br />
|
11 |
+
<a href="http://www.k3live.com/magento-extensions/magento-woopra-tracking"><img src="http://www.woopra.com/wp-content/uploads/2012/10/profile-v3-pile.png" /></a><br /><br />
|
12 |
+
A stunning real-time live dashboard delivers key real-time stats in a glance, while a simple click will break any metric down to an individual-level view.<br />
|
13 |
+
<a href="http://www.k3live.com/magento-extensions/magento-woopra-tracking"><img src="http://www.woopra.com/wp-content/uploads/2012/09/woopra-dashboard.png" /></a><br />
|
14 |
+
Gauge the level of activity of important customer segments currently engaged with your website and dig deeper to discover the users behind the numbers.<br /><br />
|
15 |
+
Use Retention Analytics, Funnel Analytics and Segmented Analytics to discover customer behavior. Unlike any other service, Woopra allows you to drill reports down to the individual level and export lists or automate, making your analytics directly actionable.<br />
|
16 |
+
<a href="http://www.k3live.com/magento-extensions/magento-woopra-tracking"><img src="http://www.woopra.com/wp-content/uploads/2012/09/woopra-analytics.png" /></a><br />
|
17 |
+
Access custom reports instantly. No more bugging IT. No old-school interfaces. No waiting for answers. Just the tools you need to make things happen.<br />
|
18 |
+
<br />
|
19 |
+
<a href="http://www.k3live.com/magento-extensions/magento-woopra-tracking"><img src="http://www.magentocommerce.com/magento-connect/media/catalog/product/w/o/woopra_tracking_5_1_1.png" /></a><br /><br />
|
20 |
+
Note: This module will not work without a subscription to the <a href="http://www.woopra.com/?woo_campaign=affiliate&woo_medium=referral&woo_source=k3live">Woopra</a> service.</description>
|
21 |
+
<notes>Initial Public Release</notes>
|
22 |
+
<authors><author><name>Woopra</name><user>Woopra</user><email>support@k3live.com</email></author><author><name>K3Live</name><user>K3Live</user><email>support@k3live.com</email></author></authors>
|
23 |
+
<date>2013-05-25</date>
|
24 |
+
<time>07:17:26</time>
|
25 |
+
<contents><target name="magecommunity"><dir><dir name="Woopra"><dir name="Analytics"><dir name="Block"><file name="Script.php" hash="a63b357f5c16bbed150b6bc3042b685a"/></dir><dir name="Helper"><file name="Data.php" hash="be8537fcc78c89b27604ac914f071e7b"/></dir><dir name="Model"><file name="Observer.php" hash="d0fa66a3110f759206bf39572fa10276"/></dir><dir name="etc"><file name="config.xml" hash="fe6ba38e23d9e35e4a1843fe9273acb6"/><file name="system.xml" hash="526dceb67dcbeda11aad1d4648ff105e"/></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="woopra.xml" hash="2e2a05eaee9dc48e9aba6f24b66fd9e3"/></dir><dir name="template"><dir name="woopra"><file name="script.phtml" hash="c07f622dfcdb07f8a3119140c2fd65ea"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Woopra_Analytics.xml" hash="a4715864833c0024017692871431cb91"/></dir></dir></target></contents>
|
26 |
+
<compatible/>
|
27 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
28 |
+
</package>
|