Allways Error: value for items is missing
See original GitHub issueHi community.
I’m dealing with this issue, i don’t know if i’m doing something wrong, but every time i call logEvent with “items” property i get an error saying “value for items is missing”
this is my implementation
FirebaseAnalytics.logEvent({
name: "product_click", params: {
content_type: "page_view",
item_id: producto.id,
item_name: producto.nombre,
comerce_id: producto.comercio,
source: "selections",
items: [{
tipo: "producto",
nombre: producto.nombre,
id: producto.id
}],
}
});
i see the error occurs in FirebaseAnalytics.java line 149 since in mi implementation “Item” is not an String, Integer, Doble en so on.
while (keys.hasNext()) {
String key = keys.next();
Object value = params.get(key);
if (value instanceof String) {
bundle.putString(key, (String) value);
} else if (value instanceof Integer) {
bundle.putInt(key, (Integer) value);
} else if (value instanceof Double) {
bundle.putDouble(key, (Double) value);
} else if (value instanceof Long) {
bundle.putLong(key, (Long) value);
} else {
call.reject("value for " + key + " is missing");
}
}
I need help, thanks in advance.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:12 (1 by maintainers)
Top Results From Across the Web
How to correct a #N/A error
Solution: Either make sure that the lookup value exists in the source data, or use an error handler such as IFERROR in the...
Read more >Error codes for optional checks - mypy 0.991 documentation
Error codes for optional checks#. This section documents various errors codes that mypy generates only if you enable certain options. See Error codes...
Read more >Identification error MISSING_MATCHING_ATTRIBUTES ...
Missing minimum set of values for criterion attributes for an identification rule. Resolution. Determine the identifier used: Navigate to Configuration > ...
Read more >Excel Data Validation Tips and Troubleshooting
On the Ribbon, click File, and then click Open · Click Computer, then click Browse · Select the file with the missing data...
Read more >What's the most appropriate HTTP status code for an "item ...
Well, the answer is simple. Always try to attach a body to any errors that you returned from code. Errors that are returned...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi there, add JSONArray condition for e-commerce. Go to FirebaseAnalytics.java;
After then add this imports.
and find a logEvent function in FirebaseAnalytics.java you should to add 1 more if else condition for value instanceof JSONArray.
this is my code
You can check this docs for more information.
https://firebase.google.com/docs/android/setup#available-libraries (android/app/build.gradle) implementation platform(‘com.google.firebase:firebase-bom:26.4.0’) implementation ‘com.google.firebase:firebase-analytics’
https://developers.google.com/tag-manager/android/v5/enhanced-ecommerce You can check out of VIEW_ITEM or VIEW_ITEM_LIST for how can you send items/products with android bundle.
Also you can check out of this docs for more information. https://developers.google.com/analytics/devguides/collection/ga4/ecommerce https://firebase.google.com/docs/analytics/measure-ecommerce#java
Hi there I can confirm that with the
"@capacitor-community/firebase-analytics": "^1.0.0"
I still have this issue but only for Android.Every event that has
items
as a custom parameter won’t track those items if I check out the Firebase Debug View.Do you know how to fix it?