Home Forums WoodMart support forum Incorrect dataLayer event on product pages (view_item vs view_item_list

Incorrect dataLayer event on product pages (view_item vs view_item_list

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #716951

    teamfoxyy
    Participant

    I’m reaching out regarding an issue with the dataLayer implementation on product pages in the Woodmart theme.

    On single product pages, the dataLayer currently pushes the following event:

    event: “view_item_list”

    However, this is incorrect according to GA4 and Meta (Facebook) tracking standards.
    On product detail pages, the expected event should be:

    event: “view_item”

    At the moment, the dataLayer contains an array of multiple products (from related products or product lists), instead of only the currently viewed product. This causes several issues:

    GA4 tracking is not aligned with recommended ecommerce structure
    Meta Pixel fires duplicate or incorrect ViewContent events
    It is not possible to reliably track the actual viewed product via GTM

    What we need:

    On single product pages, the theme should push a clean dataLayer event like this:

    dataLayer.push({
    event: ‘view_item’,
    ecommerce: {
    currency: ‘EUR’,
    value: PRODUCT_PRICE,
    items: [{
    item_id: PRODUCT_ID,
    item_name: PRODUCT_NAME,
    item_category: PRODUCT_CATEGORY,
    price: PRODUCT_PRICE
    }]
    }
    });

    Important:

    Only the current product should be included in items
    No product lists or related products should be included in this event
    view_item_list should be used only on category/listing pages

    Current behavior:

    view_item_list is triggered even on product pages
    ecommerce.items contains multiple unrelated products
    No proper view_item event is available

    Could you please advise:

    Is this behavior coming from Woodmart or from the GTM4WP integration?
    Is there a setting to fix this?
    If not, could this be corrected in the theme (or recommended as a best practice update)?

    This is critical for accurate GA4 and Meta Pixel tracking.

    Thank you in advance for your assistance.

    #716976

    Artem Temos
    Keymaster
    Xtemos team

    Hello,

    To help diagnose this issue, could you please test with a default theme? This will help us determine if the problem is theme-related or caused by another factor.

    Steps:
    1. Temporarily switch to the default WordPress or Storefront theme (WooCommerce’s official theme)
    2. Test the functionality
    3. Let us know if the issue persists

    Important: Make a backup before switching themes, and don’t worry—your WoodMart settings will be preserved.

    Best regards

    #717128

    teamfoxyy
    Participant

    It’s fixed. Thank you for the taking your time.

    #717160

    Artem Temos
    Keymaster
    Xtemos team

    Great, we are glad that you sorted it out. Feel free to contact us if you have any further questions.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Incorrect dataLayer event on product pages (view_item vs view_item_list’ is closed to new replies.