• I just started using the GTM4WP (thanks for making life easier)

    Problem:

    When visiting a single product page (variable product), I’m seeing both Price and Value as “string” instead of Numbers.
    I tried creating new product, clearing cache, completely deleted all tags/variables (even deleted GTM account), tried with new account and containers, uninstalled/reinstalled the plugin – but still the same issue.
    Here’s Data Layer values after this Message:

    {
    pagePostType: "product",
    pagePostType2: "single-product",
    pagePostAuthor: "Yeasin Been Hridoy",
    productRatingCounts: [],
    productAverageRating: 0,
    productReviewCount: 0,
    productType: "variable",
    productIsVariable: 1,
    event: "view_item",
    gtm: {uniqueEventId: 3, start: 1731207147763},
    ecommerce: {
    currency: "BDT",
    items: [
    {
    item_id: 8185,
    item_name: "Lilac",
    sku: "LILAC2450",
    price: "2450.00",
    stocklevel: null,
    stockstatus: "instock",
    google_business_vertical: "retail",
    item_category: "Casual",
    id: 8185,
    item_list_name: "General Product List",
    index: 1,
    product_type: "variable",
    item_brand: "",
    internal_id: 8184,
    variant: "36"
    },
    {
    item_id: 7722,
    item_name: "Lilac2",
    sku: "LILAC245",
    price: "2450.00",
    stocklevel: null,
    stockstatus: "instock",
    google_business_vertical: "retail",
    item_category: "Casual",
    id: 7722,
    item_list_name: "General Product List",
    index: 1,
    product_type: "variable",
    item_brand: ""
    },
    {
    item_id: 7499,
    item_name: "Candy",
    sku: "CAN215",
    price: "2150.00",
    stocklevel: null,
    stockstatus: "instock",
    google_business_vertical: "retail",
    item_category: "Casual",
    id: 7499,
    item_list_name: "General Product List",
    index: 1,
    product_type: "variable",
    item_brand: ""
    },
    {
    item_id: 7708,
    item_name: "Mint",
    sku: "MIN265",
    price: "2650.00",
    stocklevel: null,
    stockstatus: "instock",
    google_business_vertical: "retail",
    item_category: "Casual",
    id: 7708,
    item_list_name: "Related Products",
    index: 1,
    product_type: "variable",
    item_brand: ""
    },
    {
    item_id: 7499,
    item_name: "Candy",
    sku: "CAN215",
    price: "2150.00",
    stocklevel: null,
    stockstatus: "instock",
    google_business_vertical: "retail",
    item_category: "Casual",
    id: 7499,
    item_list_name: "Related Products",
    index: 2,
    product_type: "variable",
    item_brand: ""
    },
    {
    item_id: 7722,
    item_name: "Lilac2",
    sku: "LILAC245",
    price: "2450.00",
    stocklevel: null,
    stockstatus: "instock",
    google_business_vertical: "retail",
    item_category: "Casual",
    id: 7722,
    item_list_name: "Related Products",
    index: 3,
    product_type: "variable",
    item_brand: ""
    }
    ],
    value: "2450.00"
    }
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Yeasin Been Hridoy

    (@ybh740852)

    Another Update to the issue:

    I can see that when it’s on the checkout page, the Strings are changed to Numbers. Here’s is the example:

    {
    pagePostType: "page",
    pagePostType2: "single-page",
    pagePostAuthor: "Yeasin Been Hridoy",
    event: "begin_checkout",
    gtm: {uniqueEventId: 2, start: 1731206301181},
    ecommerce: {
    currency: "BDT",
    value: 2450,
    items: [
    {
    item_id: 8186,
    item_name: "Lilac",
    sku: "LILAC2450",
    price: 2450,
    stocklevel: 5,
    stockstatus: "instock",
    google_business_vertical: "retail",
    item_category: "Casual",
    id: 8186,
    item_variant: "38",
    quantity: 1
    }
    ]
    }
    }
    Thread Starter Yeasin Been Hridoy

    (@ybh740852)

    2nd Update:

    I just tried changing the product type to Simple Product (from Variable Product). and now the Price and Value is shown as Number properly under datalayer. But I sell Variable product so, keeping it that way is required. Just sharing this to help you understand the core of the issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.