Optimiseweb_Getclicky - Version 0.1.6

Version Notes

* Added Cart Page goal
* Modified the module to use Goal IDs instead of Goal Names. Dynamics goals were not being tracked accurately.

Download this release

Release Info

Developer Kathir Vel
Extension Optimiseweb_Getclicky
Version 0.1.6
Comparing to
See all releases


Code changes from version 0.1.5 to 0.1.6

app/code/community/Optimiseweb/Getclicky/etc/adminhtml.xml CHANGED
@@ -1,4 +1,12 @@
1
  <?xml version="1.0" encoding="UTF-8"?>
 
 
 
 
 
 
 
 
2
  <config>
3
  <acl>
4
  <resources>
1
  <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * @package Optimiseweb_Getclicky
5
+ * @author Kathir Vel (sid@optimiseweb.co.uk)
6
+ * @copyright Copyright (c) 2012 Optimiseweb Ltd
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ -->
10
  <config>
11
  <acl>
12
  <resources>
app/code/community/Optimiseweb/Getclicky/etc/config.xml CHANGED
@@ -1,9 +1,17 @@
1
  <?xml version="1.0" encoding="UTF-8"?>
 
 
 
 
 
 
 
 
2
  <config>
3
 
4
  <modules>
5
  <Optimiseweb_Getclicky>
6
- <version>0.1.5</version>
7
  </Optimiseweb_Getclicky>
8
  </modules>
9
 
1
  <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * @package Optimiseweb_Getclicky
5
+ * @author Kathir Vel (sid@optimiseweb.co.uk)
6
+ * @copyright Copyright (c) 2012 Optimiseweb Ltd
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ -->
10
  <config>
11
 
12
  <modules>
13
  <Optimiseweb_Getclicky>
14
+ <version>0.1.6</version>
15
  </Optimiseweb_Getclicky>
16
  </modules>
17
 
app/code/community/Optimiseweb/Getclicky/etc/system.xml CHANGED
@@ -1,4 +1,12 @@
1
  <?xml version="1.0"?>
 
 
 
 
 
 
 
 
2
  <config>
3
 
4
  <tabs>
@@ -120,7 +128,7 @@
120
  </getclickygeneral>
121
 
122
  <goal_checkout_onepage_success translate="label comment">
123
- <label>Goal - Success Checkout Onepage</label>
124
  <comment>Tracks every successful order that lands on the /checkout/onepage/success/ page.</comment>
125
  <frontend_type>text</frontend_type>
126
  <sort_order>3</sort_order>
@@ -137,15 +145,16 @@
137
  <show_in_website>1</show_in_website>
138
  <show_in_store>1</show_in_store>
139
  </enabled>
140
- <goal_name translate="label comment">
141
- <label>Goal Name</label>
 
142
  <frontend_type>text</frontend_type>
143
  <validate>required-entry</validate>
144
  <sort_order>2</sort_order>
145
  <show_in_default>1</show_in_default>
146
  <show_in_website>1</show_in_website>
147
  <show_in_store>1</show_in_store>
148
- </goal_name>
149
  <goal_revenue translate="label comment">
150
  <label>Add order 'Grand Toal' as goal revenue?</label>
151
  <frontend_type>select</frontend_type>
@@ -158,6 +167,37 @@
158
  </fields>
159
  </goal_checkout_onepage_success>
160
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
  </groups>
162
 
163
  </optimisewebgetclickyconfig>
1
  <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @package Optimiseweb_Getclicky
5
+ * @author Kathir Vel (sid@optimiseweb.co.uk)
6
+ * @copyright Copyright (c) 2012 Optimiseweb Ltd
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ -->
10
  <config>
11
 
12
  <tabs>
128
  </getclickygeneral>
129
 
130
  <goal_checkout_onepage_success translate="label comment">
131
+ <label>Goal - Onepage Checkout Success</label>
132
  <comment>Tracks every successful order that lands on the /checkout/onepage/success/ page.</comment>
133
  <frontend_type>text</frontend_type>
134
  <sort_order>3</sort_order>
145
  <show_in_website>1</show_in_website>
146
  <show_in_store>1</show_in_store>
147
  </enabled>
