• Resolved vulvani

    (@vulvani)


    Hi,

    every event is being tracked, besider purchase event. Data layer is not visible in html code on order received page.

    I am, however, using a custom payment gate way that redirects to Stripe Checkout. If this is the problem, how do I need to update the payment gateway, so that the purchase event data layer is being forwarded to the order confirmation page?

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

    (@torbenlundsgaard)

    Are you using WooCommerce or Easy Digital Downloads?

    Thread Starter vulvani

    (@vulvani)

    WooCommerce

    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    Can you redirect the user back to the WC order-received page?

    Thread Starter vulvani

    (@vulvani)

    Yes, the user gets redirected back to order-received page.

    I just tested the payment flow with cash on delivery. Here it works. So it is actually the payment gateway.

    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    closing as resolved

    Thread Starter vulvani

    (@vulvani)

    Hi,

    I found out that the purchase event was not firing due to custom payment gateway.

    So I tried to test the purchase event with another temporary payment method. I used WC built-in Cash on delivery method.

    I don’t know if it is the payment method Cash on delivery, or if it is something else, but in the step between Checkout page and Thank you page, the transaction value will be set to 0.

    Do you know what causes this? Does the plugin not work with Cash on delivery? Unfortunately I don’t have a possibility to test another payment gateway.

    Here is the Data Layer on Checkout page (item: null might be because it is a virtual product):

    pagePostType: “page”,
    pageType: “checkout”,
    postTitle: “Checkout”,
    userLoggedIn: false,
    ecommerce: {currency: “EUR”, value: 49, items: null},
    pages: {
    cart: “/de-cart”,
    checkout: “/checkout”,
    orderReceived: “/checkout/order-received”,
    myAccount: “/my-account”

    And here is the Data Layer on Thank you page:

    pagePostType: “page”,
    pageType: “checkout”,
    postTitle: “Thank you”,
    userLoggedIn: true,
    user_id: 804,
    ecommerce: {currency: “EUR”, value: 0, items: null},
    pages: {
    cart: “/de-cart”,
    checkout: “/checkout”,
    orderReceived: “/checkout/order-received”,
    myAccount: “/my-account”

    As you can see, the value gets lost after payment, so that the value won’t be reflected on GA4 as well.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Purchase event data layer is not sending’ is closed to new replies.