• Hi Thomas!
    First of all thank you for the plugin, really helpful.

    I followed the steps you gave in one of the posts regarding the variables and the enhanced ecommerce tracking for GA.
    Product Name –> ecommerce.add.products.0.name
    Product Price –> ecommerce.add.products.0.price
    I have been receiving data properly into GA but now I see the datalayer shows Product Name and Product Price as Undefined. Is that normal?

    I am trying to implement as well the Facebook pixel and Facebook don’t get the value details

    Should I need to create new variables or the ones I settled up are enough?

    Many thanks in advance,
    Jorge

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

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

    (@duracelltomi)

    Have you changed or upgraded your theme on the site?
    When I open your product detail page, some key codes are missing from my plugin:
    https://www.palets.com/composicion/sofa-2-plazas/

    From what I can see in the source code of the page, this does not seem to be a normal WooCommerce product detail page, is it?

    Thread Starter jmosquera

    (@jmosquera)

    Thanks for the quick answer.

    Yes, this is part os specific pages created for self product selection but I have this other “shop” link were I think follows WooCommerce product details page:
    https://www.palets.com/tienda/

    All those products here suppose to be normal WooCommerce product pages…

    Thanks again,
    Jorge

    Plugin Author Thomas Geiger

    (@duracelltomi)

    By your definition and based on how they look like, they are product detail pages.

    The problem is that the WooCommerce core function is_product() does not recognize this page as a single product page which also prevents my plugin to detect this kind of content and the the proper, detail product specific codes.

    Thread Starter jmosquera

    (@jmosquera)

    Ouch!

    So what could be the solution?
    It is strange that I can see my product names and prices on Google Analytics but not in the datalayer, right?

    Any recomendation?

    Thanks,
    Jorge

    Plugin Author Thomas Geiger

    (@duracelltomi)

    In what report do you see product names?

    My assumption is that products and product names can be correctly sent in product list impressions, maybe clicks and also while the product is in the checkout and also your transactions but add to cart data is missing.

    The only solution here would be to ask the theme or plugin developer (I do not know whether this custom product page functionality is offered by the theme or another plugin) to mimic the is_product() function of WooCommerce on those custom pages:
    https://github.com/woocommerce/woocommerce/blob/master/includes/wc-conditional-functions.php#L76

    Thread Starter jmosquera

    (@jmosquera)

    I can see Product name and Price on Google Analytics Conversions tab > General View.

    The strange thing here is that even when I am on a checkout page (test purchase) I enter into the variables and I see them as undefined…
    If they are flowing into GA it’s supposed those variables should appear well

    Thanks,
    Jorge

    Plugin Author Thomas Geiger

    (@duracelltomi)

    I’ve added a product to the cart on your site and moved to the checkout page.
    Here I can see that the checkout data is being sent to GA correctly. I placed a test order which showed that the product data is sent to GA here as well.

    What do you see if you open the Product List Performance report in GA and switch the primary dimension to Product? I guess you will see numbers in the checkout and purchase columns but nothing in the add to cart column?

    Thread Starter jmosquera

    (@jmosquera)

    Thanks!

    I see all the info, the split by product and price, incomes, all the details perfectly with product name and percentages.
    Even if I select the dimension by category it shows me the 3 categories I have on the store.

    Regards,
    Jorge

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Data Layer Undefined’ is closed to new replies.