link user parameter "value" into event value in firebase event console - firebase

I'm generating an event in my mobile app using this method:
var Param = {};
Param.VALUE = response[1];
firebase.analytics().logEvent(`Purchase_report`, Param);
and I am able to receive the log in StreamView and also Event dashboard. I also can see my parameter("VALUE") by correct sent value from my application in these views. However I don't know how may I link this value to the event value and I always see "0" as event value. Please refer to these images for more clarifications:

I found my answer. The point is if you set a value parameter, it takes about ONE DAY for an update to be appear in the firebase console.So I finally saw my report after one day.

Related

Firebase analytics event parameters not showing in console

I have been logging my event clicks, which seem to show up but I can't seem to find parameters anywhere in the Firebase Console. All I see is:
Events with custom reporting parameters will show up here
Here is how I am adding parameters:
var map = {'label': value};
_analytics.logEvent(name: 'session_button', parameters: map);
I can see session_button showing up in my console, just no data for the event parameters. Am I missing anything?
You don't seem to have any error in your code.
In the events tab of the Firebase Analytics console you have to click the three vertical dots on the right of your session_button event and do Edit parameter reporting. From there you can add the parameter that you want. Your custom label parameter should be on that list assuming the event has been triggered at some point. Following this your parameters should show up in other views.

Firebase Analytics Events - currentScreen is always screen_view

On my way implementing firebase analytics into my flutter app, i cant get the proper events to trigger or i dont get how this should work. Lets take the following code:
firebaseAnalytics.setCurrentScreen(screenName: "Dashboard");
When i trigger this event, in the Firebase Analytics debug view i see this:
The same when i trigger the screen changes automatically via:
navigatorObservers: [
FirebaseAnalyticsObserver(analytics: appState.firebaseAnalytics),
],
So my question is: Why does Analytics prints out "screen_view" instead of "Dashboard" or any other name i have in my named routes ??
The screen name is in fact submitted to the inner workings of the API cause i debugged firebase_analytics.dart on that place:
Future<void> setCurrentScreen(
{#required String screenName,
String screenClassOverride = 'Flutter'}) async {
if (screenName == null) {
throw ArgumentError.notNull('screenName');
}
await _channel.invokeMethod<void>('setCurrentScreen', <String, String>{
'screenName': screenName,
'screenClassOverride': screenClassOverride,
});
}
Answering my own question and thus wasting the bounty is hard but thats the way it is. Here are my findings:
The user provided screenName in the API gets submitted to the Firebase Analytics Dashboard but you need to drill down on the event "screen_view" to see the actual clicked screen Names you supplied. Unfortunately the user supplied Name wont be shown in the debugView of the Firebase Analytics console which got me on the wrong trail in the first place, thinking that its missing altogether, which is wrong.
tl;dr: screenName is just a parameter of screen_view Event and its right inside the screen_view event which you can drill down on.
Why route names don't show in the DebugView by using navigatorObservers? Looking for an explanation to this issue I got here and found the answer in Marc's Answer. It is actually being collected and is located as a parameter called firebase_screen.🧐

PrismTabbedPage created dynamicly with each tab having its own parameters

I'm setting up a PrismTabbedPage dynamically in Xamarin.Forms. I have a content page PrismContentPageProfile which shows the profile of a given Id. The Id I want to pass with a parameter. Problem is that each initialize is having all the parameters.
await NavigationService.NavigateAsync("NavigationPage/PrismTabbedPage1?createTab=PrismContentPageProfile?Id=Michel&createTab=PrismContentPageProfile?Id=Erik");
I expect to tabs. One for the profileId Michel and one for Erik. Problem is that the paramters in the Initialize look like this on each page:
{?createTab=PrismContentPageProfile%3FId%3DMichel&createTab=PrismContentPageProfile%3FId%3DErik}
As I don't know which tab I am, I don't know which profile to load.
I hoped that calling:
await NavigationService.NavigateAsync("NavigationPage/PrismTabbedPage1?createTab=PrismContentPageProfile?Id=Michel&createTab=PrismContentPageProfile?Id=Erik");
would result in different parameters on each page. Id=Michel on the first page, Id=Erik on the second.
Or, if that is not possible, that I know which tab index I am. Then I can read the related parameter.