148
+ <goal_id translate="label comment">
149
+ <label>Goal ID</label>
150
+ <comment>The goal management page in GetClicky lists the ID for each goal next to the goal's name.</comment>
151
  <frontend_type>text</frontend_type>
152
  <validate>required-entry</validate>
153
  <sort_order>2</sort_order>
154
  <show_in_default>1</show_in_default>
155
  <show_in_website>1</show_in_website>
156
  <show_in_store>1</show_in_store>
157
+ </goal_id>
158
  <goal_revenue translate="label comment">
159
  <label>Add order 'Grand Toal' as goal revenue?</label>
160
  <frontend_type>select</frontend_type>
167
  </fields>
168
  </goal_checkout_onepage_success>
169
 
170
+ <goal_cart_page translate="label comment">
171
+ <label>Goal - Cart Page</label>
172
+ <comment>Tracks every landing on the /checkout/cart/ page.</comment>
173
+ <frontend_type>text</frontend_type>
174
+ <sort_order>4</sort_order>
175
+ <show_in_default>1</show_in_default>
176
+ <show_in_website>1</show_in_website>
177
+ <show_in_store>1</show_in_store>
178
+ <fields>
179
+ <enabled translate="label comment">
180
+ <label>Enable?</label>
181
+ <frontend_type>select</frontend_type>
182
+ <source_model>adminhtml/system_config_source_yesno</source_model>
183
+ <sort_order>1</sort_order>
184
+ <show_in_default>1</show_in_default>
185
+ <show_in_website>1</show_in_website>
186
+ <show_in_store>1</show_in_store>
187
+ </enabled>
188
+ <goal_id translate="label comment">
189
+ <label>Goal ID</label>
190
+ <comment>The goal management page in GetClicky lists the ID for each goal next to the goal's name.</comment>
191
+ <frontend_type>text</frontend_type>
192
+ <validate>required-entry</validate>
193
+ <sort_order>2</sort_order>
194
+ <show_in_default>1</show_in_default>
195
+ <show_in_website>1</show_in_website>
196
+ <show_in_store>1</show_in_store>
197
+ </goal_id>
198
+ </fields>
199
+ </goal_cart_page>
200
+
201
  </groups>
202
 
203
  </optimisewebgetclickyconfig>
app/design/frontend/base/default/layout/optimiseweb_getclicky.xml CHANGED
@@ -1,4 +1,12 @@
1
  <?xml version="1.0"?>
 
 
 
 
 
 
 
 
2
  <layout version="0.1.0">
3
 
4
  <!-- Global Tracking Code -->
@@ -23,4 +31,15 @@
23
  </reference>
24
  </checkout_onepage_success>
25
 
 
 
 
 
 
 
 
 
 
 
 
26
  </layout>
1
  <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @package Optimiseweb_Getclicky
5
+ * @author Kathir Vel (sid@optimiseweb.co.uk)
6
+ * @copyright Copyright (c) 2012 Optimiseweb Ltd
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ -->
10
  <layout version="0.1.0">
11
 
12
  <!-- Global Tracking Code -->
31
  </reference>
32
  </checkout_onepage_success>
33
 
34
+ <!-- Cart Page -->
35
+ <checkout_cart_index>
36
+ <reference name="before_body_end">
37
+ <block type="core/template" name="Optimiseweb.Getclicky.Goals.Cart.Page" before="Optimiseweb.Getclicky.Tracker">
38
+ <action method="setTemplate" ifconfig="optimisewebgetclickyconfig/goal_cart_page/enabled">
39
+ <template>optimiseweb/getclicky/goals/cart-page.phtml</template>
40
+ </action>
41
+ </block>
42
+ </reference>
43
+ </checkout_cart_index>
44
+
45
  </layout>
