GithubHelp home page GithubHelp logo

ecommerce-migration-helper's People

Contributors

calhounsm avatar diminishedprime avatar pfrisella avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ecommerce-migration-helper's Issues

"currency" in ecommerce object appears as "undenfined" in the GA4 result

Send following to the migration helper tool

{
  event: "purchase",
  ecommerce: {
    transaction_id: "12345",
    value: 25.42,
    tax: 4.9,
    shipping: 5.99,
    **currency**: "USD",
    coupon: "SUMMER_SALE",
    items: [
    {
      item_id: "SKU_12345",
      item_name: "Stan and Friends Tee",
      affiliation: "Google Merchandise Store",
      coupon: "SUMMER_FUN",
      currency: "USD",
      discount: 2.22,
      index: 0,
      item_brand: "Google",
      item_category: "Apparel",
      item_category2: "Adult",
      item_category3: "Shirts",
      item_category4: "Crew",
      item_category5: "Short sleeve",
      item_list_id: "related_products",
      item_list_name: "Related Products",
      item_variant: "green",
      location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
      price: 9.99,
      quantity: 1
    },
    {
      item_id: "SKU_12346",
      item_name: "Google Grey Women's Tee",
      affiliation: "Google Merchandise Store",
      coupon: "SUMMER_FUN",
      currency: "USD",
      discount: 3.33,
      index: 1,
      item_brand: "Google",
      item_category: "Apparel",
      item_category2: "Adult",
      item_category3: "Shirts",
      item_category4: "Crew",
      item_category5: "Short sleeve",
      item_list_id: "related_products",
      item_list_name: "Related Products",
      item_variant: "gray",
      location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
      price: 20.99,
      quantity: 1
    }
]
  }
}

"Google Analytcis 4" results is

Product 1
  item_id: SKU_12345
  item_name: Stan%20and%20Friends%20Tee
  affiliation: Google%20Merchandise%20Store
  coupon: SUMMER_FUN
  undefined: USD
  discount: 2.22
  index: 0
  item_brand: Google
  item_cateogry: Apparel
  item_category2: Adult
  item_category3: Shirts
  item_category4: Crew
  item_category5: Short%20sleeve
  item_list_id: related_products
  item_list_name: Related%20Products
  item_variant: green
  Location ID: ChIJIQBpAG2ahYAR_6128GcTUEo
  price: 9.99
  quantity: 1
Product 2
  item_id: SKU_12346
  item_name: Google%20Grey%20Women%27s%20Tee
  affiliation: Google%20Merchandise%20Store
  coupon: SUMMER_FUN
  undefined: USD
  discount: 3.33
  index: 1
  item_brand: Google
  item_cateogry: Apparel
  item_category2: Adult
  item_category3: Shirts
  item_category4: Crew
  item_category5: Short%20sleeve
  item_list_id: related_products
  item_list_name: Related%20Products
  item_variant: gray
  Location ID: ChIJIQBpAG2ahYAR_6128GcTUEo
  price: 20.99
  quantity: 1
Additional Parameters:
  transaction_id: 12345
  value: 25.42
  tax: 4.9
  shipping: 5.99
  coupon: SUMMER_SALE

for Universal Analytics (with GA4 Support" the result is OK.

image

Category mistyped

When I send this:

{
      "transaction_id": "09erdxiojaoidw0e9",
      "affiliation": "Frutacor",
      "value": 78,
      "currency": "BRL",
      "shipping": 18,
      "items": [{
        "id": "product['_id']",
        "name": "product.name",
        "category": "product.category.name",
        "quantity": 1,
        "price": 60
       }]
    }

It suggests me this

gtag('event', 'purchase', {
  'transaction_id': '09erdxiojaoidw0e9',
  'affiliation': 'Frutacor',
  'value': '78',
  'shipping': '18',
  'items': [
    {
      'item_id: 'product%5B%27_id%27%5D',
      'item_name: 'product.name',
      'item_cateogry: 'product.category.name',
      'quantity: '1',
      'price: '60',
    },
  ],
});

item_category is spelled as item_cateogry.
Also, the documentation shows affiliation should be at item level, not purchase level

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.