Is there any way to get ecommerce information from a woocommerce form?

71 Views Asked by At

I've been trying to set up GTM, GA4, and monetization reporting but just can't get get any ecommerce data to come through. I have a feeling it might be the Woocommerce form that my site uses to place orders. All my other tags in Tag Manager are working (mostly) as they should.

When using the Tag Assistant to test my site, the following is what I get from the API Call. The dataLayer is totally empty.

gtag("event", "purchase", {
  woocommerce-table__product-name product-name: undefined,
  send_to: "G-TFPD6X2VGC",
  engagement_time_msec: 54,
  global_developer_id_string: "dZTNiMT",
  client_id: "826439351.1695155129",
  session_id: "1695243244",
  session_number: 3,
  session_engaged: 1,
  page_location: "https://www.currentconnected.com/checkout/order-rec" +
                 "eived/25415/?key=wc_order_cX5wrkne38eXN",
  page_referrer: "https://www.currentconnected.com/checkout/",
  page_title: "Checkout",
  language: "en-us",
  screen_resolution: "3414x1440",
  traffic_type: "internal",
  _user_agent_architecture: "x86",
  _user_agent_bitness: "64",
  _user_agent_full_version_list: "Google%20Chrome;117.0.5938.89|Not%3" +
                                 "BA%3DBrand;8.0.0.0|Chromium;117.0.5" +
                                 "938.89",
  _user_agent_mobile: "0",
  _user_agent_model: "",
  _user_agent_platform: "Windows",
  _user_agent_platform_version: "15.0.0",
  _user_agent_wow64: "0"
})

I've tried adjusting the parameters of the tag in GTM and GA4, but so far no dice. The purchase event still registers, but nothing else. I noticed that random clicks on the order confirmed page will deliver data that's a little closer to what I'm trying to get, but it's still not quite right and relies on the customer making a random click on the page to deliver that data. The data the random click delivers is below.

{
  linker: {domains: ["www.currentconnected.com"]},
  gtm: {
    uniqueEventId: 14,
    start: 1695243336558,
    priorityId: 1,
    scrollThreshold: 90,
    scrollUnits: "percent",
    scrollDirection: "vertical",
    triggers: "6",
    allowlist: undefined,
    blocklist: undefined,
    whitelist: undefined,
    blacklist: undefined,
    element: "HTMLDivElement: html > body.page-template-default.page." +
             "page-id-32.logged-in.admin-bar.no-customize-support.the" +
             "me-ccon.woocommerce-checkout.woocommerce-page.woocommer" +
             "ce-order-received.woocommerce-js.woo-variation-gallery." +
             "woo-variation-gallery-theme-ccon.woo-variation-gallery-" +
             "pro > div.body > div.body-wrap",
    elementClasses: "body-wrap",
    elementId: "",
    elementTarget: "",
    elementUrl: ""
  },
  event: "gtm.click",
  developer_id: {dZTNiMT: true},
  tagTypeBlacklist: undefined
}
0

There are 0 best solutions below