app/design/frontend/base/default/template/optimiseweb/getclicky/goals/cart-page.phtml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * @package Optimiseweb_Getclicky
5
+ * @author Kathir Vel (sid@optimiseweb.co.uk)
6
+ * @copyright Copyright (c) 2012 Optimiseweb Ltd
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ $getClickyGoalEnabled = Mage::getStoreConfig('optimisewebgetclickyconfig/goal_cart_page/enabled');
10
+ $getClickyGoalId = Mage::getStoreConfig('optimisewebgetclickyconfig/goal_cart_page/goal_id');
11
+
12
+ /* Build the Code */
13
+ $js = "";
14
+ $js .= "<script type=\"text/javascript\">\n";
15
+ $js .= "var clicky_custom = clicky_custom || {};\n";
16
+ $js .= "clicky_custom.goal = {\n";
17
+ $js .= "id: \"" . $getClickyGoalId . "\"\n";
18
+ $js .= "};\n";
19
+ $js .= "</script>\n";
20
+
21
+ echo $js;
app/design/frontend/base/default/template/optimiseweb/getclicky/goals/checkout-onepage-success.phtml CHANGED
@@ -7,31 +7,35 @@
7
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
  */
9
  $getClickyGoalEnabled = Mage::getStoreConfig('optimisewebgetclickyconfig/goal_checkout_onepage_success/enabled');
10
- $getClickyGoalName = Mage::getStoreConfig('optimisewebgetclickyconfig/goal_checkout_onepage_success/goal_name');
11
  $getClickyGoalRevenue = Mage::getStoreConfig('optimisewebgetclickyconfig/goal_checkout_onepage_success/goal_revenue');
12
 
 
 
13
  /* Get Order Grand Total */
14
  if ($getClickyGoalRevenue)
15
  {
16
  $getClickyOrder = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId());
17
- $getClickyGrandTotal = number_format($getClickyOrder->getGrandTotal(), 2);
18
  }
19
 
20
  /* Build the Code */
21
- $js = '<script>';
22
- $js .= 'var clicky_custom = {};';
23
- $js .= 'clicky_custom.goal = {';
24
- if ($getClickyGrandTotal)
 
25
  {
26
- $js .= 'name: \'' . $getClickyGoalName . '\',';
27
- $js .= 'revenue: \'' . $getClickyGrandTotal . '\'';
28
  }
29
  else
30
  {
31
- $js .= 'name: \'' . $getClickyGoalName . '\'';
32
  }
33
- $js .= '};';
34
- $js .= '</script>';
 
35
  echo $js;
36
 
37
  /* $subTotal = $order->getSubtotal(); */
7
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
  */
9
  $getClickyGoalEnabled = Mage::getStoreConfig('optimisewebgetclickyconfig/goal_checkout_onepage_success/enabled');
10
+ $getClickyGoalId = Mage::getStoreConfig('optimisewebgetclickyconfig/goal_checkout_onepage_success/goal_id');
11
  $getClickyGoalRevenue = Mage::getStoreConfig('optimisewebgetclickyconfig/goal_checkout_onepage_success/goal_revenue');
12
 
13
+ $getClickyGrandTotal = FALSE;
14
+
15
  /* Get Order Grand Total */
16
  if ($getClickyGoalRevenue)
17
  {
18
  $getClickyOrder = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId());
19
+ $getClickyGrandTotal = number_format($getClickyOrder->getGrandTotal(), 2, '.', '');
20
  }
21
 
22
  /* Build the Code */
23
+ $js = "";
24
+ $js .= "<script type=\"text/javascript\">\n";
25
+ $js .= "var clicky_custom = clicky_custom || {};\n";
26
+ $js .= "clicky_custom.goal = {\n";
27
+ if ($getClickyGoalRevenue AND $getClickyGrandTotal)
28
  {
29
+ $js .= "id: \"" . $getClickyGoalId . "\",\n";
30
+ $js .= "revenue: \"" . $getClickyGrandTotal . "\"\n";
31
  }
32
  else
33
  {
34
+ $js .= "id: \"" . $getClickyGoalId . "\"\n";
35
  }
36
+ $js .= "};\n";
37
+ $js .= "</script>\n";
38
+
39
  echo $js;
40
 
41
  /* $subTotal = $order->getSubtotal(); */
app/etc/modules/Optimiseweb_Getclicky.xml CHANGED
@@ -1,4 +1,12 @@
1
  <?xml version="1.0"?>
 
 
 
 
 
 
 
 
2
  <config>
3
  <modules>
4
  <Optimiseweb_Getclicky>
1
  <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @package Optimiseweb_Getclicky
5
+ * @author Kathir Vel (sid@optimiseweb.co.uk)
6
+ * @copyright Copyright (c) 2012 Optimiseweb Ltd
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ -->
10
  <config>
