Version Notes
N/A
Download this release
Release Info
Developer | Andrew Jackson Solar Communications |
Extension | ppc_call_tracker |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/local/Apj/PpcCallTracker/Block/Ppc.php +145 -0
- app/code/local/Apj/PpcCallTracker/Helper/Data.php +14 -0
- app/code/local/Apj/PpcCallTracker/Model/Observer.php +21 -0
- app/code/local/Apj/PpcCallTracker/Model/Source/Cookietime.php +17 -0
- app/code/local/Apj/PpcCallTracker/controllers/IndexController.php +16 -0
- app/code/local/Apj/PpcCallTracker/etc/config.xml +69 -0
- app/code/local/Apj/PpcCallTracker/etc/system.xml +115 -0
- app/design/frontend/base/default/layout/ppccalltracker.xml +8 -0
- app/design/frontend/base/default/template/apj/ppccalltracker/ppccalltracker.phtml +22 -0
- app/etc/modules/Apj_PpcCallTracker.xml +9 -0
- package.xml +18 -0
app/code/local/Apj/PpcCallTracker/Block/Ppc.php
ADDED
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Apj_PpcCallTracker_Block_Ppc extends Mage_Core_Block_Template {
|
3 |
+
|
4 |
+
protected function _construct()
|
5 |
+
{
|
6 |
+
parent::_construct();
|
7 |
+
$this->setTemplate('apj/ppccalltracker/ppccalltracker.phtml');
|
8 |
+
}
|
9 |
+
|
10 |
+
public function getPPCNumber () {
|
11 |
+
|
12 |
+
$ppc_cookie_name = 'ppc_ct';
|
13 |
+
$ppc_cookie_type = 'ppc_ct_type';
|
14 |
+
$ppc_ct_cookie = Mage::getModel('core/cookie')->get($ppc_cookie_name);
|
15 |
+
$ppc_ct_cookie_type = Mage::getModel('core/cookie')->get($ppc_cookie_type);
|
16 |
+
$ppc_ct_parameter = '';
|
17 |
+
$ppc_ct_refferrer_google = '~https?://(www.)google.*?gclid~i';
|
18 |
+
$ppc_ct_refferrer_msn = '~https?://(www.|)bing.com~i';
|
19 |
+
$ppc_ct_refferrer_yahoo = '~https?://(www.|)yahoo.com~i';
|
20 |
+
$http_referrer = Mage::app()->getRequest()->getServer('HTTP_REFERER');
|
21 |
+
$gclid = Mage::app()->getRequest('gclid');
|
22 |
+
if(preg_match($ppc_ct_refferrer_google, $http_referrer) || $gclid ) {
|
23 |
+
$ppc_ct_parameter = 'google';
|
24 |
+
} elseif (preg_match($ppc_ct_refferrer_msn, $http_referrer)) {
|
25 |
+
$ppc_ct_parameter = 'msn';
|
26 |
+
} elseif (preg_match($ppc_ct_refferrer_yahoo, $http_referrer)) {
|
27 |
+
$ppc_ct_parameter = 'yahoo';
|
28 |
+
} else {
|
29 |
+
$ppc_ct_parameter = '';
|
30 |
+
}
|
31 |
+
|
32 |
+
|
33 |
+
//Get configuration values
|
34 |
+
$non_adwards_phone_number = Mage::getStoreConfig('ppccalltracker_options/tabgeneral/regularphone');
|
35 |
+
|
36 |
+
$google_adwards_phone_number = Mage::getStoreConfig('ppccalltracker_options/tabgeneral/googlephone');
|
37 |
+
|
38 |
+
$msn_adwards_phone_number = Mage::getStoreConfig('ppccalltracker_options/tabgeneral/msnphone');
|
39 |
+
|
40 |
+
$yahoo_adwards_phone_number = Mage::getStoreConfig('ppccalltracker_options/tabgeneral/yahoophone');
|
41 |
+
|
42 |
+
$ppc_ct_cookie_seconds = Mage::getStoreConfig('ppccalltracker_options/tabgeneral/cookiesec');
|
43 |
+
|
44 |
+
$ppc_ct_cookie_date = Mage::getStoreConfig('ppccalltracker_options/tabgeneral/cookietime');
|
45 |
+
|
46 |
+
$ppc_cookie_expiration = '';
|
47 |
+
//$cookie_path = "/";
|
48 |
+
//$cookie_domain = Mage::getBaseUrl();
|
49 |
+
|
50 |
+
/*====================================================================================*/
|
51 |
+
// Setting up Cookies //
|
52 |
+
/*====================================================================================*/
|
53 |
+
|
54 |
+
if($ppc_ct_cookie_date == 'first') { $cookie_expiration = $ppc_ct_cookie + $ppc_ct_cookie_seconds;}
|
55 |
+
|
56 |
+
else { $ppc_cookie_expiration = $ppc_ct_cookie_seconds;}
|
57 |
+
|
58 |
+
// if cookie not set
|
59 |
+
|
60 |
+
if ($ppc_ct_cookie === false) {
|
61 |
+
// if url parameter contains adwords data
|
62 |
+
if (isset($ppc_ct_parameter) && $ppc_ct_parameter == 'google') {
|
63 |
+
|
64 |
+
// set cookie to expire in defined number of seconds
|
65 |
+
Mage::getModel('core/cookie')->set($ppc_cookie_name, time(), $ppc_cookie_expiration);
|
66 |
+
Mage::getModel('core/cookie')->set($ppc_cookie_type, 'google', $ppc_cookie_expiration);
|
67 |
+
|
68 |
+
|
69 |
+
} elseif (isset($ppc_ct_parameter) && $ppc_ct_parameter == 'msn') {
|
70 |
+
// set cookie for msn Adwords
|
71 |
+
Mage::getModel('core/cookie')->set($ppc_cookie_name, time(), $ppc_cookie_expiration);
|
72 |
+
Mage::getModel('core/cookie')->set($ppc_cookie_type, 'msn', $ppc_cookie_expiration);
|
73 |
+
|
74 |
+
} elseif (isset($ppc_ct_parameter) && $ppc_ct_parameter == 'yahoo') {
|
75 |
+
// set cookie for Yahoo Adwords
|
76 |
+
Mage::getModel('core/cookie')->set($ppc_cookie_name, time(), $ppc_cookie_expiration);
|
77 |
+
Mage::getModel('core/cookie')->set($ppc_cookie_type, 'yahoo', $ppc_cookie_expiration);
|
78 |
+
|
79 |
+
}
|
80 |
+
|
81 |
+
}
|
82 |
+
|
83 |
+
// if custom adwords cookie IS set
|
84 |
+
|
85 |
+
elseif (isset($ppc_ct_cookie)) {
|
86 |
+
// update the value and the seconds
|
87 |
+
Mage::getModel('core/cookie')->set($ppc_cookie_name, $ppc_ct_cookie, $ppc_cookie_expiration);
|
88 |
+
Mage::getModel('core/cookie')->set($ppc_cookie_type, $ppc_ct_cookie_type, $ppc_cookie_expiration);
|
89 |
+
|
90 |
+
|
91 |
+
|
92 |
+
}
|
93 |
+
|
94 |
+
// Out put phone number
|
95 |
+
$googleadwords = $google_adwards_phone_number;
|
96 |
+
$msnadwords = $msn_adwards_phone_number;
|
97 |
+
$yahooadwords = $yahoo_adwards_phone_number;
|
98 |
+
$regular = $non_adwards_phone_number;
|
99 |
+
$ppc_call_tracker_output = '';
|
100 |
+
|
101 |
+
// if custom adwords cookie is set
|
102 |
+
if (isset($ppc_ct_cookie) && isset($ppc_ct_cookie_type) ) {
|
103 |
+
if ($ppc_ct_cookie_type == 'google') {
|
104 |
+
$ppc_call_tracker_output = "{$googleadwords}";
|
105 |
+
} else if ($ppc_ct_cookie_type == 'msn') {
|
106 |
+
$ppc_call_tracker_output = "{$msnadwords}";
|
107 |
+
}else if ($ppc_ct_cookie_type == 'yahoo') {
|
108 |
+
$ppc_call_tracker_output = "{$yahooadwords}";
|
109 |
+
} else {
|
110 |
+
$ppc_call_tracker_output = "{$regular}";
|
111 |
+
}
|
112 |
+
|
113 |
+
}
|
114 |
+
|
115 |
+
// if url parameter contains ppc data
|
116 |
+
|
117 |
+
elseif (isset($ppc_ct_parameter) && $ppc_ct_parameter == 'google' ) {
|
118 |
+
|
119 |
+
$ppc_call_tracker_output = "{$googleadwords}";
|
120 |
+
|
121 |
+
}
|
122 |
+
elseif (isset($ppc_ct_parameter) && $ppc_ct_parameter == 'msn') {
|
123 |
+
$ppc_call_tracker_output = "{$msnadwords}";
|
124 |
+
|
125 |
+
}
|
126 |
+
elseif (isset($ppc_ct_parameter) && $ppc_ct_parameter == 'yahoo') {
|
127 |
+
$ppc_call_tracker_output = "{$yahooadwords}";
|
128 |
+
}
|
129 |
+
|
130 |
+
else {
|
131 |
+
|
132 |
+
$ppc_call_tracker_output = "{$regular}";
|
133 |
+
|
134 |
+
}
|
135 |
+
|
136 |
+
//send back text to calling function
|
137 |
+
|
138 |
+
return $ppc_call_tracker_output;
|
139 |
+
|
140 |
+
}
|
141 |
+
|
142 |
+
|
143 |
+
|
144 |
+
}
|
145 |
+
?>
|
app/code/local/Apj/PpcCallTracker/Helper/Data.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* PPC Call Tracker
|
3 |
+
* APJ Digital
|
4 |
+
*
|
5 |
+
* Default Helper
|
6 |
+
*
|
7 |
+
* This class defines various UI helpers
|
8 |
+
*/
|
9 |
+
|
10 |
+
|
11 |
+
class Apj_PpcCallTracker_Helper_Data extends Mage_Core_Helper_Abstract { }
|
12 |
+
|
13 |
+
|
14 |
+
?>
|
app/code/local/Apj/PpcCallTracker/Model/Observer.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Apj_PpcCallTracker_Model_Observer
|
3 |
+
{
|
4 |
+
/* public function addPPCPhoneHtml($observer)
|
5 |
+
{
|
6 |
+
$block = $observer->getBlock();
|
7 |
+
$transport = $observer->getTransport();
|
8 |
+
if ($block->getNameInLayout() == 'right') {
|
9 |
+
$html = $transport->getHtml();
|
10 |
+
$ppcphone = Mage::app()->getLayout()->createBlock('ppccalltracker/ppc', 'apj', array('template'=>'apj/ppccalltracker/ppccalltracker.phtml'));
|
11 |
+
$html .= $ppcphone->toHtml();
|
12 |
+
$transport->setHtml($html);
|
13 |
+
}
|
14 |
+
|
15 |
+
|
16 |
+
}*/
|
17 |
+
|
18 |
+
}
|
19 |
+
|
20 |
+
|
21 |
+
?>
|
app/code/local/Apj/PpcCallTracker/Model/Source/Cookietime.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Apj_PpcCallTracker_Model_source_cookietime
|
4 |
+
{
|
5 |
+
public function toOptionArray()
|
6 |
+
{
|
7 |
+
return array(
|
8 |
+
array('value'=>'first', 'label'=>' First Visit'),
|
9 |
+
array('value'=>'last', 'label'=>' Most Recent Visit')
|
10 |
+
|
11 |
+
);
|
12 |
+
}
|
13 |
+
}
|
14 |
+
|
15 |
+
|
16 |
+
|
17 |
+
?>
|
app/code/local/Apj/PpcCallTracker/controllers/IndexController.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* PPC Call Tracker
|
3 |
+
* APJ Digital
|
4 |
+
*
|
5 |
+
* AdminController.php
|
6 |
+
*
|
7 |
+
* This module implements the admin controller in Magento
|
8 |
+
*/
|
9 |
+
|
10 |
+
class Apj_PpcCallTracker_IndexController extends Mage_Adminhtml_Controller_Action {
|
11 |
+
|
12 |
+
}
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
?>
|
app/code/local/Apj/PpcCallTracker/etc/config.xml
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Apj_PpcCallTracker>
|
5 |
+
<version>1.0.0</version>
|
6 |
+
</Apj_PpcCallTracker>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<helpers>
|
10 |
+
<ppccalltracker>
|
11 |
+
<class>Apj_PpcCallTracker_Helper</class>
|
12 |
+
</ppccalltracker>
|
13 |
+
</helpers>
|
14 |
+
<blocks>
|
15 |
+
<ppccalltracker>
|
16 |
+
<class>Apj_PpcCallTracker_Block</class>
|
17 |
+
</ppccalltracker>
|
18 |
+
</blocks>
|
19 |
+
<models>
|
20 |
+
<ppccalltracker>
|
21 |
+
<class>Apj_PpcCallTracker_Model</class>
|
22 |
+
</ppccalltracker>
|
23 |
+
<ppc>
|
24 |
+
<class>Apj_PpcCallTracker_Model</class>
|
25 |
+
</ppc>
|
26 |
+
</models>
|
27 |
+
</global>
|
28 |
+
<frontend>
|
29 |
+
<layout>
|
30 |
+
<updates>
|
31 |
+
<ppccalltracker>
|
32 |
+
<file>ppccalltracker.xml</file>
|
33 |
+
</ppccalltracker>
|
34 |
+
</updates>
|
35 |
+
</layout>
|
36 |
+
<!-- <events>
|
37 |
+
<core_block_abstract_to_html_after>
|
38 |
+
<observers>
|
39 |
+
<ppccalltracker>
|
40 |
+
<type>singleton</type>
|
41 |
+
<class>ppccalltracker/observer</class>
|
42 |
+
<method>addPPCPhoneHtml</method>
|
43 |
+
</ppccalltracker>
|
44 |
+
</observers>
|
45 |
+
</core_block_abstract_to_html_after>
|
46 |
+
</events>-->
|
47 |
+
</frontend>
|
48 |
+
<adminhtml>
|
49 |
+
<acl>
|
50 |
+
<resources>
|
51 |
+
<admin>
|
52 |
+
<children>
|
53 |
+
<system>
|
54 |
+
<children>
|
55 |
+
<config>
|
56 |
+
<children>
|
57 |
+
<ppccalltracker_options translate="title" module="ppccalltracker">
|
58 |
+
<title>Pay Per Click (PPC) Call Tracker</title>
|
59 |
+
</ppccalltracker_options>
|
60 |
+
</children>
|
61 |
+
</config>
|
62 |
+
</children>
|
63 |
+
</system>
|
64 |
+
</children>
|
65 |
+
</admin>
|
66 |
+
</resources>
|
67 |
+
</acl>
|
68 |
+
</adminhtml>
|
69 |
+
</config>
|
app/code/local/Apj/PpcCallTracker/etc/system.xml
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<sections>
|
4 |
+
<ppccalltracker_options translate="label" module="ppccalltracker">
|
5 |
+
<label>Pay Per Click (PPC) Call Tracker</label>
|
6 |
+
<tab>general</tab>
|
7 |
+
<frontend_type>text</frontend_type>
|
8 |
+
<sort_order>2000</sort_order>
|
9 |
+
<show_in_default>1</show_in_default>
|
10 |
+
<show_in_website>1</show_in_website>
|
11 |
+
<show_in_store>1</show_in_store>
|
12 |
+
<groups>
|
13 |
+
<tabgeneral translate="label" module="ppccalltracker">
|
14 |
+
<label>Pay Per Click (PPC) Call Tracker Configuration</label>
|
15 |
+
<frontend_type>text</frontend_type>
|
16 |
+
<sort_order>20</sort_order>
|
17 |
+
<show_in_default>1</show_in_default>
|
18 |
+
<show_in_website>1</show_in_website>
|
19 |
+
<show_in_store>1</show_in_store>
|
20 |
+
<expanded>1</expanded>
|
21 |
+
<comment><![CDATA[
|
22 |
+
<div class="ppc-call-tracker_container">
|
23 |
+
<div style="width:80%">
|
24 |
+
<h3 style="margin-bottom:0px; padding-top:0px;">Pay Per Click (PPC) Call Tracker</h3>
|
25 |
+
<p>This Free PPC Call Tracker Extension enables businesses - to see how many phone calls your campaigns are generating. Simple to use and quick to set-up, it will provide you with new analytic abilities to improve your online campaign planning.</p>
|
26 |
+
<h3 style="margin-bottom:0px; padding-top:0px;">How Does It Work?</h3>
|
27 |
+
<p>We provide the extension for free, and once installed, just add and (an) additional phone lines set-up, the specified unique customer-facing number will be generated based on their online journey to your site. These calls are then can then be taken on this dedicated number for that campaign or re-routed to your usual main point of contact number so you can track the volume and quality of call’s coming from Google AdWords, Yahoo and Bing.</p>
|
28 |
+
<h3 style="margin-bottom:0px; padding-top:0px;">PPC Call Tracker Configuration:</h3>
|
29 |
+
</div>
|
30 |
+
|
31 |
+
<div style="width:80%">
|
32 |
+
<p><strong>1. Insert you’re your default telephone number and PPC telephone numbers below: </strong></p>
|
33 |
+
|
34 |
+
</div>
|
35 |
+
</div>
|
36 |
+
]]></comment>
|
37 |
+
<fields>
|
38 |
+
<regularphone translate="label">
|
39 |
+
<label>Default Phone Number:</label>
|
40 |
+
<frontend_type>text</frontend_type>
|
41 |
+
<sort_order>10</sort_order>
|
42 |
+
<show_in_default>1</show_in_default>
|
43 |
+
<show_in_website>1</show_in_website>
|
44 |
+
<show_in_store>1</show_in_store>
|
45 |
+
</regularphone>
|
46 |
+
<googlephone translate="label">
|
47 |
+
<label>Google Adwords Phone Number:</label>
|
48 |
+
<frontend_type>text</frontend_type>
|
49 |
+
<sort_order>11</sort_order>
|
50 |
+
<show_in_default>1</show_in_default>
|
51 |
+
<show_in_website>1</show_in_website>
|
52 |
+
<show_in_store>1</show_in_store>
|
53 |
+
</googlephone>
|
54 |
+
<msnphone translate="label">
|
55 |
+
<label>Bing Adwords Phone Number:</label>
|
56 |
+
<frontend_type>text</frontend_type>
|
57 |
+
<sort_order>12</sort_order>
|
58 |
+
<show_in_default>1</show_in_default>
|
59 |
+
<show_in_website>1</show_in_website>
|
60 |
+
<show_in_store>1</show_in_store>
|
61 |
+
</msnphone>
|
62 |
+
<yahoophone translate="label">
|
63 |
+
<label>Yahoo Adwords Phone Number:</label>
|
64 |
+
<frontend_type>text</frontend_type>
|
65 |
+
<sort_order>13</sort_order>
|
66 |
+
<show_in_default>1</show_in_default>
|
67 |
+
<show_in_website>1</show_in_website>
|
68 |
+
<show_in_store>1</show_in_store>
|
69 |
+
</yahoophone>
|
70 |
+
<cookiesec translate="label">
|
71 |
+
<label>Cookie Seconds:</label>
|
72 |
+
<frontend_type>text</frontend_type>
|
73 |
+
<sort_order>14</sort_order>
|
74 |
+
<show_in_default>1</show_in_default>
|
75 |
+
<show_in_website>1</show_in_website>
|
76 |
+
<show_in_store>1</show_in_store>
|
77 |
+
</cookiesec>
|
78 |
+
<cookietime translate="label">
|
79 |
+
<label>Choose Date:</label>
|
80 |
+
<frontend_type>radios</frontend_type>
|
81 |
+
<source_model>ppc/source_cookietime</source_model>
|
82 |
+
<sort_order>15</sort_order>
|
83 |
+
<show_in_default>1</show_in_default>
|
84 |
+
<show_in_website>1</show_in_website>
|
85 |
+
<show_in_store>1</show_in_store>
|
86 |
+
<comment>Please choose when the number of seconds should be counted from.</comment>
|
87 |
+
</cookietime>
|
88 |
+
|
89 |
+
</fields>
|
90 |
+
|
91 |
+
</tabgeneral>
|
92 |
+
<tabprivacy translate="label" module="ppccalltracker">
|
93 |
+
<label>Privacy Policy</label>
|
94 |
+
<frontend_type>text</frontend_type>
|
95 |
+
<sort_order>21</sort_order>
|
96 |
+
<show_in_default>1</show_in_default>
|
97 |
+
<show_in_website>1</show_in_website>
|
98 |
+
<show_in_store>1</show_in_store>
|
99 |
+
<expanded>1</expanded>
|
100 |
+
<comment><![CDATA[
|
101 |
+
<p><strong>2. Update the code on your site with either the short code in your pages or static blocks. Or edit ppccalltracker.xml</strong></p>
|
102 |
+
<p><code>{{block type="ppccalltracker/ppc" name="ppccalltracker" template="apj/ppccalltracker/ppccalltracker.phtml" before="-"}}</code></p>
|
103 |
+
<p><strong>3. Update your privacy policy - We recommend users of this extension add the following copy and paste the following code to the terms of use page:</strong></p>
|
104 |
+
<h3 style="margin-bottom:0px; padding-top:0px;">Call Tracking and Recording:</h3>
|
105 |
+
<p>Solar Communications provides a free call tracking software called Pay Per Click Call Tracker that we have installed on this site. Pay Per Click Call Tracker uses cookies and we may collect statistical information about calls that helps us determine if calls originated from marketing.</p>
|
106 |
+
<p><a href="http://www.solar.co.uk/privacy-policy/" style="color:red;"><strong>Click here for information on how to reject or delete this cookie.</strong></a></p>
|
107 |
+
<h3 style="margin-bottom:0px; padding-top:0px;">Notes:</h3>
|
108 |
+
<p style="line-height:20px;">Google AdWords Auto Tagging needs to be enabled in order to track ad referrals properly. Otherwise those will be handled as organic Google referrals.<br />By default auto-tagging is enabled for Google AdWords. To double check that you need to go to My Account » Preferences and check the value for the "Tracking" option.</p>
|
109 |
+
]]></comment>
|
110 |
+
</tabprivacy>
|
111 |
+
</groups>
|
112 |
+
</ppccalltracker_options>
|
113 |
+
</sections>
|
114 |
+
</config>
|
115 |
+
|
app/design/frontend/base/default/layout/ppccalltracker.xml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
+
<reference name="right">
|
5 |
+
<block type="ppccalltracker/ppc" name="right.ppccalltracker" template="apj/ppccalltracker/ppccalltracker.phtml" before="-" />
|
6 |
+
</reference>
|
7 |
+
</default>
|
8 |
+
</layout>
|
app/design/frontend/base/default/template/apj/ppccalltracker/ppccalltracker.phtml
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Copyright (C) 2013 ApjDigital, Inc.
|
4 |
+
*
|
5 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
+
* you may not use this file except in compliance with the License.
|
7 |
+
* You may obtain a copy of the License at
|
8 |
+
*
|
9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10 |
+
*
|
11 |
+
* Unless required by applicable law or agreed to in writing, software
|
12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 |
+
* See the License for the specific language governing permissions and
|
15 |
+
* limitations under the License.
|
16 |
+
*/
|
17 |
+
?>
|
18 |
+
<div class="block ppc_call_tracker">
|
19 |
+
<div class="block-content">
|
20 |
+
<span><strong>Call:</strong> <?php echo $this->getPPCNumber(); ?></span>
|
21 |
+
</div>
|
22 |
+
</div>
|
app/etc/modules/Apj_PpcCallTracker.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Apj_PpcCallTracker>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
</Apj_PpcCallTracker>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>ppc_call_tracker</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://www.apache.org/licenses/LICENSE-2.0">Apache</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Pay Per Click (PPC) Call Tracker</summary>
|
10 |
+
<description>Pay Per Click (PPC) Call Tracker Extension enables businesses - to see how many phone calls your campaigns are generating. Simple to use and quick to set-up, it will provide you with new analytic abilities to improve your online campaign planning.</description>
|
11 |
+
<notes>N/A</notes>
|
12 |
+
<authors><author><name>Andrew Jackson Solar Communications</name><user>solarcomms</user><email>apj@solar.co.uk</email></author></authors>
|
13 |
+
<date>2013-09-26</date>
|
14 |
+
<time>08:15:00</time>
|
15 |
+
<contents><target name="magelocal"><dir name="Apj"><dir name="PpcCallTracker"><dir name="Block"><file name="Ppc.php" hash="b496eb066043afa6150de114f80acd92"/></dir><dir name="Helper"><file name="Data.php" hash="935550a48661f2704d0f710b1a49992d"/></dir><dir name="Model"><file name="Observer.php" hash="e33095fe97818764d681fab905c50ebe"/><dir name="Source"><file name="Cookietime.php" hash="a8eef847e953d82d23cb52ae61662c76"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="dd21070fb5ba8eeb6778d9d689b3b4e1"/></dir><dir name="etc"><file name="config.xml" hash="47531b2bf7694bff847e0bbb659d7c8a"/><file name="system.xml" hash="28ccf2899a49d2d836950de122376f16"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="ppccalltracker.xml" hash="4dff74bcb82bd5cf2a863dee63e1f917"/></dir><dir name="template"><dir name="apj"><dir name="ppccalltracker"><file name="ppccalltracker.phtml" hash="61e8bbcb9bcf09905663f4e8a7fe81f5"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Apj_PpcCallTracker.xml" hash="60ef9648749744a444ec765079fb0fc1"/></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
+
</package>
|