Firebase + GTM + GA implementation issue

I am using iOS Swift 3 and trying to track screen views in Firebase and push those data into GA with GTM.
My issue is that I cannot get the screen name from "screen_view" events pushed into GA.
In firebase, the initial automated screen view hit has no screen name and only screen class so I used Analytics.setScreenName to set the screen name and override the screen class.
However this causes two hits in Firebase, one automated with no screen name and one manually triggered with screen name.
Also, I want to pass the screen name from the event into GA as a screen view type. I set the screenName field in GTM to a variable.
I have tried various event parameters for the variable
"firebase_screen" : results in not found and (not set) in GA
"_sn" : results in "invalid event parameter" in xCode debug
So I guess all the parameters that start with _ are reserved in Firebase. So how do I get the reserved event parameters from firebase into GA. For example, I may want to store the App Version in a custom dimension for something.
The biggest problem here is the screen name not picking up in the screenview hit from GTM to GA.
In Google Tag Manager you'll want to set the following:
Tag type: Universal Analytics (Google Analytics)
Track Type: Screen View
Field Name: screenName
Value: [the variable I've identified below]
Trigger: Fire on "Event Name" contains screen
** Note the Trigger might be better as matches "screen_view", but I haven't had a chance to test
Variable:
Variable Type = Event Parameter
Event Type = Custom Parameter
Event Parameter Key = _sn
Other Things
Make sure the Analytics.setScreenName is working and in ViewDidAppear as that fills the _sn parameter.
Xcode Debug Example
In Xcode you should see something such as:
firebase_screen_id (_si) = 4233194112313113131331;
firebase_screen_class (_sc) = ViewController;
firebase_screen (_sn) = Home View;
firebase_realtime (_r) = 1;
firebase_debug (_dbg) = 1;
firebase_event_origin (_o) = auto;

Adobe DTM (adobe tag manager) set s.campaign with direct call rule

I need to set s.campaign with a value that is returned by some ajax. I figured I could just make a direct call to get that done. Nothing seems to be reported.
After ajax I call:
_satellite.track('ruleString');
I can see in the debugger my rule is fired. In the Adobe analytics admin, has been set for values to expire after MIN.
I have tried four ways of getting the campaign value set from here.
1 -
Set it to a dataElement like : (in the analytics preset)
Campaign Value -> %mySpecialValue%
This element runs custom JS and logs the value so I know it runs, but adobe never sees a value.
2 -
I set it with the following: (in custom code box)
var delm = _satellite.getVar('special_id');
_satellite.setVar("newVal",delm);
return true;
and then set campaing to %%newVal%%
-
I set it with the following: (in custom code box)
var delm = _satellite.getVar('special_id');
s.linkTrackVars='campaign';
s.campaign = delm;
s.tl();
-
I set it with the following: (in custom code box)
var delm = _satellite.getVar('special_id');
s.linkTrackVars='eVar0';
s.campaign = delm;
s.tl();
None of them seem to get data passed to adobe analytics. It's like my campaign var doesn't accept data. It should also be noted that if I just set in DTM the value of campaign to just "text" it never seems to get passed in either.
Is there a better way to set campaign with custom code.
Please remember that AJAX is asynchronous:
$.ajax({
url: "test.html",
});
_satellite.track('ruleString');
is wrong, but:
$.ajax({
url: "test.html",
context: document.body
}).done(function() {
_satellite.track('ruleString');
});
will work.
Also please add in direct call rule console.log with data element value in javascript section, to check that value is present when rule is fired.
As it turns out a consutant that set up dtm initially for us dropped in some custom code in our app measurement file. It must have been from another client Basically s.campaign was being set in there only when "cmpid" was passed as a query param.
Basically (1) above is all thats needed in the direct call to set it from a data element so long as you call _satellite.track('stringVal'); when your ajax is done
If the data element value is coming from work done via Ajax, then don't call that data element with any other rules prior.

Resources