Event is not logged on Firebase - android

I'm using Firebase on my Android app.
I'm using this package for my react-native project. I don't get any errors when I'm using it. However, events are not logged. Any help with this? Thanks!
I'm implementing the code like:
Analytics.setUserId(user.uid)
Analytics.logEvent('view_item', {
'item_id': 'login'
});

If you read this (Firebase documentation), you can see that it's a custom event, the custom events not appear on control panel but you can see that in audiences and as a filters for firebase analytics. If you want that your event is showed in your control panel you need to use a general events, you can learn more about them here, when you use the user properties or regular events the firebase needs 24h hours to recompile information and show it on control panel. Tell me if I helps you! Greetings!

When your code triggers a "view_item", it is supposed to "trigger" an existing event from the firebase analytics console.
So you need to create an event that will handle the "view_item" event in your code.
From the console in analytics, you need to create a new event named "view_item_trigger" for example add the following condition:
"if event_name is equal to 'view_item' ".
The view_item_trigger event will now appear in the debug view

Related

Flutter log event with google analytics

I have set up Google Analytics with in my flutter app. It all seems to be working as standard, with data coming through and being displayed on the analytics console screen, showing users, events count that sort of thing.
I see the default events are: user_engagement, screen_view, session_start, first_open, app_remove, app_clear_data.
These are all having event count data coming through fine. I want to set up my own custom event within the flutter app. I have tried this...
_sendAnalyticsEvent() async {
FirebaseAnalytics analytics = FirebaseAnalytics();
await analytics.logEvent(
name: "save_plant",
parameters: <String, dynamic>{
'plant_name': currentPlant.name,
'plant_species': currentPlant.species,
'plant_group': currentPlant.group,
'new_plant': widget.newPlant
},
);
}
... but nothing seems to be coming through on the events. Am I missing something here with doing custom events with a flutter app? I have the google-services.json file correctly in the android app directory.
When You log an event with FirebaseAnalytics, it takes up to 24 hours to get it available in the Events dashboard.
If You want to test "real time" logging, You should try the Debug View (link).
After You set it up for a specific device (there are two easy steps, check it out here), You will see each event only a few seconds after You log it from Your app, in the DebugView section.
Update to 5.0.11, should resolve the issue
firebase_analytics: ^5.0.11

Firebase Analytics for React Native Android

Is there any complete documentation for Firebase Analytics with React Native for Android? There is https://rnfirebase.io/docs/v5.x.x/analytics/android.
But it still not complete and i cannot dig deeper into how to set my custom event, to set my current screen and etc.
Docs are here.
https://rnfirebase.io/docs/v5.x.x/analytics/reference/analytics
for example you can send event like this way
firebase.analytics().logEvent("Test Event")

Get Firebase event Params for cordova ionic app

I using Ionic 2 to create my app, also I am using the cordova-plugin-firebase for analytics.
The plugin works great and I am seeing events in my firebase dashboard.
But I am unable to see the event parameters that I send.
As mentioned in the docs of the plugin I am using the following code to log events and event Params.
window.FirebasePlugin.logEvent("page_view", {page: "dashboard"});
Going through the Firebase docs it is mentioned that Event Params are not shown directly but should appear after setting up "audiences"
Custom parameters: Custom parameters are not represented directly in your Analytics reports, but they can be used as filters in audience definitions that can be applied to every report. Custom parameters are also included in data exported to BigQuery if your app is linked to a BigQuery project.
I found the way to set up audiences here. But am not able to figure our how to set them up.
Any help in this regard is appreciated.
Don't forget, Firebase for Ionic is very young (0.1.17).
I have the same problem than you, maybe the plugin does not send the "value" parameter.
Also the Firebase doc say :
custom param is include in BigQuery.
You can activate it in Analytics > Events.
I have not yet tested this way.
cu
plugin : https://github.com/arnesson/cordova-plugin-firebase

How to test if my new event is working in Google TagManager before publishing it?

I am using Google TagManager in my android project. It was used and maintained before by someone and I am new to Google TagManager stuffs. I want to measure one of the button click events in my app. So, I have added this on button click:
dataLayer.push("myid", "mybutton-btn-click");
In Google Tag Manager also, I have added this variable and generated the new container binary which I have put in my app.
Now before publishing the container, I want to make sure that this new button click event works. But I cannot find a way to test it.
I enabled "tagManager" verbose logging but do not see any log when I click the button.
I also tried looking in GTM console and could not find a place to see it. I am also trying to look in GA console and could not see it.
I could generate the preview link for the container and can test that the app gets launched with the QR code reader.
can someone help me to know how to test if the event got logged on click of the button?
Thanks for any help
For testing your events in an anroid you need follow the instruction available in GTM for anroid documentation
https://developers.google.com/tag-manager/android/v5/#preview-debug-pubish-container

Google Tag Manager for Xamarin Android app

As of my googled data, i got to know how to integrate GTM with the xamarin app. Based the url here.
The Tag manager is able to push the events to the GTM.
So question is, how to get the application data associated with GTM in the Google Analytics.
I get some links and videos while surfing for this, all are explaining about the GA for Web applications. Am looking the same for Xamarin Android application.
Edit:
Adding to the question, Will GTM capture all the button clicks with out pushing the data?
Will the data like 'submit button clicked' is transferred to GA via GTM?
Thanks
Suppose you have an image and want to know how many people clicked on it.
When the user clicks on the image you run this piece of code:
var dataLayer = new Dictionary <string, object> ();
dataLayer.Add ("event", "imageClick");
dataLayer.Add ("imageName", "Bart Simpson");
Android.Gms.Tagmanager.TagManagerClass.GetInstance (context).DataLayer.Push (dataLayer);
To get this data on GA through GTM you have to follow these steps on your GTM Container:
Create a new TAG
Choose Google Analytics as the product
Set the GA's Tracking ID and Track Type to Event
Set the Category to {{Platform}} (this will get Android)
Set the Action to {{Event}} (this will get imageClick)
Set the Label to a new Variable of the DataLayer type and named as imageName (this will get Bart Simpson)
Set Fire On to Any Event (this will trigger everytime an event is pushed to GTM)
Save and publish your container
Now you can see the events popping in you GA Console. You can send multiple variables in one push, but you will have to create multiple Tags with different events to see them in GA.
Edit:
No, you must push events to the DataLayer.
Only if you configure the TAG as explained above.
On GTM there is basic tracking for web that is the same as inserting the google analytics tracking code on each page of your website, but that only works for basic stuff like page views, not custom events on buttons.
Source

Categories

Resources