dev-master
9999999-dev http://erikhaugsjaa.com/Google Enhanced Ecommerce PHP Lib
MIT
The Requires
- php >=5.3.0
- ext-json *
The Development Requires
api google analytics google tag manager google enhanced ecommerce
Google Enhanced Ecommerce PHP Lib
PHP 5.3.0 and later., (*1)
You can install the bindings via Composer. Run the following command:, (*2)
composer require erikh60/eephp
To use the bindings, use Composer's autoload:, (*3)
require_once('vendor/autoload.php');
If you don't use Composer, you can download the latest release., (*4)
require_once('/path/to/Eephp.php');
Require the following extension in order to work properly:, (*5)
If you use Composer, it should get handled automatically. If you install manually, make sure on your own., (*6)
Enhanced Ecommerce/GTM Details here: // https://developers.google.com/tag-manager/enhanced-ecommerce Set GA Funnels to match the steps as described here: // https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#ecommerce-data Steps: //step1 -- search results //step2 -- product details page with "might also like" //step3 (optional) -- donate/addtocart -- before amounts/designation/dedication given //step4 -- add--add to cart (with/after price) //step4 -- remove--remove from cart //step5 -- checkout steps //step:5.1 view/review cart //step:5.2 choose--guest/login/new (not in express) //step:5.3 account page (not in express) //step:5.4 enter or review address (not in express) //step:5.5 review order //step:5.6 pay via paypal or stripe //step6 -- purchase --checkout thankyou ///XXX -- not yet -- Refunds
For example to load the proper JS for a thank-you/confirmation at the end of checkout:, (*7)
\Eephp\Eephp::set_cart_id('...'); $cart_id = \Eephp\Eephp::get_cart_id(); $js = \Eephp\Eephp::ee_load_thankyou($cart_id); echo $js;
Full examples for Steps above in Test.php, (*8)
View Source at cfp-dc.org, (*9)
Google Enhanced Ecommerce PHP Lib
MIT
api google analytics google tag manager google enhanced ecommerce