Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

179
Visualizações
Can ecommerce item for GA4 add_to_cart event have custom parameters?

I am trying to implement GA4 add_to_cart event for e-shop, but product already has same parameters for other services, but they are using different names, can you somehow rename item parameter for GA4?

Or is there some better way for not having duplicate values?

GA4 ecommerce item structure:

items: [
    {
      item_id: "SKU_12345",
      item_name: "Stan and Friends Tee",
      affiliation: "Google Merchandise Store",
      currency: "USD",
      item_brand: "Google",
      item_category: "Apparel",
      price: 9.99,
      quantity: 1
    }
  ]

My Structure:

items: [
    {
      id: "SKU_12345",
      name: "Stan and Friends Tee",
      brand: "Google",
      category: "Apparel",
      item_id: "SKU_12345",
      item_name: "Stan and Friends Tee",
      item_brand: "Google",
      affiliation: "Google Merchandise Store",
      currency: "USD",
      price: 9.99,
      quantity: 1
    }
  ]
about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I think you can create a Custom JavaScript Variable in your GTM. enter image description here

Here is the code

function(){
  var yourItem = {{DLV-items}}
  var ga4Item = yourItem.map(function(o){
    return {
      item_id: o.id,
      item_name: o.name,
      affiliation:o.affiliation,
      currency: o.currency,
      item_brand: o.item_brand,
      item_category: o.category,
      price: o.price,
      quantity: o.quantity
    }
  })
  return ga4Item;
}

And the result in GTM preview will be

enter image description here

Blue one is your original item. Red one is the modified item you can use in GA4

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda