I am trying to send the custom data in google analytics version 4 where the sending procedure seems to be different then previous version, I have create a custom dimention from google analytics web page then with the corresponding index I am sending the repective value as mention below,
Tracker tracker = ((Application) getApplication())
.getTracker(TrackerName.APP_TRACKER);
tracker.send(new HitBuilders.AppViewBuilder()
.setCustomDimension(1, "info1")
.build());
tracker.send(new HitBuilders.AppViewBuilder()
.setCustomDimension(2, "info2")
.build());
from the logs it seems that the data is send but not sure as I am unable to view any data in the google analytics web page.
You'll have to create a custom report and select the custom dimension, and any metrics associated with that custom dimension. For some reason Google hasn't (and who knows if they will) update the Custom Variables report.
You can define a custom report (Google Analytics > Customization (top tab)), but you need to make sure you select the right Metric or your information will not appear (e.g. ga:hits). https://support.google.com/analytics/answer/1151300?hl=en
Alternatively you can query the information through Google Analytics Query Explorer, although not choosing the correct dimension / metric will result in no data to appear (e.g. ga:dimension1 + ga:hits). http://ga-dev-tools.appspot.com/explorer/
Obviously might take a few good seconds / couple of minutes for information to be available, and important for fresh information make sure the date range includes today (yes, it happens to best of us to refresh furiously and find out Google Analytics date range was up to yesterday :-)
Developer reference (for anyone else looking for it): https://developers.google.com/analytics/devguides/collection/android/v4/customdimsmets
Related
If I install the app when clicking the dynamic link. All of that information from dynamic should be still available when I open the app for the first time.How can I get that information? It is not working when I use this: getInitialLink() returns Promise<string|null>;
Since, you haven't mentioned - I'm assuming you are having problems with shorter urls, if that's the case try putting the longer url.
Or refer here on Simon's answer: When I use the long instead of short links, everything works perfectly fine.
On Android, you use the getInvitation() method to get data from the Dynamic Link:
AppInvite.AppInviteApi.getInvitation(mGoogleApiClient, this, false).setResultCallback
(/* ... */);
Then, in the callback, you can get the data passed in the Dynamic Links link parameter by calling the getDeepLink() method:
Firebase Documentation - Use Case
For future reference or detailed answer on Firebase Dynamic Links
Behave just like normal Links
In cases where the application doesn’t require installation (say, if it’s already installed) then clicking the Dynamic Link will automatically open the link to the desired screen.
Dynamic Links have a very simple process flow:
The user begins by clicking the Dynamic Link
If the the needs of the Dynamic Link target are satisfied (this is, the application being installed) then the user is navigated to the target location
Otherwise, if the application requires install in order to navigate
to the Dynamic Link target, the the user is taken to the point of
install for the application. Once the application has been installed,
the user is navigated to the target location of the Dynamic Link
And if that wasn’t all, we can integrate Dynamic Links with Firebase Analytics to track the interaction with any links that we generate for our applications. But if we only require simple tracking, then we can use the automatic built-in analytics from the Dynamic Links panel within the Firebase Console where we can also obtain attribution and referrer information for interacted links with no extra effort required from our side.
What makes it different from Google Analytics?
One of the first things that came to my mind when I read about Firebase Analytics was, “What about my Google Analytics setup?”. So if you already have Google Analytics in place, then why would you make the switch to Firebase Analytics? Well, here’s a couple of differences between the two:
Audiences
We can use Firebase Analytics to create Audiences — these are groups of users that we can then interact with using other Firebase service such as Firebase Notifications and / or Firebase Remote Config.
Integration with other Firebase Services
An awesome thing with Firebase Analytics is that we can integrate other Firebase services with analytics. For example, creating an Audience of users who have experienced a crash reported through Firebase Crash Reporting.
Lower Method Count
The Google Analytics dependency on Android has a total count of 18,607 methods and has a total of 4kb used for dependancies. On the other hand, Firebase Core (for Analytics) has a method count of 15,130 and only 1kb used for dependancies.
Automatic Tracking
When we add the firebase core dependency, it will automatically begin tracking a collection of user engagement events and device information for us — this is useful if you’re looking to only collect the minimal data for your app.
Unlimited Reporting
For up to 500 events, Firebase Analytics provides us with unlimited reporting straight out of the box for free!
No Singleton Initialisation
When setting up Google Analytics on Android we are required to initialize a Singleton instance. Firebase Analytics are simply available by fetching the instance directly from where we wish to track data. This isn’t much effort obviously but just makes the setup flow slightly easier.
Single Console
All of the data for every Firebase service is available for a single console. That makes it both easier and quicker for us to navigate from checking the analytic stats for our app to viewing the latest crash reports.
It looks like this is a react-native-firebase open bug for android
For fix the only thing that is required to be changed in module code:
private boolean isInvitation(PendingDynamicLinkData pendingDynamicLinkData) {
return FirebaseAppInvite.getInvitation(pendingDynamicLinkData) != null;
}
to
private boolean isInvitation(PendingDynamicLinkData pendingDynamicLinkData) {
FirebaseAppInvite invite = FirebaseAppInvite.getInvitation(pendingDynamicLinkData);
if (invite != null && invite.getInvitationId() != null && !invite.getInvitationId().isEmpty()) {
return true;
}
return false;
}
Bug reference : https://github.com/invertase/react-native-firebase/issues/1273
Please Check Your Manifest file
open AndroidManifest.file => In your activity tag there is intent-filter tag put below line in that tag.
<data android:scheme="https" android:host="your.dynamic.link" />
<data android:scheme="http" android:host="your.dynamic.link" />
If already done then check this link for the full blog on the dynamic link with react native.
Link: http://blog.logicwind.com/react-native-dynamic-links-using-firebase/
I hope this will help. sorry for the typos.
I am completely new to Firebase analytics. I am trying to send an event which shows statistics about my API call.
endTime = System.currentTimeMillis() - startTime;
// [START event]
Bundle params = new Bundle();
params.putString(FirebaseConstants.PHONE_NUMBER, Utility.getPhone());
params.putLong(FirebaseConstants.DURATION, endTime);
FirebaseAnalytics
.getInstance(getContext())
.logEvent(FirebaseConstants.BALANCE_CHECK, params);
// [END event]
But I only see the name of the event, number of users and occurrence count. 24 hours have already passed and I don't see my custom properties. For reference, I want to see a phone number(Utility.getPhone()) and the time which API call takes(endtime). Maybe it is possible that it does not send anything because I created custom params in my FirebaseConstans class
[Update, May 2017]
As of May 2017, custom parameter reporting is now supported in Google Analytics for Firebase. Please refer to this help center article for more details.
your custom data and parameters will be available as soon as your audience reach 10 or more, that is a privacy restriction.
so just use it in your activity as:
FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
Bundle bundle = new Bundle();
bundle.putString("some_key", "some_value");
mFirebaseAnalytics.logEvent("some_name", bundle);
it will work (after some time (max 24 hrs) you can see some_name as event in your event view but some_key will be available when audience is 10 or more).
As of https://support.google.com/firebase/answer/7397304?hl=en&ref_topic=6317489, you need to register your parameters before they can be shown
When you first set up custom parameters, a data card for it will be added to your event detail report. However, it may take up to 24 hours for any data to appear.
According to documentation, you have to link with BigQuery to see custom parameters:
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.
Source: https://firebase.google.com/docs/analytics/android/events#log_events
I have contacted firebase support and got response:
Looks like the params don't pre-populate automatically. When creating
your audience, you'll have to fill them in yourself.
The thing is, data will be populated only with events coming AFTER creating new audience, you won't get data collected until that moment, which is something I would expect to be the case...
Edit: from firebase support personel
Audiences are not retroactive, so you will indeed need to create them before data will be populated within them. Do note that existing data can still be looked at and queried if linked with BigQuery. Also keep in mind that most audiences will have a minimum threshold which needs to be met before reports are generated for them.
From https://firebase.google.com/docs/analytics/android/events#log_events
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.
We have built a B2b Catalog sharing & trading appon native Android & PhoneGap. Does it make sense to look at Firebase Analytics, or Google Analytics good enough?
With Google Analytics, clarity between which should be recorded as ‘Views’ & which as ‘Activity’ is unclear. Eg Catalog view can be View of Catalog screen, or an activity as (Category = catalog, action = open, label = catalog-name, value = catalog-id). Obviously, more information is recorded in an Activity
Proposed architecture for Google Analytics is below:
1. Screens/Views: Home, Login Contact Buyer/Approved, Buyer/Pending,
Buyer/Detail Supplier/Approved, Supplier/Pending, Supplier/Detail
CatalogPage, Catalogs/My/List, Catalogs/Received/List,
Catalogs/Detail, Products/Detail Shared/List, Shared/Detail
Selection/List, Selection/Open, Selection/Create SalesOrder/List,
SalesOrder/Open, SalesOrder/Edit PurchaseOrder/List,
PurchaseOrder/Open, PurchaseOrder/Edit Notification/List,
Notification/Detail [some more..]
2. Events:
The challenge is this - there’s obviously duplication in recording what is happening on the app as a View or Event, and I’m unclear on the best reconciliation for this. I’ve tried to keep Pages / Screens as Views, and the Buttons / Links on them as Actions.
Does this look ok? Any inputs / thoughts?
Another option is to use both Google Analytics and Firebase in your app. This can help you compare and contrast the implementations and data gathered from your app.
I have integrated Google Analytics into my Android app. The app is a photo printing app which contains a set of predefined themes that users can choose. However, is it possible to retrieve the stats from Google Analytics (e.g., the top 5 themes selected by user) using some api rather than using the Google Analytics console?
What you are looking for to retrieve the information is the Core Reporting API. Because the Google Analytics API requires all requests to be authenticated and your users are not authorized to access your Google Analytics account It is probably best to set up the API call on the server side using a service account here is an example of how to set up a python application to use a service account to access the API.
But what should your query be?
analytics.data().ga().get(
ids='ga:' + profile_id,
start_date='30daysAgo',
end_date='today',
metrics='ga:totalEvents',
dimensions='ga:eventLabels').execute()
Your application will need a way to access the results of the query from your own servers. You might also want to look into using the Google Analytics Super Proxy which solves a similar problem of allowing external users to access the results of an authenticated API request.
You could create an event in Google Analytics that would effectively track this. Events have Categories, Actions, labels, and event values. So you can fairly effectively add a theme or anything you wanted as a dynamic value. Then you would be able to search and sort in Google Analytics on the event category and find which Theme was used the most
#Override
public void themeSelected(String theme) {
// May return null if a Tracker has not yet been initialized with a
// property ID.
Tracker tracker = Tracker.getInstance(this);
// that are set and sent with the hit.
tracker.send(MapBuilder
.createEvent("Theme", // Event category (required)
"Theme Selected", // Event action (required)
theme, // Event label - Can dynamically set this with the theme that was selected so you can search in Google Analytics on it.
null) // Event value
.build()
);
}
Screenshot showing sorting off of the Event Label. My labels were numbers that users entered. Notice you can see the number of times each one was entered in the TotalEvents Column which should give you the information you were looking for
I am new to Google Analytics.
I want to track my application by unique user id.
I am using Google Analytics SDK for Android v3.
I have this code on onStart().I read about user id and created a new view for user tracking.
Tracker tracker = GoogleAnalytics.getInstance(this).getTracker("UA-xxx-2");
tracker.set(Fields.SCREEN_NAME, "Main Acitivty");
tracker.set("&uid", id);
tracker.send(MapBuilder.createAppView().build());
But I am not getting how can I get this uid in my Google Analytics Console,
I am trying to track user by their user_id , so I can get complete report of particular user.
I am able to get count of the total active user , screens and hit events.
But I didn't get any success on getting the same report user-wise.
I also tried to create custom dimension and metrics but those are also not reflecting on account.I have no idea Where can I check this field.
For custom variables :
easyTracker.send(MapBuilder
.createAppView()
.set(Fields.customDimension(1), "premiumUser")
.build()
);
I have searched , but I didn’t find any good tutorial on this.
Any help, suggestion , reference link would be greatly appreciated.
Thanks.
User Id is only used internally to make sure that the sessions from one user are tracked together - it just makes your stats more accurate, and enables cross device analytics.
You cannot acces the userId though:
User ID - Feature Reference
Limits
The User ID value can not be queried as a dimension in reports in either the web interface or the APIs
Also be sure not to send any user id like name or email:
User ID Policy
You will not upload any data that allows Google to personally identify an individual (such as certain names, social security numbers, email addresses, or any similar data)
You can find User ID Converage under Behaviour in the Audience section
check this image: