Previously, I could track a "screen" :
public void setScreenName(String name) {
mGoogleAnalyticsTracker.setScreenName(name);
mGoogleAnalyticsTracker.send(new HitBuilders.ScreenViewBuilder().build());
}
Now I don't see it, but as I've read, I think it's automatic, so it sends data of the activity lifecycle anyway. Is it true?
Probably the most important thing: previously I could track using category, action, label and value:
public void trackEvent(final String category, final String action, final String label, final long value) {
mGoogleAnalyticsTracker.send(new HitBuilders.EventBuilder()
.setCategory(category).setAction(action)
.setLabel(label).setValue(value).build());
}
and now I see a completely different way to track events ("custom events"), using bundles. Example:
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.ITEM_ID, id);
bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, name);
bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "image");
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle);
How does it work? How is it shown in the website of Firebase Analytics? I suppose I could have the first parameter of logEvent behave like the category parameter of the Google-Analytics, but what can/should I do for the rest? According to the docs, this should be ok:
public void trackEvent(final String category, final String action, final String label, final long value) {
Bundle bundle = new Bundle();
bundle.putString("action", action);
bundle.putString("label", label);
bundle.putLong("value", value);
mFirebaseAnalytics.logEvent(category, bundle);
}