GithubHelp home page GithubHelp logo

isabella232 / magento2-serversideanalytics Goto Github PK

View Code? Open in Web Editor NEW

This project forked from elgentos/magento2-serversideanalytics

0.0 0.0 0.0 17 KB

Server side analytics for Magento 2

PHP 100.00%

magento2-serversideanalytics's Introduction

Server Side Analytics for Magento 2

This extension aims to solve the problem of discrepancies between Magento revenue reports and the revenue reports in Google Analytics.

That problem arises due to the fact that a certain number of people close the browser window before returning to Magento's success page. Since Google Analytics is Javascript based, and thus client based, the GA Purchase Event will not be fired and the order will not be registered in Analytics.

Another reason why this problem arises is that people decide to pay at a later point in time through a different platform (like the PSP's), using a link in an email for example.

Caveats

  • This extension disables the GA JS Purchase Event on the success page altogether. It will however track the pageview.
  • This extension only tracks paid orders (it fires on sales_order_payment_pay). Non-paid orders will never show up in Analytics. This is our current clients' use case, mileage may differ. PR's for code to also track non-paid orders are welcomed.

Further info

  • Compatible with GA Measurement Protocol version 1;
  • Debugging is enabled when Magento is in developer mode. See var/log/system.log for the log;
  • Exceptions will be logged to var/log/exceptions.log;
  • The products in the payload are retrieve on invoice-basis, not on order-basis;
  • An event has been added for you to add or overwrite custom fields to products in the purchase event; elgentos_serversideanalytics_product_item_transport_object;
  • An event has been added for you to add or overwrite fields to tracking data in the purchase event; elgentos_serversideanalytics_tracking_data_transport_object;
  • Testing can be done by dispatching test_event_for_serversideanalytics with a $payment (\Magento\Sales\Order\Payment) object in the payload;

magento2-serversideanalytics's People

Contributors

peterjaap avatar woutersteen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.