Support » Plugin: DuracellTomi's Google Tag Manager for WordPress » DataLayer has to information on purchase

  • sknzl

    (@sknzl)


    Hi, Thanks for the great plugin! It takes away a lot of work to populate the datalayer. I’m using your plugin on our website, which uses woocommerce.
    It works very well for category pages, product pages, the checkout and cart (they are on the same page on our website). However after a payment on the “order-received” page almost all information is missing in the datalayer.
    Here is the content of the datalayer after a successful checkout:

    “ecomm_prodid”: [],
    “ecomm_pagetype”: “cart”,
    “ecomm_totalvalue”: 0,
    “ecommerce”: {
    “currencyCode”: “EUR”,
    “checkout”: {
    “actionField”: {
    “step”: 1
    },
    “products”: []
    }
    },

    What could be the problem? Or does gtm4wp not create this layer on the order-received page and I have to implement it as shown for example here?
    https://stackoverflow.com/questions/39831875/enhanced-ecommerce-datalayer-woocommerce

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author duracelltomi

    (@duracelltomi)

    Hi @sknzl,

    This plugin should track purchase data on the order received page. A few questions:
    – can you post the URL of your site?
    – can I place a test order without using my credit card?
    – are you using any plugin to alter/customize the default order received page experience?

    Based on what you posted, my plugin things that the user is on the cart page and not on the order received page. This is usually connected to some 3rd party plugin, perhaps a payment gateway that does not redirect the user properly or does some customization that breaks the behavior of this plugin.

    sknzl

    (@sknzl)

    Hey @duracelltomi

    – the webpage is at https://bit.ly/2CwbUM2

    – I’m not sure how to make test orders that won’t skip the order-received page. I have tried to use the cheque payment option, but it skips the order-received page. You have any suggestions?

    – I have checked several times, and also restored the original order-received template. Nothing solved the problem.

    I was adding following to the site to test:
    https://github.com/framedigital/woocommerce-order-datalayer/blob/master/DataLayer.php
    And it added correctly the ‘orderCompleted’ event in the datalayer.

    sknzl

    (@sknzl)

    I still don’t understand why gtm4wp doesn’t push the information to the datalayer. I’m using the other mentioned implementation on my site now for the order-received page.

    In the meantime I have a different question about the checkout tracking:
    On the google dev site
    https://developers.google.com/tag-manager/enhanced-ecommerce#checkoutstep
    is described that the value ‘event’: ‘checkout’ should be pushed to the datalayer when tracking the checkout. However with gtm4wp on the checkout page I only see:

    “ecommerce”: {
    “currencyCode”: “EUR”,
    “checkout”: {
    “actionField”: {
    “step”: 1,
    “action”: “checkout”
    },
    “products”: [
    ….

    Does it matter that the event type is not sent?

    Also I wanted to ask why the events are labeled for example gtm4wp.addProductToCartEEC
    ,which is different from the “standard” labeling addToCart suggested on the google dev website?

    Thanks!

    Plugin Author duracelltomi

    (@duracelltomi)

    Hi,

    On your site, you have 3 payment options:
    1. PayPal
    2. Credit card
    3. iDeal

    For PayPal it is mandatory to set the auto return option so that users are forced to return to the order received page after payment:
    https://www.paypal.com/us/smarthelp/article/how-do-i-use-paypal's-auto-return-feature-to-redirect-customers-back-to-my-website-faq3651

    For iDeal, you will need to check the option “Do not flag orders as being tracked” – this will needed in order for iDeal payment tracking to work.

    Since I can not place an order on this site without actually paying, I can not give you any further advice. If for example you can give me a coupon to lower the price to €1 or even smaller, I could test the full order process.

    The value of the event parameter is indifferent, only the content and structure of the ecommmerce variable is fixed. The only thing you need to pay attention is to setup your GTM triggers with the event names actually being used.

    sknzl

    (@sknzl)

    Thanks a lot for your response!
    Is there a way to send you a private message to send a coupon code?

    Plugin Author duracelltomi

    (@duracelltomi)

    Just open a ticket using the contact form at gtm4wp.com

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.