Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Flow09AT opened this issue Nov 18, 2022 · 1 comment

Comments

@Flow09AT
Copy link

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

@ErikEbk007
Copy link

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

─ MyApp/ # Project ├── gradle/ │ └── wrapper/ │ └── gradle-wrapper.properties ├── build.gradle(.kts) ├── settings.gradle(.kts) └── app/ # Module ├── build.gradle(.kts) └── build/ ├── libs/ └── src/ └── main/ # Source set ├── java/ │ └── com.example.myapp ├── res/ │ ├── drawable/ │ ├── values/ │ └── ... └── AndroidManifest.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants