├── .gitignore ├── LICENSE ├── README.md ├── app ├── code │ └── community │ │ └── Zefir │ │ └── ConversionTracking │ │ ├── Block │ │ ├── Abstract.php │ │ ├── Amazon │ │ │ └── Block.php │ │ ├── BounceX │ │ │ └── Block.php │ │ ├── Criteo │ │ │ ├── Abstract.php │ │ │ ├── Cart.php │ │ │ ├── Category.php │ │ │ ├── Checkout.php │ │ │ ├── Homepage.php │ │ │ ├── Js.php │ │ │ ├── Product.php │ │ │ └── Search.php │ │ ├── Facebook │ │ │ └── Block.php │ │ ├── GoogleRemarketing │ │ │ ├── Abstract.php │ │ │ ├── Cart.php │ │ │ ├── Category.php │ │ │ ├── Checkout.php │ │ │ ├── Homepage.php │ │ │ ├── Product.php │ │ │ └── Search.php │ │ ├── Nextag │ │ │ └── Block.php │ │ ├── PriceGrabber │ │ │ └── Block.php │ │ ├── Shoppingcom │ │ │ └── Block.php │ │ ├── Shopzilla │ │ │ └── Block.php │ │ └── Spark │ │ │ └── Block.php │ │ ├── Helper │ │ ├── Amazon.php │ │ ├── BounceX.php │ │ ├── Criteo.php │ │ ├── Data.php │ │ ├── Facebook.php │ │ ├── GoogleRemarketing.php │ │ ├── Nextag.php │ │ ├── PriceGrabber.php │ │ ├── Shoppingcom.php │ │ ├── Shopzilla.php │ │ └── Spark.php │ │ ├── Model │ │ └── Observer.php │ │ └── etc │ │ ├── adminhtml.xml │ │ ├── config.xml │ │ └── system.xml ├── design │ └── frontend │ │ └── base │ │ └── default │ │ ├── layout │ │ └── zefir │ │ │ └── trackers │ │ │ ├── amazon.xml │ │ │ ├── bouncex.xml │ │ │ ├── criteo.xml │ │ │ ├── facebook.xml │ │ │ ├── googleremarketing.xml │ │ │ ├── nextag.xml │ │ │ ├── pricegrabber.xml │ │ │ ├── shoppingcom.xml │ │ │ ├── shopzilla.xml │ │ │ └── spark.xml │ │ └── template │ │ └── zefir │ │ └── conversiontracking │ │ ├── amazon │ │ └── tracker.phtml │ │ ├── bouncex │ │ ├── checkout.phtml │ │ └── script.phtml │ │ ├── criteo │ │ ├── cart.phtml │ │ ├── category.phtml │ │ ├── checkout.phtml │ │ ├── home.phtml │ │ ├── js.phtml │ │ ├── product.phtml │ │ └── search.phtml │ │ ├── facebook │ │ ├── conversion.phtml │ │ └── tracker.phtml │ │ ├── nextag │ │ └── tracker.phtml │ │ ├── pricegrabber │ │ └── checkout.phtml │ │ ├── remarketing │ │ └── script.phtml │ │ ├── shoppingcom │ │ └── tracker.phtml │ │ ├── shopzilla │ │ └── tracker.phtml │ │ └── spark │ │ └── tracker.phtml └── etc │ └── modules │ └── Zefir_ConversionTracking.xml └── modman /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Mozilla Public License, version 2.0 2 | 3 | 1. Definitions 4 | 5 | 1.1. "Contributor" 6 | 7 | means each individual or legal entity that creates, contributes to the 8 | creation of, or owns Covered Software. 9 | 10 | 1.2. "Contributor Version" 11 | 12 | means the combination of the Contributions of others (if any) used by a 13 | Contributor and that particular Contributor's Contribution. 14 | 15 | 1.3. "Contribution" 16 | 17 | means Covered Software of a particular Contributor. 18 | 19 | 1.4. "Covered Software" 20 | 21 | means Source Code Form to which the initial Contributor has attached the 22 | notice in Exhibit A, the Executable Form of such Source Code Form, and 23 | Modifications of such Source Code Form, in each case including portions 24 | thereof. 25 | 26 | 1.5. "Incompatible With Secondary Licenses" 27 | means 28 | 29 | a. that the initial Contributor has attached the notice described in 30 | Exhibit B to the Covered Software; or 31 | 32 | b. that the Covered Software was made available under the terms of 33 | version 1.1 or earlier of the License, but not also under the terms of 34 | a Secondary License. 35 | 36 | 1.6. "Executable Form" 37 | 38 | means any form of the work other than Source Code Form. 39 | 40 | 1.7. "Larger Work" 41 | 42 | means a work that combines Covered Software with other material, in a 43 | separate file or files, that is not Covered Software. 44 | 45 | 1.8. "License" 46 | 47 | means this document. 48 | 49 | 1.9. "Licensable" 50 | 51 | means having the right to grant, to the maximum extent possible, whether 52 | at the time of the initial grant or subsequently, any and all of the 53 | rights conveyed by this License. 54 | 55 | 1.10. "Modifications" 56 | 57 | means any of the following: 58 | 59 | a. any file in Source Code Form that results from an addition to, 60 | deletion from, or modification of the contents of Covered Software; or 61 | 62 | b. any new file in Source Code Form that contains any Covered Software. 63 | 64 | 1.11. "Patent Claims" of a Contributor 65 | 66 | means any patent claim(s), including without limitation, method, 67 | process, and apparatus claims, in any patent Licensable by such 68 | Contributor that would be infringed, but for the grant of the License, 69 | by the making, using, selling, offering for sale, having made, import, 70 | or transfer of either its Contributions or its Contributor Version. 71 | 72 | 1.12. "Secondary License" 73 | 74 | means either the GNU General Public License, Version 2.0, the GNU Lesser 75 | General Public License, Version 2.1, the GNU Affero General Public 76 | License, Version 3.0, or any later versions of those licenses. 77 | 78 | 1.13. "Source Code Form" 79 | 80 | means the form of the work preferred for making modifications. 81 | 82 | 1.14. "You" (or "Your") 83 | 84 | means an individual or a legal entity exercising rights under this 85 | License. For legal entities, "You" includes any entity that controls, is 86 | controlled by, or is under common control with You. For purposes of this 87 | definition, "control" means (a) the power, direct or indirect, to cause 88 | the direction or management of such entity, whether by contract or 89 | otherwise, or (b) ownership of more than fifty percent (50%) of the 90 | outstanding shares or beneficial ownership of such entity. 91 | 92 | 93 | 2. License Grants and Conditions 94 | 95 | 2.1. Grants 96 | 97 | Each Contributor hereby grants You a world-wide, royalty-free, 98 | non-exclusive license: 99 | 100 | a. under intellectual property rights (other than patent or trademark) 101 | Licensable by such Contributor to use, reproduce, make available, 102 | modify, display, perform, distribute, and otherwise exploit its 103 | Contributions, either on an unmodified basis, with Modifications, or 104 | as part of a Larger Work; and 105 | 106 | b. under Patent Claims of such Contributor to make, use, sell, offer for 107 | sale, have made, import, and otherwise transfer either its 108 | Contributions or its Contributor Version. 109 | 110 | 2.2. Effective Date 111 | 112 | The licenses granted in Section 2.1 with respect to any Contribution 113 | become effective for each Contribution on the date the Contributor first 114 | distributes such Contribution. 115 | 116 | 2.3. Limitations on Grant Scope 117 | 118 | The licenses granted in this Section 2 are the only rights granted under 119 | this License. No additional rights or licenses will be implied from the 120 | distribution or licensing of Covered Software under this License. 121 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 122 | Contributor: 123 | 124 | a. for any code that a Contributor has removed from Covered Software; or 125 | 126 | b. for infringements caused by: (i) Your and any other third party's 127 | modifications of Covered Software, or (ii) the combination of its 128 | Contributions with other software (except as part of its Contributor 129 | Version); or 130 | 131 | c. under Patent Claims infringed by Covered Software in the absence of 132 | its Contributions. 133 | 134 | This License does not grant any rights in the trademarks, service marks, 135 | or logos of any Contributor (except as may be necessary to comply with 136 | the notice requirements in Section 3.4). 137 | 138 | 2.4. Subsequent Licenses 139 | 140 | No Contributor makes additional grants as a result of Your choice to 141 | distribute the Covered Software under a subsequent version of this 142 | License (see Section 10.2) or under the terms of a Secondary License (if 143 | permitted under the terms of Section 3.3). 144 | 145 | 2.5. Representation 146 | 147 | Each Contributor represents that the Contributor believes its 148 | Contributions are its original creation(s) or it has sufficient rights to 149 | grant the rights to its Contributions conveyed by this License. 150 | 151 | 2.6. Fair Use 152 | 153 | This License is not intended to limit any rights You have under 154 | applicable copyright doctrines of fair use, fair dealing, or other 155 | equivalents. 156 | 157 | 2.7. Conditions 158 | 159 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in 160 | Section 2.1. 161 | 162 | 163 | 3. Responsibilities 164 | 165 | 3.1. Distribution of Source Form 166 | 167 | All distribution of Covered Software in Source Code Form, including any 168 | Modifications that You create or to which You contribute, must be under 169 | the terms of this License. You must inform recipients that the Source 170 | Code Form of the Covered Software is governed by the terms of this 171 | License, and how they can obtain a copy of this License. You may not 172 | attempt to alter or restrict the recipients' rights in the Source Code 173 | Form. 174 | 175 | 3.2. Distribution of Executable Form 176 | 177 | If You distribute Covered Software in Executable Form then: 178 | 179 | a. such Covered Software must also be made available in Source Code Form, 180 | as described in Section 3.1, and You must inform recipients of the 181 | Executable Form how they can obtain a copy of such Source Code Form by 182 | reasonable means in a timely manner, at a charge no more than the cost 183 | of distribution to the recipient; and 184 | 185 | b. You may distribute such Executable Form under the terms of this 186 | License, or sublicense it under different terms, provided that the 187 | license for the Executable Form does not attempt to limit or alter the 188 | recipients' rights in the Source Code Form under this License. 189 | 190 | 3.3. Distribution of a Larger Work 191 | 192 | You may create and distribute a Larger Work under terms of Your choice, 193 | provided that You also comply with the requirements of this License for 194 | the Covered Software. If the Larger Work is a combination of Covered 195 | Software with a work governed by one or more Secondary Licenses, and the 196 | Covered Software is not Incompatible With Secondary Licenses, this 197 | License permits You to additionally distribute such Covered Software 198 | under the terms of such Secondary License(s), so that the recipient of 199 | the Larger Work may, at their option, further distribute the Covered 200 | Software under the terms of either this License or such Secondary 201 | License(s). 202 | 203 | 3.4. Notices 204 | 205 | You may not remove or alter the substance of any license notices 206 | (including copyright notices, patent notices, disclaimers of warranty, or 207 | limitations of liability) contained within the Source Code Form of the 208 | Covered Software, except that You may alter any license notices to the 209 | extent required to remedy known factual inaccuracies. 210 | 211 | 3.5. Application of Additional Terms 212 | 213 | You may choose to offer, and to charge a fee for, warranty, support, 214 | indemnity or liability obligations to one or more recipients of Covered 215 | Software. However, You may do so only on Your own behalf, and not on 216 | behalf of any Contributor. You must make it absolutely clear that any 217 | such warranty, support, indemnity, or liability obligation is offered by 218 | You alone, and You hereby agree to indemnify every Contributor for any 219 | liability incurred by such Contributor as a result of warranty, support, 220 | indemnity or liability terms You offer. You may include additional 221 | disclaimers of warranty and limitations of liability specific to any 222 | jurisdiction. 223 | 224 | 4. Inability to Comply Due to Statute or Regulation 225 | 226 | If it is impossible for You to comply with any of the terms of this License 227 | with respect to some or all of the Covered Software due to statute, 228 | judicial order, or regulation then You must: (a) comply with the terms of 229 | this License to the maximum extent possible; and (b) describe the 230 | limitations and the code they affect. Such description must be placed in a 231 | text file included with all distributions of the Covered Software under 232 | this License. Except to the extent prohibited by statute or regulation, 233 | such description must be sufficiently detailed for a recipient of ordinary 234 | skill to be able to understand it. 235 | 236 | 5. Termination 237 | 238 | 5.1. The rights granted under this License will terminate automatically if You 239 | fail to comply with any of its terms. However, if You become compliant, 240 | then the rights granted under this License from a particular Contributor 241 | are reinstated (a) provisionally, unless and until such Contributor 242 | explicitly and finally terminates Your grants, and (b) on an ongoing 243 | basis, if such Contributor fails to notify You of the non-compliance by 244 | some reasonable means prior to 60 days after You have come back into 245 | compliance. Moreover, Your grants from a particular Contributor are 246 | reinstated on an ongoing basis if such Contributor notifies You of the 247 | non-compliance by some reasonable means, this is the first time You have 248 | received notice of non-compliance with this License from such 249 | Contributor, and You become compliant prior to 30 days after Your receipt 250 | of the notice. 251 | 252 | 5.2. If You initiate litigation against any entity by asserting a patent 253 | infringement claim (excluding declaratory judgment actions, 254 | counter-claims, and cross-claims) alleging that a Contributor Version 255 | directly or indirectly infringes any patent, then the rights granted to 256 | You by any and all Contributors for the Covered Software under Section 257 | 2.1 of this License shall terminate. 258 | 259 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user 260 | license agreements (excluding distributors and resellers) which have been 261 | validly granted by You or Your distributors under this License prior to 262 | termination shall survive termination. 263 | 264 | 6. Disclaimer of Warranty 265 | 266 | Covered Software is provided under this License on an "as is" basis, 267 | without warranty of any kind, either expressed, implied, or statutory, 268 | including, without limitation, warranties that the Covered Software is free 269 | of defects, merchantable, fit for a particular purpose or non-infringing. 270 | The entire risk as to the quality and performance of the Covered Software 271 | is with You. Should any Covered Software prove defective in any respect, 272 | You (not any Contributor) assume the cost of any necessary servicing, 273 | repair, or correction. This disclaimer of warranty constitutes an essential 274 | part of this License. No use of any Covered Software is authorized under 275 | this License except under this disclaimer. 276 | 277 | 7. Limitation of Liability 278 | 279 | Under no circumstances and under no legal theory, whether tort (including 280 | negligence), contract, or otherwise, shall any Contributor, or anyone who 281 | distributes Covered Software as permitted above, be liable to You for any 282 | direct, indirect, special, incidental, or consequential damages of any 283 | character including, without limitation, damages for lost profits, loss of 284 | goodwill, work stoppage, computer failure or malfunction, or any and all 285 | other commercial damages or losses, even if such party shall have been 286 | informed of the possibility of such damages. This limitation of liability 287 | shall not apply to liability for death or personal injury resulting from 288 | such party's negligence to the extent applicable law prohibits such 289 | limitation. Some jurisdictions do not allow the exclusion or limitation of 290 | incidental or consequential damages, so this exclusion and limitation may 291 | not apply to You. 292 | 293 | 8. Litigation 294 | 295 | Any litigation relating to this License may be brought only in the courts 296 | of a jurisdiction where the defendant maintains its principal place of 297 | business and such litigation shall be governed by laws of that 298 | jurisdiction, without reference to its conflict-of-law provisions. Nothing 299 | in this Section shall prevent a party's ability to bring cross-claims or 300 | counter-claims. 301 | 302 | 9. Miscellaneous 303 | 304 | This License represents the complete agreement concerning the subject 305 | matter hereof. If any provision of this License is held to be 306 | unenforceable, such provision shall be reformed only to the extent 307 | necessary to make it enforceable. Any law or regulation which provides that 308 | the language of a contract shall be construed against the drafter shall not 309 | be used to construe this License against a Contributor. 310 | 311 | 312 | 10. Versions of the License 313 | 314 | 10.1. New Versions 315 | 316 | Mozilla Foundation is the license steward. Except as provided in Section 317 | 10.3, no one other than the license steward has the right to modify or 318 | publish new versions of this License. Each version will be given a 319 | distinguishing version number. 320 | 321 | 10.2. Effect of New Versions 322 | 323 | You may distribute the Covered Software under the terms of the version 324 | of the License under which You originally received the Covered Software, 325 | or under the terms of any subsequent version published by the license 326 | steward. 327 | 328 | 10.3. Modified Versions 329 | 330 | If you create software not governed by this License, and you want to 331 | create a new license for such software, you may create and use a 332 | modified version of this License if you rename the license and remove 333 | any references to the name of the license steward (except to note that 334 | such modified license differs from this License). 335 | 336 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 337 | Licenses If You choose to distribute Source Code Form that is 338 | Incompatible With Secondary Licenses under the terms of this version of 339 | the License, the notice described in Exhibit B of this License must be 340 | attached. 341 | 342 | Exhibit A - Source Code Form License Notice 343 | 344 | This Source Code Form is subject to the 345 | terms of the Mozilla Public License, v. 346 | 2.0. If a copy of the MPL was not 347 | distributed with this file, You can 348 | obtain one at 349 | http://mozilla.org/MPL/2.0/. 350 | 351 | If it is not possible or desirable to put the notice in a particular file, 352 | then You may include the notice in a location (such as a LICENSE file in a 353 | relevant directory) where a recipient would be likely to look for such a 354 | notice. 355 | 356 | You may add additional accurate notices of copyright ownership. 357 | 358 | Exhibit B - "Incompatible With Secondary Licenses" Notice 359 | 360 | This Source Code Form is "Incompatible 361 | With Secondary Licenses", as defined by 362 | the Mozilla Public License, v. 2.0. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | magento-conversion-tracking 2 | =========================== 3 | 4 | Add conversion tracking from many 3rd part sites in your magento store 5 | 6 | Currently supports: 7 | * Amazon Conversion Tracking 8 | * BounceX 9 | * Criteo 10 | * Facebook 11 | * GoogleRemarketing 12 | * Nextag 13 | * PriceGrabber 14 | * Shopping.com 15 | * Shopzilla 16 | * Spark -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/Abstract.php: -------------------------------------------------------------------------------- 1 | helper('conversiontracking'); 27 | } 28 | 29 | /** 30 | * Check if module is enabled before rendering the block 31 | * 32 | * @return string 33 | */ 34 | protected function _toHtml() { 35 | Mage::log(get_class($this).'::'.get_class($this->_helper())); 36 | if(!$this->_helper()->isEnabled()) { 37 | return ''; 38 | } 39 | 40 | return parent::_toHtml(); 41 | } 42 | 43 | /** 44 | * Get orders 45 | * 46 | * @return Mage_Sales_Model_Resource_Order_Collection 47 | */ 48 | public function getOrders() { 49 | if(Mage::registry('conversiontracking_order_ids') && self::$_orders == null) { 50 | $orders = Mage::registry('conversiontracking_order_ids'); 51 | self::$_orders = Mage::getModel('sales/order')->getCollection()->addAttributeToFilter('entity_id', array('in' => $orders)); 52 | } 53 | 54 | return self::$_orders; 55 | } 56 | } -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/Amazon/Block.php: -------------------------------------------------------------------------------- 1 | helper('conversiontracking/amazon'); 12 | } 13 | 14 | 15 | } -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/BounceX/Block.php: -------------------------------------------------------------------------------- 1 | helper('conversiontracking/bounceX'); 16 | } 17 | } -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/Criteo/Abstract.php: -------------------------------------------------------------------------------- 1 | getId(); 16 | } 17 | 18 | /** 19 | * Get Criteo Account ID 20 | * 21 | * @return int 22 | */ 23 | public function getAccountId() { 24 | return $this->_helper()->getAccountId(); 25 | } 26 | 27 | /** 28 | * Get criteo helper object 29 | * 30 | * @return \Zefir_ConversionTracking_Helper_Criteo 31 | */ 32 | protected function _helper() { 33 | return $this->helper('conversiontracking/criteo'); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/Criteo/Cart.php: -------------------------------------------------------------------------------- 1 | getQuote()->getAllVisibleItems(); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/Criteo/Category.php: -------------------------------------------------------------------------------- 1 | getLayout()->getBlock('product_list')->getLoadedProductCollection(); 16 | $i = 0; 17 | $list = array(); 18 | foreach($collection as $product) { 19 | $list [] = $product->getSku(); 20 | if($i++ >= 2) { 21 | //stop after 3rd element 22 | break; 23 | } 24 | } 25 | 26 | return json_encode($list); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/Criteo/Checkout.php: -------------------------------------------------------------------------------- 1 | getBillingAddress(); 18 | /* @var $collection Mage_Sales_Model_Resource_Order_Collection */ 19 | $collection = Mage::getModel('sales/order')->getCollection()->addAttributeToFilter('customer_email', array('eq' => $address->getEmail())); 20 | 21 | return $collection->count() == 1 ? '1' : '0'; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/Criteo/Homepage.php: -------------------------------------------------------------------------------- 1 | _helper()->getJsUrl(); 16 | 17 | //url given without protocol; started from domain 18 | if (!strstr($url, '//')) { 19 | return '//' . $url; 20 | } 21 | else { 22 | //url given with protocol or universal // to use the same protocol as current get 23 | //trim http or htpps from start 24 | return preg_replace('/^http(s)?:/', null, $url); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/Criteo/Product.php: -------------------------------------------------------------------------------- 1 | getSku(); 18 | } 19 | 20 | return null; 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/Criteo/Search.php: -------------------------------------------------------------------------------- 1 | getLayout()->getBlock('search_result_list'); 17 | $i = 0; 18 | $str = ''; 19 | foreach($layout->getLoadedProductCollection() as $product) { 20 | $str .= '"' . $product->getSku() . '", '; 21 | if($i++ >= 2) { 22 | break; 23 | } 24 | } 25 | 26 | return substr($str, 0, -2); 27 | } 28 | 29 | /** 30 | * Get used search keywords 31 | * 32 | * @return mixed 33 | */ 34 | public function getSerchKeywords() { 35 | return Mage::helper('catalogsearch')->getQuery()->getQueryText(); 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/Facebook/Block.php: -------------------------------------------------------------------------------- 1 | _helper()->isTrackConversion(); 16 | } 17 | 18 | /** 19 | * @return string 20 | */ 21 | public function getPixelId() { 22 | return $this->_helper()->getPixelId(); 23 | } 24 | 25 | /** 26 | * Get helper instance 27 | * 28 | * @return \Zefir_ConversionTracking_Helper_Shoppingcom 29 | */ 30 | protected function _helper() { 31 | return Mage::helper('conversiontracking/facebook'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/GoogleRemarketing/Abstract.php: -------------------------------------------------------------------------------- 1 | _helper()->getConversionId(); 20 | } 21 | 22 | /** 23 | * @return mixed 24 | */ 25 | public function getConversionLabel() { 26 | return $this->_helper()->getConversionLabel(); 27 | } 28 | 29 | /** 30 | * @return mixed 31 | */ 32 | public function getConversionLanguage() { 33 | return $this->_helper()->getConversionLanguage(); 34 | } 35 | 36 | /** 37 | * @return mixed 38 | */ 39 | public function getConversionFormat() { 40 | return $this->_helper()->getConversionFormat(); 41 | } 42 | 43 | /** 44 | * @return mixed 45 | */ 46 | public function getConversionColor() { 47 | return $this->_helper()->getConversionColor(); 48 | } 49 | 50 | /** 51 | * @return mixed 52 | */ 53 | public function getRemarketingOnlyFlag() { 54 | return $this->_helper()->getRemarketingOnlyFlag(); 55 | } 56 | 57 | /** 58 | * @return string 59 | */ 60 | public function getEcommProdId() { 61 | return ''; 62 | } 63 | 64 | /** 65 | * @return string 66 | */ 67 | public function getEcommPageType() { 68 | return 'other'; 69 | } 70 | 71 | /** 72 | * @return null 73 | */ 74 | public function getEcommTotalValue() { 75 | return null; 76 | } 77 | 78 | /** 79 | * @return null 80 | */ 81 | public function getEcommPValue() { 82 | return null; 83 | } 84 | 85 | /** 86 | * @return string 87 | */ 88 | public function getReturnCustomer() { 89 | return Mage::getSingleton('customer/session')->getId() != null ? 'true' : 'false'; 90 | } 91 | 92 | /** 93 | * @return bool|string 94 | */ 95 | public function getGender() { 96 | if($this->_getCustomer()) { 97 | //add gender info 98 | if($this->_getCustomer()->getGender() != null) { 99 | $gender = $this->_getCustomer()->getResource()->getAttribute('gender')->getFrontend()->getValue($this->_getCustomer()); 100 | 101 | return $gender == 'Male' ? 'm' : 'f'; 102 | } 103 | } 104 | 105 | return false; 106 | } 107 | 108 | /** 109 | * @return bool|string 110 | */ 111 | public function getAge() { 112 | if($this->_getCustomer()) { 113 | //add age info 114 | if(($dob = $this->_getCustomer()->getDob()) != null) { 115 | $today = new DateTime(); 116 | $birth = new DateTime($dob); 117 | 118 | return $today->diff($birth)->format('%y'); 119 | } 120 | } 121 | 122 | return false; 123 | } 124 | 125 | /** 126 | * Prepare params array for the page 127 | * 128 | * @return array 129 | */ 130 | public function getGoogleTagParams() { 131 | 132 | return $this->_getGoogleTagParams(); 133 | } 134 | 135 | /** 136 | * @return bool|Mage_Customer_Model_Customer 137 | */ 138 | protected function _getCustomer() { 139 | if(Mage::getSingleton('customer/session')->getId() != null && $this->_customer == null) { 140 | //add customer data 141 | $this->_customer = Mage::getModel('customer/customer')->load(Mage::getSingleton('customer/session')->getId()); 142 | 143 | return $this->_customer; 144 | } 145 | else if($this->_customer != null) { 146 | return $this->_customer; 147 | } 148 | 149 | return false; 150 | } 151 | 152 | /** 153 | * Prepare common params array 154 | * This function is override in child classes to product params specific to the page 155 | * 156 | * @return array 157 | */ 158 | protected function _getGoogleTagParams() { 159 | 160 | if ($this->getEcommProdId()) { 161 | $params['ecomm_prodid'] = $this->getEcommProdId(); 162 | } 163 | if ($this->getEcommTotalValue()) { 164 | $params['ecomm_totalvalue'] = $this->getEcommTotalValue(); 165 | } 166 | 167 | $params['ecomm_pagetype'] = $this->getEcommPageType(); 168 | $params['returnCustomer'] = $this->getReturnCustomer(); 169 | 170 | if($this->getGender()) { 171 | $params['g'] = $this->getGender(); 172 | } 173 | if($this->getAge()) { 174 | $params['a'] = $this->getAge(); 175 | } 176 | 177 | return $params; 178 | } 179 | 180 | /** 181 | * Get GoogleRemarketing helper object 182 | * 183 | * @return \Zefir_ConversionTracking_Helper_GoogleRemarekting 184 | */ 185 | protected function _helper() { 186 | return $this->helper('conversiontracking/googleRemarketing'); 187 | } 188 | } 189 | -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/GoogleRemarketing/Cart.php: -------------------------------------------------------------------------------- 1 | getQuote()->getAllVisibleItems(); 15 | } 16 | 17 | /** 18 | * @return string 19 | */ 20 | public function getEcommPageType() { 21 | return 'cart'; 22 | } 23 | 24 | /** 25 | * @return array 26 | */ 27 | public function getEcommProdId() { 28 | $products = array(); 29 | foreach($this->_getCartProducts() as $item) { 30 | $products[] = trim($item->getSku()); 31 | } 32 | 33 | return $products; 34 | } 35 | 36 | /** 37 | * @return array 38 | */ 39 | public function getEcommPValue() { 40 | $prices = array(); 41 | foreach($this->_getCartProducts() as $item) { 42 | $prices[] = $item->getRowTotal(); 43 | } 44 | 45 | return $prices; 46 | } 47 | 48 | /** 49 | * @return array 50 | */ 51 | public function getEcommQuantity() { 52 | $qty = array(); 53 | foreach($this->_getCartProducts() as $item) { 54 | $qty[] = $item->getQty(); 55 | } 56 | 57 | return $qty; 58 | } 59 | 60 | /** 61 | * @return mixed 62 | */ 63 | public function getEcommTotalValue() { 64 | return Mage::getSingleton('checkout/cart')->getQuote()->getSubtotal(); 65 | } 66 | 67 | /** 68 | * @return array 69 | */ 70 | protected function _getGoogleTagParams() { 71 | 72 | $params = parent::_getGoogleTagParams(); 73 | $params['ecomm_pvalue'] = $this->getEcommPValue(); 74 | $params['ecomm_quantity'] = $this->getEcommQuantity(); 75 | 76 | return $params; 77 | } 78 | 79 | } 80 | -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/GoogleRemarketing/Category.php: -------------------------------------------------------------------------------- 1 | getName(); 22 | } 23 | 24 | /** 25 | * @return mixed 26 | */ 27 | protected function _getGoogleTagParams() { 28 | 29 | $params = parent::_getGoogleTagParams(); 30 | $params['ecomm_category'] = $this->getEcommCategory(); 31 | 32 | return $params; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/GoogleRemarketing/Checkout.php: -------------------------------------------------------------------------------- 1 | getBillingAddress(); 18 | /* @var $collection Mage_Sales_Model_Resource_Order_Collection */ 19 | $collection = Mage::getModel('sales/order')->getCollection()->addAttributeToFilter('customer_email', array('eq' => $address->getEmail())); 20 | 21 | return $collection->count() == 1 ? '1' : '0'; 22 | } 23 | 24 | /** 25 | * @return string 26 | */ 27 | public function getEcommPageType() { 28 | return 'purchase'; 29 | } 30 | 31 | /** 32 | * @return array 33 | */ 34 | public function getEcommProdId() { 35 | $products = array(); 36 | foreach($this->getOrders() as $order) { 37 | foreach($order->getItemsCollection() as $item) { 38 | $products[] = trim($item->getProduct()->getSku()); 39 | } 40 | } 41 | 42 | return $products; 43 | } 44 | 45 | /** 46 | * @return array 47 | */ 48 | public function getEcommPValue() { 49 | $prices = array(); 50 | foreach($this->getOrders() as $order) { 51 | foreach($order->getItemsCollection() as $item) { 52 | $prices[] = $this->helper('core')->currency($item->getPrice(), false, false); 53 | } 54 | } 55 | 56 | return $prices; 57 | } 58 | 59 | /** 60 | * @return array 61 | */ 62 | public function getEcommQuantity() { 63 | $qty = array(); 64 | foreach($this->getOrders() as $order) { 65 | foreach($order->getItemsCollection() as $item) { 66 | $qty[] = $item->getQtyOrdered() * 1; 67 | } 68 | } 69 | 70 | return $qty; 71 | } 72 | 73 | /** 74 | * @return string 75 | */ 76 | public function getEcommTotalValue() { 77 | $total = 0; 78 | foreach($this->getOrders() as $order) { 79 | $total += $order->getSubtotal(); 80 | } 81 | 82 | return $this->helper('core')->currency($total, false, false); 83 | } 84 | 85 | 86 | /** 87 | * @return array 88 | */ 89 | protected function _getGoogleTagParams() { 90 | 91 | $params = parent::_getGoogleTagParams(); 92 | $params['ecomm_quantity'] = $this->getEcommQuantity(); 93 | 94 | return $params; 95 | } 96 | 97 | } 98 | -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/GoogleRemarketing/Homepage.php: -------------------------------------------------------------------------------- 1 | _product == null) { 23 | $product = Mage::registry('current_product'); 24 | if(!$product) { 25 | $product = Mage::getModel('catalog/product'); 26 | } 27 | $this->_product = $product; 28 | } 29 | 30 | return $this->_product; 31 | } 32 | 33 | /** 34 | * @return string 35 | */ 36 | public function getEcommPageType() { 37 | return 'product'; 38 | } 39 | 40 | /** 41 | * @return string 42 | */ 43 | public function getEcommProdId() { 44 | return trim($this->_getProduct()->getSku()); 45 | } 46 | 47 | /** 48 | * @return string 49 | */ 50 | public function getEcommTotalValue() { 51 | return Mage::helper('core')->currency($this->_getProduct()->getFinalPrice(), false, false); 52 | } 53 | 54 | 55 | } -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/GoogleRemarketing/Search.php: -------------------------------------------------------------------------------- 1 | _getHelper()->getId(); 12 | } 13 | 14 | /** 15 | * Get order amount without shipping and tax 16 | * 17 | * @param Mage_Sales_Model_Order $order 18 | * @return float 19 | */ 20 | public function getOrderAmount(Mage_Sales_Model_Order $order) { 21 | $orderAmount = (float)$order->getSubtotal() - (float)$order->getDiscountAmount(); 22 | 23 | return $orderAmount; 24 | } 25 | 26 | /** 27 | * Get skus of all products from the order 28 | * 29 | * @param Mage_Sales_Model_Order $order 30 | * @return string 31 | */ 32 | public function getProductSkus(Mage_Sales_Model_Order $order) { 33 | $skus = array(); 34 | foreach($order->getAllItems() as $item) { 35 | $skus[] = $item->getSku(); 36 | } 37 | 38 | return implode('|', $skus); 39 | } 40 | 41 | /** 42 | * Get qty of all products from the order 43 | * 44 | * @param Mage_Sales_Model_Order $order 45 | * @return string 46 | */ 47 | public function getProductQty(Mage_Sales_Model_Order $order) { 48 | $qty = array(); 49 | 50 | foreach($order->getAllItems() as $item) { 51 | $qty[] = $item->getQtyOrdered() * 1; 52 | } 53 | 54 | return implode('|', $qty); 55 | } 56 | 57 | 58 | /** 59 | * Get helper instance 60 | * 61 | * @return \Zefir_ConversionTracking_Helper_Nextag 62 | */ 63 | protected function _getHelper() { 64 | return Mage::helper('conversiontracking/nextag'); 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/PriceGrabber/Block.php: -------------------------------------------------------------------------------- 1 | helper('conversiontracking/priceGrabber'); 17 | } 18 | 19 | /** 20 | * @return mixed 21 | */ 22 | public function getRetId() { 23 | return $this->_helper()->getRetId(); 24 | } 25 | 26 | /** 27 | * @param $order 28 | * @return string 29 | */ 30 | public function getItemsData($order) { 31 | 32 | $str = null; 33 | $i = 1; 34 | foreach($order->getAllItems() as $item) { 35 | $data = array( 36 | 'a' => '', //Manufacturer 37 | 'b' => '', //Manufacturer Part Number 38 | 'c' => $item->getPrice(), //Retailer Price 39 | 'd' => $item->getSku(), //Internal Merchant SKU 40 | 'e' => '', //UPC 41 | 'f' => round($item->getQtyOrdered()), //Quantity 42 | ); 43 | $str .= 'item' . $i++ . '=' . implode('|', $data) . '&'; 44 | } 45 | 46 | return rtrim($str, '&'); 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/Shoppingcom/Block.php: -------------------------------------------------------------------------------- 1 | _getHelper()->getMerchantId(); 15 | } 16 | 17 | /** 18 | * Get order amount without shipping and tax 19 | * 20 | * @param Mage_Sales_Model_Order $order 21 | * @return float 22 | */ 23 | public function getOrderAmount(Mage_Sales_Model_Order $order) { 24 | $orderAmount = (float)$order->getSubtotal() - (float)$order->getDiscountAmount(); 25 | 26 | return $orderAmount; 27 | } 28 | 29 | /** 30 | * Get skus of all products from the order 31 | * 32 | * @param Mage_Sales_Model_Order $order 33 | * @return string 34 | */ 35 | public function getProductSkus(Mage_Sales_Model_Order $order) { 36 | $skus = array(); 37 | foreach($order->getAllItems() as $item) { 38 | $skus[] = $item->getSku(); 39 | } 40 | 41 | return implode(',', $skus); 42 | } 43 | 44 | /** 45 | * Get names of all products from the order 46 | * 47 | * @param Mage_Sales_Model_Order $order 48 | * @return string 49 | */ 50 | public function getProductNames(Mage_Sales_Model_Order $order) { 51 | $names = array(); 52 | foreach($order->getAllItems() as $item) { 53 | $names[] = $item->getName(); 54 | } 55 | 56 | return implode(',', $names); 57 | } 58 | 59 | /** 60 | * Get helper instance 61 | * 62 | * @return \Zefir_ConversionTracking_Helper_Shoppingcom 63 | */ 64 | protected function _getHelper() { 65 | return Mage::helper('conversiontracking/shoppingcom'); 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/Shopzilla/Block.php: -------------------------------------------------------------------------------- 1 | _getHelper()->getMerchantId(); 22 | } 23 | 24 | /** 25 | * Get customer type (new or returning) 26 | * 27 | * @return integer 28 | */ 29 | public function getCustomerType() { 30 | $checkout = Mage::getSingleton('checkout/type_onepage'); 31 | 32 | return $checkout->getCheckoutMethod() == Mage_Checkout_Model_Type_Onepage::METHOD_CUSTOMER ? 0 : 1; 33 | } 34 | 35 | /** 36 | * Get order grand total value and format it 37 | * 38 | * @return string 39 | */ 40 | public function getOrderValue() { 41 | if($this->_getOrder()) { 42 | return $this->helper('core')->currency($this->_getOrder()->getGrandTotal(), false, false); 43 | } 44 | 45 | return null; 46 | } 47 | 48 | /** 49 | * Get order incremental value 50 | * 51 | * @return string 52 | */ 53 | public function getOrderId() { 54 | if($this->_getOrder()) { 55 | return $this->_getOrder()->getIncrementId(); 56 | } 57 | 58 | return null; 59 | } 60 | 61 | /** 62 | * Get ordered quantity 63 | * 64 | * @return float 65 | */ 66 | public function getUnitsOrdered() { 67 | if($this->_getOrder()) { 68 | return $this->_getOrder()->getTotalQtyOrdered() * 1; 69 | } 70 | 71 | return null; 72 | } 73 | 74 | /** 75 | * Retrieve current order 76 | * 77 | * @return Mage_Sales_Model_Order 78 | */ 79 | protected function _getOrder() { 80 | if (null === $this->_order) { 81 | $this->_order = $this->getOrders()->getFirstItem(); 82 | } 83 | 84 | return $this->_order; 85 | } 86 | 87 | /** 88 | * Get helper instance 89 | * 90 | * @return \Zefir_ConversionTracking_Helper_Shopzilla 91 | */ 92 | protected function _getHelper() { 93 | return Mage::helper('conversiontracking/shoppingcom'); 94 | } 95 | 96 | } -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Block/Spark/Block.php: -------------------------------------------------------------------------------- 1 | _getHelper()->getApiKey(); 22 | } 23 | 24 | /** 25 | * Get config value for test mode 26 | * 27 | * @return string 28 | */ 29 | public function getTestMode() { 30 | return $this->_getHelper()->getTestMode(); 31 | } 32 | 33 | /** 34 | * Create json string with purchase data. 35 | * The json array should be formatted as following: 36 | * 37 | * first_name : First name of consumer 38 | * last_name : Last name of consumer 39 | * email : Email of consumer 40 | * total : Total purchase amount 41 | * 42 | * items : array of basket items. Sample included below / Free form 43 | * - name : Product name / item and/or Keywords (dinner, "Canon Digital Camera D300", etc) 44 | * - price : price 45 | * - qty : quantity 46 | * 47 | * locations : array of relevant locations & time (eg: billing, shipping, event address ) 48 | * - type : permanent or temporary. In this case, permanent is for billing or shipping, temporary is for an 49 | * event location/destination/etc 50 | * - name : location name / 'billing' or 'shipping' or 'Club 31' etc. 51 | * - address1 : street address 52 | * - city : city 53 | * - postcode : zipcode 54 | * 55 | * @return string 56 | */ 57 | public function getOrderJsonData() { 58 | /** @var Mage_Sales_Model_Order $order */ 59 | $order = $this->_getOrder(); 60 | 61 | /** 62 | * create basic arrat 63 | */ 64 | $data = array( 65 | 'first_name' => $order->getBillingAddress()->getFirstname(), 66 | 'last_name' => $order->getBillingAddress()->getLastname(), 67 | 'email' => $order->getBillingAddress()->getEmail(), 68 | 'total' => (string)Mage::helper('core')->currency($order->getGrandTotal(), false, false), 69 | 'items' => array(), 70 | 'locations' => array(), 71 | ); 72 | 73 | /** 74 | * add address info 75 | * 76 | * @var Mage_Sales_Model_Order_Address $address 77 | */ 78 | foreach($order->getAddressesCollection() as $address) { 79 | $data['locations'][] = array( 80 | 'type' => 'permanent', 81 | 'name' => $address->getAddressType(), 82 | 'address1' => $address->getStreetFull(), 83 | 'city' => $address->getCity(), 84 | 'postcode' => $address->getPostcode() 85 | ); 86 | } 87 | 88 | /** 89 | * add items info 90 | * 91 | * @var Mage_Sales_Model_Item $item 92 | */ 93 | foreach($order->getItemsCollection() as $item) { 94 | $data['items'][] = array( 95 | 'name' => $item->getName(), 96 | 'price' => (string)Mage::helper('core')->currency($item->getPrice(), false, false), 97 | 'qty' => (string)$item->getQtyOrdered() * 1 98 | ); 99 | } 100 | 101 | return Mage::helper('core')->jsonEncode($data); 102 | } 103 | 104 | /** 105 | * Retrieve current order 106 | * 107 | * @return Mage_Sales_Model_Order 108 | */ 109 | protected function _getOrder() { 110 | if (null === $this->_order) { 111 | $this->_order = $this->getOrders()->getFirstItem(); 112 | } 113 | 114 | return $this->_order; 115 | } 116 | 117 | /** 118 | * Get helper instance 119 | * 120 | * @return \Zefir_ConversionTracking_Helper_Shoppingcom 121 | */ 122 | protected function _getHelper() { 123 | return Mage::helper('conversiontracking/spark'); 124 | } 125 | 126 | } 127 | -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Helper/Amazon.php: -------------------------------------------------------------------------------- 1 | decrypt(Mage::getStoreConfig(self::XPATH_API_KEY)); 32 | } 33 | 34 | /** 35 | * Get config value for test mode 36 | * 37 | * @return string 38 | */ 39 | public function getTestMode() { 40 | return Mage::getStoreConfig(self::XPATH_TEST_MODE); 41 | } 42 | 43 | /** 44 | * @return boolean 45 | */ 46 | public function isEnabled() { 47 | return Mage::getStoreConfig(self::XPATH_ENABLE); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/Model/Observer.php: -------------------------------------------------------------------------------- 1 | getEvent()->getOrderIds(); 18 | Mage::register('conversiontracking_order_ids', $orderIds); 19 | } 20 | } -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/etc/adminhtml.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Allow Everything 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Conversion Tracking 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/etc/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 0.1 6 | 7 | 8 | 9 | 10 | 11 | Zefir_ConversionTracking_Block 12 | 13 | 14 | 15 | 16 | Zefir_ConversionTracking_Helper 17 | 18 | 19 | 20 | 21 | Zefir_ConversionTracking_Model 22 | 23 | 24 | 25 | 26 | 27 | 28 | singleton 29 | conversiontracking/observer 30 | saveLastOrderId 31 | 32 | 33 | 34 | 35 | 36 | 37 | singleton 38 | conversiontracking/observer 39 | saveLastOrderId 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | zefir/trackers/amazon.xml 50 | 51 | 52 | zefir/trackers/bouncex.xml 53 | 54 | 55 | zefir/trackers/criteo.xml 56 | 57 | 58 | zefir/trackers/facebook.xml 59 | 60 | 61 | zefir/trackers/googleremarketing.xml 62 | 63 | 64 | zefir/trackers/nextag.xml 65 | 66 | 67 | zefir/trackers/pricegrabber.xml 68 | 69 | 70 | zefir/trackers/shoppingcom.xml 71 | 72 | 73 | zefir/trackers/shopzilla.xml 74 | 75 | 76 | zefir/trackers/spark.xml 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | //static.criteo.net/js/ld/ld.js 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /app/code/community/Zefir/ConversionTracking/etc/system.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | sales 6 | 7 | text 8 | 500 9 | 1 10 | 1 11 | 1 12 | 13 | 14 | 15 | 16 | 17 | text 18 | 5 19 | 1 20 | 1 21 | 1 22 | 23 | 24 | 25 | select 26 | adminhtml/system_config_source_enabledisable 27 | 1 28 | 1 29 | 1 30 | 1 31 | 32 | 33 | 34 | text 35 | 10 36 | 1 37 | 1 38 | 1 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | text 47 | 10 48 | 1 49 | 1 50 | 1 51 | 52 | 53 | 54 | select 55 | adminhtml/system_config_source_enabledisable 56 | 1 57 | 1 58 | 1 59 | 1 60 | 61 | 62 | 63 | text 64 | 10 65 | 1 66 | 1 67 | 1 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | text 76 | 20 77 | 1 78 | 1 79 | 1 80 | 81 | 82 | 83 | select 84 | adminhtml/system_config_source_enabledisable 85 | 10 86 | 1 87 | 1 88 | 1 89 | 90 | 91 | 92 | text 93 | 20 94 | 1 95 | 1 96 | 1 97 | 98 | 99 | 100 | text 101 | 30 102 | 1 103 | 1 104 | 1 105 | Change this field only if you know it is other than default. 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | text 114 | 60 115 | 1 116 | 1 117 | 1 118 | 119 | 120 | 121 | select 122 | adminhtml/system_config_source_enabledisable 123 | 10 124 | 1 125 | 1 126 | 1 127 | 128 | 129 | 130 | text 131 | 20 132 | 1 133 | 1 134 | 1 135 | 136 | 137 | 138 | select 139 | adminhtml/system_config_source_enabledisable 140 | 30 141 | 1 142 | 1 143 | 1 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | text 152 | 100 153 | 1 154 | 1 155 | 1 156 | 157 | 158 | 159 | select 160 | adminhtml/system_config_source_enabledisable 161 | 10 162 | 1 163 | 1 164 | 1 165 | 166 | 167 | 168 | text 169 | 20 170 | 1 171 | 1 172 | 1 173 | 174 | 175 | 176 | text 177 | 30 178 | 1 179 | 1 180 | 1 181 | 182 | 183 | 184 | text 185 | 40 186 | 1 187 | 1 188 | 1 189 | Provide hexadecimal value without starting # 190 | 191 | 192 | 193 | text 194 | 50 195 | 1 196 | 1 197 | 1 198 | 199 | 200 | 201 | text 202 | 60 203 | 1 204 | 1 205 | 1 206 | 207 | 208 | 209 | select 210 | adminhtml/system_config_source_yesno 211 | 70 212 | 1 213 | 1 214 | 1 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | text 223 | 160 224 | 1 225 | 1 226 | 1 227 | 228 | 229 | 230 | select 231 | adminhtml/system_config_source_enabledisable 232 | 10 233 | 1 234 | 1 235 | 1 236 | 237 | 238 | 239 | text 240 | 20 241 | 1 242 | 1 243 | 1 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | text 252 | 200 253 | 1 254 | 1 255 | 1 256 | 257 | 258 | 259 | select 260 | adminhtml/system_config_source_enabledisable 261 | 10 262 | 1 263 | 1 264 | 1 265 | 266 | 267 | 268 | text 269 | 20 270 | 1 271 | 1 272 | 1 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | text 281 | 240 282 | 1 283 | 1 284 | 1 285 | 286 | 287 | 288 | select 289 | adminhtml/system_config_source_enabledisable 290 | 10 291 | 1 292 | 1 293 | 1 294 | 295 | 296 | 297 | text 298 | 20 299 | 1 300 | 1 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | text 309 | 280 310 | 1 311 | 1 312 | 1 313 | 314 | 315 | 316 | select 317 | adminhtml/system_config_source_enabledisable 318 | 10 319 | 1 320 | 1 321 | 1 322 | 323 | 324 | 325 | text 326 | 20 327 | 1 328 | 1 329 | 1 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | text 338 | 320 339 | 1 340 | 1 341 | 1 342 | 343 | 344 | 345 | select 346 | adminhtml/system_config_source_enabledisable 347 | 10 348 | 1 349 | 1 350 | 1 351 | 352 | 353 | 354 | obscure 355 | adminhtml/system_config_backend_encrypted 356 | 20 357 | 1 358 | 1 359 | 1 360 | 361 | 362 | 363 | select 364 | adminhtml/system_config_source_yesno 365 | 30 366 | 1 367 | 1 368 | 1 369 | 370 | 371 | 372 | 373 | 374 | 375 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/layout/zefir/trackers/amazon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/layout/zefir/trackers/bouncex.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/layout/zefir/trackers/criteo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/layout/zefir/trackers/facebook.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/layout/zefir/trackers/googleremarketing.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/layout/zefir/trackers/nextag.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/layout/zefir/trackers/pricegrabber.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/layout/zefir/trackers/shoppingcom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/layout/zefir/trackers/shopzilla.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/layout/zefir/trackers/spark.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/template/zefir/conversiontracking/amazon/tracker.phtml: -------------------------------------------------------------------------------- 1 | getOrders()->getFirstItem(); ?> 2 | 3 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/template/zefir/conversiontracking/bouncex/checkout.phtml: -------------------------------------------------------------------------------- 1 | 6 | 19 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/template/zefir/conversiontracking/bouncex/script.phtml: -------------------------------------------------------------------------------- 1 | 2 | 10 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/template/zefir/conversiontracking/criteo/cart.phtml: -------------------------------------------------------------------------------- 1 | 6 | 24 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/template/zefir/conversiontracking/criteo/category.phtml: -------------------------------------------------------------------------------- 1 | 6 | 19 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/template/zefir/conversiontracking/criteo/checkout.phtml: -------------------------------------------------------------------------------- 1 | 6 | 28 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/template/zefir/conversiontracking/criteo/home.phtml: -------------------------------------------------------------------------------- 1 | 6 | 19 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/template/zefir/conversiontracking/criteo/js.phtml: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/template/zefir/conversiontracking/criteo/product.phtml: -------------------------------------------------------------------------------- 1 | 6 | 19 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/template/zefir/conversiontracking/criteo/search.phtml: -------------------------------------------------------------------------------- 1 | 6 | 19 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/template/zefir/conversiontracking/facebook/conversion.phtml: -------------------------------------------------------------------------------- 1 | 6 | isTrackConversion()): ?> 7 | getOrders()->getFirstItem(); ?> 8 | 9 | 10 | 31 | 34 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/template/zefir/conversiontracking/facebook/tracker.phtml: -------------------------------------------------------------------------------- 1 | 6 | 22 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/template/zefir/conversiontracking/nextag/tracker.phtml: -------------------------------------------------------------------------------- 1 | getOrders()->getFirstItem(); 6 | ?> 7 | 8 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/template/zefir/conversiontracking/pricegrabber/checkout.phtml: -------------------------------------------------------------------------------- 1 | 6 | getOrders() as $order):?> 7 | 8 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/template/zefir/conversiontracking/remarketing/script.phtml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 14 | 25 | 26 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/template/zefir/conversiontracking/shoppingcom/tracker.phtml: -------------------------------------------------------------------------------- 1 | getOrders()->getFirstItem(); 6 | ?> 7 | 8 | 17 | 19 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/template/zefir/conversiontracking/shopzilla/tracker.phtml: -------------------------------------------------------------------------------- 1 | 6 | 16 | -------------------------------------------------------------------------------- /app/design/frontend/base/default/template/zefir/conversiontracking/spark/tracker.phtml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 19 | -------------------------------------------------------------------------------- /app/etc/modules/Zefir_ConversionTracking.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | community 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /modman: -------------------------------------------------------------------------------- 1 | app/code/community/Zefir/* app/code/community/Zefir/ 2 | app/design/frontend/base/default/layout/zefir/* app/design/frontend/base/default/layout/zefir/ 3 | app/design/frontend/base/default/template/zefir/* app/design/frontend/base/default/template/zefir/ 4 | app/etc/modules/Zefir_ConversionTracking.xml app/etc/modules/ 5 | --------------------------------------------------------------------------------