DEV Community

Rayhanshimul
Rayhanshimul

Posted on

Need custom JavaScript to get total sum of price multiply by quantity from an item array of data layer

Current GTM data layer doesn't show checkout total value, I need to get this from the items array of the data layer.

`event: "checkout"
  gtm: {uniqueEventId: 243, start: 1675793207075},
  ecommerce: {
    checkout: {
      actionField: {step: 2},
      products: [
        {
          id: "80509",
          name: "Delightly: Inner Peace Kit",
          category: "Delightly Quick Ship
…

Top comments (0)