Jump to content

 

jlinc

Member Since 22 Jan 2020
Offline Last Active Jul 08 2022 03:58 PM
-----

Topics I've Started

Setting Up Google Analytics 4 Gtag

09 March 2022 - 05:36 PM

Does anyone know what to enter within the new Gtag JS to map the CS-Cart fields properly? 

 

We have added the GS Tag to our header and it's working, but when adding the purchases tag (see here: https://developers.g...sure_purchases)with it we need to map the field.

 

Below is the snippet and where I don't know what to add. I very much thank anyone who can help answer this.

 

gtag('event', 'purchase', {
  "transaction_id": "???",
  "affiliation": "????",
  "value": ???,
  "currency": "USD",
  "tax": ???,
  "shipping": ???,
  "items": [
    {
      "id": "???",
      "name": "???",
      "list_name": "???",
      "brand": "???",
      "category": "???",
      "variant": "???",
      "list_position": ???,
      "quantity": ???,
      "price": '???'
    },
    {
      "id": "???",
      "name": "???",
      "list_name": "???",
      "brand": "???",
      "category": "???",
      "variant": "???",
      "list_position": ???,
      "quantity": ???,
      "price": '???'
    }
  ]
});