Support » Plugin: GTM4WP » Everything is recorded except the transaction

  • Hi!

    I followed all the steps for the Enhanced Ecomerce, in Analytics, Tag Manager and inside the pluguin. I see that everything seems to be working well, except that I don’t see all the transactions in Analytics, only few.

    I have the Autoreturn in both payment methods. It can be related?


    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Thomas Geiger


    Ooops, it is hard to tell my wife who just walks through in the background that I am just working while browsing your site 😀

    Could you give me a coupon code so that I only need to pay $1 or some cents on the site to test the order received page?

    Thread Starter Jordi Mont


    Yes I know 🙂

    It would be possible to send the final urls privately by mail or somthing, so as not to publish so much data?

    Thank you

    Plugin Author Thomas Geiger


    Hi, forum rules does not allow me to ask or accept and private information, I would risk to being closed 🙁

    Thread Starter Jordi Mont


    Okay, let’s find another way then.

    I’m looking at it with my programmer and it may be due to the return of the payment gateway.

    So, if apart from the plugin (which already measures everything else except the transaction), we put gtm4wp.orderCompletedEEC into the datalayer of the order-received page, and this:


    Into the Tag Manager custom event trigger. Do you think it can work?

    Thank you very much for your help

    It is worth noting you may not see all transactions within analytics due to cookie blocking etc.

    Plugin Author Thomas Geiger


    @jordi-mont it could work but you need to include the data layer content for the whole purchase action as well:


    It worked for me @jordi-mont. Analytics shows the transaction correctly.

    I put in the woocommerce thankyou.php page this code:

    ‘event’: ‘gtm4wp.orderCompletedEEC’,
    ‘ecommerce’: {
    ‘purchase’: {
    ‘actionField’: {
    ‘id’: ‘<?php echo $order->get_order_number(); ?>’, // Transaction ID. Required
    ‘revenue’: ‘<?php echo number_format($order->get_subtotal(), 2, “.”, “”); ?>’, // Total transaction value (incl. tax and shipping)

    ‘products’: [
    <?php foreach($order->get_items() as $key=>$item):
    $product = $order->get_product_from_item($item);?>{
    ‘name’: ‘<?php echo $item[‘name’]; ?>’,
    ‘id’: ‘<?php echo $item[‘product_id’]; ?>’,
    ‘brand’: ‘your-brand’,
    ‘category’: ‘your-category’,
    ‘price’: ‘<?php echo number_format($order->get_line_subtotal($item), 2, “.”, “”);?>’,
    ‘quantity’: ‘<?php echo $item[‘qty’];?>’

    <?php endforeach; ?>


Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Everything is recorded except the transaction’ is closed to new replies.