• Greetings Thomas and thank you for an amazing plugin (that I definitely think you should start charging for).

    A client website has a custom built web, where I’ve managed to feed everything into GA4 except the add_to_cart events.

    add_to_cart

    items: [
          {
            item_id: "",
            item_name: "",
            item_brand: "",
            price: "0.00",
            item_category: "",
            google_business_vertical: "retail",
            id: "",
            quantity: 1
          }
        ],
        add: {products: [{price: "0.00", quantity: 1}]},
        value: "0.00"

    Where the gtm4wp.addProductToCartEEC catches data:

    items: [
          {
            item_id: "B1022-GBDKNO",
            item_name: "Barebells Caramel Cashew",
            item_brand: "",
            price: 22.99,
            item_category: "Protein bars",
            google_business_vertical: "retail",
            id: "B1022-GBDKNO"

    What could be wrong here?

    Kind regards,
    Emil

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

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

    (@duracelltomi)

    Hi,

    The product pages on this site seem to be quite cutomized.
    Normally, there is a <form> element on the product detail page that includes the add to cart button and several hidden fields. On this site, I do not see this form, just an add to cart page.

    Let your dev compare the HTML code of the standard Storefront theme with this one, you will see the differences I am sure.

Viewing 1 replies (of 1 total)
  • The topic ‘Add-to-cart for GA4 not working’ is closed to new replies.