• Resolved kyler890

    (@kyler890)


    Hello,

    I implemented the plugin last night and set it up to work with a few pixels. One thing I couldn’t figure out was that the ecommerce information isn’t being passed to the datalayer.

    First I did it with my own purchase, and everything was there except the conversion value. It was 0.00.

    I loaded a customer’s checkout url in a private browser and everything was empty.

    Not sure if it’s something on my end, another plugin, or what. Was hoping you could help.

    This is the information from the customer order

    <!– Google Tag Manager for WordPress by DuracellTomi –>
    <script data-cfasync=”false” type=”text/javascript”>//<![CDATA[
    var google_tag_params = {“pageTitle”:”Checkout – Stunt Stand\u00ae (Official)”,”pagePostType”:”page”,”pagePostType2″:”single-page”,”postID”:14,”customerTotalOrders”:0,”customerTotalOrderValue”:”0.00″,”customerFirstName”:””,”customerLastName”:””,”customerBillingFirstName”:””,”customerBillingLastName”:””,”customerBillingCompany”:””,”customerBillingAddress1″:””,”customerBillingAddress2″:””,”customerBillingCity”:””,”customerBillingPostcode”:””,”customerBillingCountry”:””,”customerBillingEmail”:””,”customerBillingPhone”:””,”customerShippingFirstName”:””,”customerShippingLastName”:””,”customerShippingCompany”:””,”customerShippingAddress1″:””,”customerShippingAddress2″:””,”customerShippingCity”:””,”customerShippingPostcode”:””,”customerShippingCountry”:””,”ecomm_prodid”:[],”ecomm_pagetype”:”cart”,”ecomm_totalvalue”:0,”ecommerce”:{“checkout”:{“actionField”:{“step”:2},”products”:[]}}};
    dataLayer.push({“pageTitle”:”Checkout – Stunt Stand? (Official)”,”pagePostType”:”page”,”pagePostType2″:”single-page”,”postID”:14,”customerTotalOrders”:0,”customerTotalOrderValue”:”0.00″,”customerFirstName”:””,”customerLastName”:””,”customerBillingFirstName”:””,”customerBillingLastName”:””,”customerBillingCompany”:””,”customerBillingAddress1″:””,”customerBillingAddress2″:””,”customerBillingCity”:””,”customerBillingPostcode”:””,”customerBillingCountry”:””,”customerBillingEmail”:””,”customerBillingPhone”:””,”customerShippingFirstName”:””,”customerShippingLastName”:””,”customerShippingCompany”:””,”customerShippingAddress1″:””,”customerShippingAddress2″:””,”customerShippingCity”:””,”customerShippingPostcode”:””,”customerShippingCountry”:””,”ecomm_prodid”:[],”ecomm_pagetype”:”cart”,”ecomm_totalvalue”:0,”ecommerce”:{“checkout”:{“actionField”:{“step”:2},”products”:[]}},”google_tag_params”:window.google_tag_params});//]]>
    </script>

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

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

    (@duracelltomi)

    Hi,

    Ecommerce data on the order received page is only added once, during the very first page load of this thank you page.

    If you reload this page or revisit a later time, you will not see purchase information to prevent double tracking of such an info.

    Thread Starter kyler890

    (@kyler890)

    Fair enough. But when I check my pixel activity on Facebook, the only value that is getting pushed through is 0.00. I tested a couple of transactions and there was no customer order value.

    Could you do a test purchase using a PO number so that it doesn’t charge you anything, then see what might be happening?

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Before placing a test order: could you post a screenshot of your FB pixel tag that includes a GTM variable to pass order value? And also a screenshot about the settings of this GTM variable?

    Thread Starter kyler890

    (@kyler890)

    Activity from Facebook on the purchase event

    View post on imgur.com

    Variable in GTM

    View post on imgur.com

    From Facebook’s pixel helper

    View post on imgur.com

    Variable from GTM (without the pixel ID)

    <!-- Facebook Pixel Code -->
    <script>
    !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
    n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
    n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
    t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
    document,'script','https://connect.facebook.net/en_US/fbevents.js');
    
    fbq('init', 'pixelid');
    fbq('set','agent','tmgoogletagmanager', 'pixelid');
    fbq('track', 'Purchase', {value: {{Order Total Value - Woocommerce}}, currency: 'USD'});
      
    </script>
    <noscript><img height="1" width="1" style="display:none"
    src="https://www.facebook.com/tr?id=pixelid&ev=PageView&noscript=1"
    /></noscript>
    <!-- End Facebook Pixel Code -->
    Plugin Author Thomas Geiger

    (@duracelltomi)

    You should change the GTM variable to read this data layer item:

    ecommerce.purchase.actionField.revenue

    The variable you are using holds the life time value of the currently logged in user (if any)

    Thread Starter kyler890

    (@kyler890)

    I can certainly do that. But that value seems to be $0.00 too

    Thread Starter kyler890

    (@kyler890)

    I updated my variable to ecommerce.purchase.actionField.revenue and now it’s not passing anything to the Facebook pixel unfortunately

    Just did another test purchase since you said it won’t show variables on old orders.

    Here’s the exact snippet from my datalayer without modifying anything

    View post on imgur.com

    • This reply was modified 6 years, 5 months ago by kyler890. Reason: added snipped from test purchase
    Plugin Author Thomas Geiger

    (@duracelltomi)

    The screenshot you provided in your prior post tells me that you are currently not on the “order received” page. The “ecommerce: {checkout: …” line means that you are on the page where you can enter your order details.

    Can you provide a coupon so that I do not have to pay during a test checkout?

    Thread Starter kyler890

    (@kyler890)

    I was on the confirmation page. That’s what has me worried

    Please put purchase order 0000 and make your name GTM Test

    Thank you

    Plugin Author Thomas Geiger

    (@duracelltomi)

    I see: for some reason, my plugin sees that the user is on the checkout page while I see the success page.

    On the code level this means that the standard WooCommerce function is_cart() return true while is_order_received_page() seems to return false.

    What other plugin are you using to customize the checkout page to this multi step checkout experience?

    Thread Starter kyler890

    (@kyler890)

    I believe it is the theme causing that experience. I would prefer it to be a single page checkout.

    Thread Starter kyler890

    (@kyler890)

    Started working randomly. Marking resolved

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Empty Datalayer’ is closed to new replies.