WP Manifestindependent plugin directory
manifest / ecommerce / woocommerce-order-datalayer

Woocommerce Order Datalayer

Pushes completed orders into a javascript object named datalayer for Google Tag Manager to use.

by Frame Creative · github.com/framedigital/woocommerce-order-datalayer · website

11stars
1.1kcomposer installs
3forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/framedigital/woocommerce-order-datalayer/archive/refs/heads/master.zip

Also on Packagist as framecreative/woocommerce-order-datalayer:

composer require framecreative/woocommerce-order-datalayer

From the readme

Woocommerce Order to Datalayer Pushes completed orders into a javascript object named datalayer into the wphead() for Google Tag Manager to use. Outputs the order details into the dataLayer on the receipt page then sets a meta value into order post called gatracked so the dataLayer is not outputted twice if the user refreshes. Requirements - Wordpress 4.0+ - Woocommerce 3.0+ - PHP 5.6+ Install Via Composer composer require framecreative/woocommerce-order-datalayer Manually Download and install into your plugins folder Features - Use filter woocommerceorderdatalayer to add objects to the dataLayer before it is outputted. - Adds order meta to track that the dataLayer has been triggered already. DataLayer contains: - transactionId - transactionDate - transactionType: 'sale' - transactionAffiliation - transactionTotal - transactionShipping - transactionTax - transactionPaymentType - transactionCurrency - transactionShippingMethod - transactionPromoCode - ecommtotalvalue - event: 'orderCompleted' - ecommprodid: [ids] - ecommpagetype: 'purchase' - transactionProducts: - id - name - sku - category - price - currency

Read the full README on GitHub →