11
  <modules>
12
  <Optimiseweb_Getclicky>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Optimiseweb_Getclicky</name>
4
- <version>0.1.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -10,11 +10,12 @@
10
  <description>GetClicky is a real time web analytics service. This extension is a GetClicky integration for the Magento eCommerce platform. Optimise Web's GetClicky integration extension allows store owners to enable GetClicky tracking for their websites. This extension can send checkout successes and revenues as dynamic goals to GetClicky.&#xD;
11
  &#xD;
12
  This extension comes with a complete configuration screen where all options can be configured.</description>
13
- <notes>Code optimisation</notes>
 
14
  <authors><author><name>Kathir Vel</name><user>OptimiseWeb</user><email>info@optimiseweb.co.uk</email></author></authors>
15
- <date>2012-10-15</date>
16
- <time>23:05:57</time>
17
- <contents><target name="magecommunity"><dir name="Optimiseweb"><dir name="Getclicky"><dir name="Helper"><file name="Data.php" hash="f9d9d294ad02c05b31d259bc8151ad26"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Trackertypes.php" hash="f7d8f1aba638867d8525f6f5a6f7f21a"/></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="9135628abccc1e78bcee5fe6a0ee2ab0"/><file name="config.xml" hash="ceffe1ae390af7aae3906caf6f69f0f3"/><file name="system.xml" hash="61b7fba44d18ef41eb04d4bdeb21829f"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Optimiseweb_Getclicky.xml" hash="72a085b4f02582a11b2490643b34439a"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="optimiseweb_getclicky.xml" hash="1e8fd6b42b3e6ea08928fde2e749d1f8"/></dir><dir name="template"><dir name="optimiseweb"><dir name="getclicky"><dir name="goals"><file name="checkout-onepage-success.phtml" hash="2775e82d101de25109d24e6f753161b2"/></dir><file name="tracker.phtml" hash="60416d94ac711841873fdae739076f1c"/></dir></dir></dir></dir></dir></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
20
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Optimiseweb_Getclicky</name>
4
+ <version>0.1.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
10
  <description>GetClicky is a real time web analytics service. This extension is a GetClicky integration for the Magento eCommerce platform. Optimise Web's GetClicky integration extension allows store owners to enable GetClicky tracking for their websites. This extension can send checkout successes and revenues as dynamic goals to GetClicky.&#xD;
11
  &#xD;
12
  This extension comes with a complete configuration screen where all options can be configured.</description>
13
+ <notes>* Added Cart Page goal&#xD;
14
+ * Modified the module to use Goal IDs instead of Goal Names. Dynamics goals were not being tracked accurately.</notes>
15
  <authors><author><name>Kathir Vel</name><user>OptimiseWeb</user><email>info@optimiseweb.co.uk</email></author></authors>
16
+ <date>2012-10-16</date>
17
+ <time>13:29:16</time>
18
+ <contents><target name="magecommunity"><dir name="Optimiseweb"><dir name="Getclicky"><dir name="Helper"><file name="Data.php" hash="f9d9d294ad02c05b31d259bc8151ad26"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Trackertypes.php" hash="f7d8f1aba638867d8525f6f5a6f7f21a"/></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="70ba2544fa4b175ac9421645c3d80066"/><file name="config.xml" hash="0bcaaa7a8c1b34784af916175ae3373a"/><file name="system.xml" hash="e01166cc0b096bd3d473d63c9046ebed"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Optimiseweb_Getclicky.xml" hash="992d5e0b030267e568d63769e70c68f7"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="optimiseweb_getclicky.xml" hash="fd84f5896f2e0655086cf17a9b88bc0e"/></dir><dir name="template"><dir name="optimiseweb"><dir name="getclicky"><dir name="goals"><file name="cart-page.phtml" hash="f2c6efd66793a662e17b4d71fb8d5006"/><file name="checkout-onepage-success.phtml" hash="1b05287d181e4dccfe5aacb4f936428d"/></dir><file name="tracker.phtml" hash="60416d94ac711841873fdae739076f1c"/></dir></dir></dir></dir></dir></dir></target></contents>
19
  <compatible/>
20
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
21
  </package>