Firebase Remote Config: user in randome percentile. Are users assigned only once? - firebase

Suppose I create a parameter with conditions such that users in random percentile < 10% will be assigned a certain value. The client fetches this value parameter and gets this value with 10% probability, if not it gets the default value. Next session the client fetches the same parameter. Will he get the same value again? Do users stay in the same percentile indefinitely or is a dice thrown each time they fetch the parameter value?

From the documentation:
Each app instance is consistently mapped to a random whole or fractional number within a project, so you can use a rule of this type to consistently address the same app instances.
For example, to create two related conditions that each apply to a non-overlapping .05% of an app's user base, you could have one condition include a <= .05% rule, and another condition include both a > .05% rule and a <= .10% rule.
So they receive the same value consistently.

Related

What is the expected Azure Time-Series-Insights Gen2 API-behavior incase of take-parameter is used for GetEvents and GetSeries endpoints?

I am currently experimenting with the Azure TSI Gen2 ApiVersion = "2020-07-31" and I am wondering the effect of the GetSeries and GetEvents endpoints Take-parameter.
If I query TSI data for a wide searchSpan that contains more events than I define on my Take-parameter, what happens? Is the data returned in some order? What is the expected form of the response data?
Documentation definition for the Take
take - integer - Maximum number of property values in the whole response
set, not the maximum number of property values per page. Defaults to
10,000 when not set. Maximum value of take can be 250,000.
The take parameter specifies the number of events returned by the query (across pages). So if your search span has more events than your "take", TSI randomly selects, or 'takes', that set of records from storage. E.g. if you have 20k events in your search span, and a take of 10k, you'd get a random 10k events from the 20k in that timeframe.
In the TSI explorer, when you "Explore Events" to see the raw data, the explorer calls GetEvents. TSI explorer will always try to show the max (250k) events and will notify you if there more than 250k in the search span.
Data isn't returned in any order by the APIs. Adding sorting capabilities is something we have on our roadmap. Here's a feedback item where you can upvote the request to add this functionality, as well.
Here's some examples showing the request/response of GetEvents and other APIs.
As documented here: https://learn.microsoft.com/en-us/azure/time-series-insights/concepts-query-overview#time-series-query-tsq-apis
Get Events and Get Series API supports pagination to retrieve the complete response dataset for the selected input.

Google analytics API: different sum of sessions with 'ga:eventLabel' function and without it

I added 'ga:eventLabel' function to my script and sum of sessions decreased from 2238 to 994. Why?
I expect the same result from both script
dim=['ga:eventLabel', 'ga:source','ga:sourceMedium']
met=['ga:sessions', 'ga:users']
start_date='2019-07-01'
end_date='2019-07-03'
transaction_type='Goal'
goal_number=''
refresh_token=token
condition=''
data_2=google_analytics_reporting_api_data_extraction(viewID,dim,met,start_date,end_date,refresh_token,transaction_type,goal_number,condition)
viewID='*********'
dim=['ga:source','ga:sourceMedium']
met=['ga:sessions', 'ga:users']
start_date='2019-07-01'
end_date='2019-07-03'
transaction_type='Goal'
goal_number=''
refresh_token=token
condition=''
data=google_analytics_reporting_api_data_extraction(viewID,dim,met,start_date,end_date, refresh_token,transaction_type, goal_number,condition)```
Here are the results:
--
The two queries have two different meanings, and won't give you the same result, unless you have a data set, where all sessions have at least one event type hit associated with them.
The first query says: count all my users and sessions for the given date range, breaking it down by event label, source, source/medium and date. So in this case, you implicitly filter for any known event labels, where (not set) is an empty, but existing label for a recorded event. Sessions without any events are excluded.
The second query says: count all my users and sessions for the given date range, breaking it down by source, source/medium and date (regardless, if they had any events).
You can verify this behavior, if you create these custom reports in Google Analytics web UI. It is similar to querying custom dimensions: if no value was set for a given custom dimension, those records are excluded.

Why would totals.visits be NULL on a row where totals.newVisits is 1

I'm running a query to pull source, medium, some custom dimensions, new sessions (totals.newVisits), sessions (totals.visits) and session duration (totals.timeOnSite).
I get some results where there is a value for totals.newVisits, but not totals.visits. How would that be possible - isn't a new visit supposed to be a subset of all visits?
You have to see these 2 variables ("totals.visits" and "totals.newVisits") as indicators (booleans).
Here, we want to know whether the user have already gone to the website before the visit or he is a returning visitor (totals.newVisits) and whether the user have done an interaction during the session or not (totals.visits).
In that case, it's 2 independent variables.
That is why Google specify these variables like :
The value is null if there are no interaction events in the session.
or
If this is the first visit, this value is 1, otherwise it is null.
You have to really stick into Google's variables definitions : BigQuery variable dictionary
From definition for totals.visits
The value is null if there are no interaction events in the session.
Added
Definition for totals.newVisits
If this is the first visit, this value is 1, otherwise it is null.
how can there be a value for newVisits if there are no interaction events?
I would interpret this as: New User visited page but there was no interaction
See more at BigQuery Export schema

How do I get the current count of a metric from Graphite

I am trying to get the value of a metric 'activelogins' from Graphite. I increment the value by 1 every time a user logs in and decrements it when he logs out. I need to show the current number of 'activelogins' in my dashboard.
Querying using
summarize(stats_counts.user.activelogins,"99years", "sum")
as expected just gives me the sum and not the current which I actually want.
How do I get the current count of 'activelogins' from Graphite ?
I imagine you could use the absolute of the derivative of stats_counts.user.activelogins and than summarize this, as in absolute(derivative(stats_counts.user.activelogins)).

How can I get results for a dimension (custom variables), where the value is not set?

I am using custom variables to track order ids. In order to aggregate analytics data into out data warehouse, I want to select a number of metrics with the custom variable as a dimension. However, if I do so, I will not get the entries where the variable is not set (E.g. sessions that didn't result in a sale). I need to get these as well.
Can I write a filter or segment that selects only the entries that doesn't have a particular custom variable? I have tried:
segment=dynamic::ga:customVarValue1==
But that doesn't seem to work (It gives no results back).
Basically I'm looking for the equivalent to where ga:customVarValue1 is null in sql.
In short, it's not possible to get the nullset data, as explained by a Google rep:
For some dimensions, GA uses the default value of (not set).
Custom Variable do not have a default value, so if a hit does not have a
custom variable associated with it, all the other dimensions in the query
are not added to the reports.
The original answer is a little confusing, but when you read between the lines it suggests that they throw out these "empty" values when they run their aggregates.
The "correct" approach, as he explains, is to set a default value for any row you want reported:
If you need to see the (not set) value, you could try sending a default
value for custom variables.
For example if you use visitor level custom vars to track member vs
non-member, you should always set non-member as a default for everybody;
then modify to member once they register.
Details are here: http://groups.google.com/group/google-analytics-data-export-api/browse_thread/thread/cd078ddb26ca18d5?pli=1
I've just had some success solving this by using a Regex to capture users or sessions where the custom dimension has no value. In my case I want to separate logged in and logged out users.
The Regex .+ will capture any non-empty value, so can be used to get the job done.
The filters for my Returning users segment is matches regex: .+ like this:
For the Customer prospects I used: does not match regex: .+ like this:
It's early days, but this appears to be working:

Resources