Firestore Analytics - Is there a limit to the number of parameter's values in one event? - firebase

So let's say for example, I have user_id#1234 in chat room_id#4321 and I'm keeping track of:
The total number of messages for this particular room_id#4321, and
The total number of messages user_id#1234 sends in this room - (It's important to associate the user's messages with the room because I need to track the total user's message count PER each chat room.)
Here's the approach I got so far in my attempt to keep it to one event: On Firestore Analytics, I've created a custom dimension with the event "room_messages" and I'm able to log the events like so every time a message is sent:
firebase
.analytics()
.logEvent("room_messages", {
room_id: room_id,
user_room: `${user_id}-${room_id}`,
});
But particularly for the user_room parameter, since there could be so many users and rooms, is there a limit on the number of parameter values? ie there could be a ton of the event (room_messages) -> parameter (user_room) -> value (user_id-room_id)
And on top of that, how do you even view these events and their parameters for insights? Whether on Firestore or Google Analytics, it seems like I can view all the total events that have occurred just fine, but for viewing the events AND their parameters, I am only able to view that from what events were triggered in the last 30 minutes.
Appreciate any help!

Update: The parameter has to also be defined using Custom Definitions. Now the room_id tracking information shows up on the room_messages event page.

Related

Google Data Studio can't count user count for an analytics event

So i've an app that logs events to firebase/google analytics for instance lets say the event name is 'log_purchase'
I can use data studio and create a filter but now if i select my metric as
event count i can see a value but if i change it to 'Active Users' as in total number of unique users that triggered this event
It says no data, what am i doing wrong how can i see either active user count or event count that only logs users once
Turns out it needs at least around 40-45 users before the data studio shows them after that it starts to work properly.

Google Analytics User Activity showing wrong Event Parameters

After creating a report using the Explore (Analysis) tool on Google Analytics, we've created a report for all the users that have triggered a specific event. but once we click on that user to view his User's Activities, we found the following issues:
Numeric Event Parameters are being shown with 6 extra zeros. (i.e. actual value=5, shown value=5000000).
It is not showing all the Event Parameters that we are sending with the event
2 notes that should be mentioned:
at the same time, we've checked BigQuery for those records and saw that the number event parameters values are correct (without zeros) and all event parameters are being stored correctly.
the numeric Event parameter has been registered as Standard

Google Calendar API V3: Identifying edited one-offs of recurring events?

I am currently listing all events from a Google Calendar using the "singleEvents" parameter set to true, which splits recurring events into individual events – which is good. However, I'm running into an issue when an instance of a recurring event is edited, and the edits are saved with the "Only this event" option in the Calendar UI.
What I need to do is be able to identify which of these recurring event instances have been edited, and which have not. It seems the API response data does not provide any indications of whether this is an instance of the unedited recurring event, or an edited one-off. The response for an unedited instance of a recurring event and an edited instance are more-or-less the same, save the description field, which was edited.
The reason I need to differentiate edited versus unedited recurring event instances is that I am dynamically creating event detail pages from the list of single events. I would like to have one page be for the recurring event itself, and another for a "one-off" of that recurring event. E.g:
allmyevents.com/events/my-recurring-event --> page showing recurring event with recurrence information
allmyevents.com/events/my-recurring-event/16-4-2020 --> page showing specific instance of recurring event, which has been edited
Currently, I'm able to do this by creating an entirely new event at the same date and with the same title as the recurring event instance I want to replace, and writing hacky comparison logic to tell if this is a replacement event, but this is counter-intuitive for event/content management.
Answer:
You can use the Calendar API Events: instances endpoint to return all instances of a recurring event. All the events which have been edited on their own will not be returned.
More Information:
The Events: instances endpoint of the Calendar API will return all instances of a recurring event for a calendarId and eventId specified. Any of these that have been edited are omitted.
It's a bit of a workaround, as these events can't be obtained directly, but by obtaining the list of events as you have already been doing and then removing the events which are returned by Events: instances, you can build a list of all the events which have been edited with the 'Only this event' option.
Psuedo-code:
You can do something like this:
eventsList = Calendar.Events.List(calendarId, singleEvents=true)
eventsInstances = Calendar.Events.Instances(calendarId, recurringEventId)
singleEvents = eventsList
for each instance in eventsInstances :
if eventsList.items contains instance :
singleEvents.remove(instance)
return singleEvents
Where the returned singleEvents variable will be a list of all the events that have been edited manually.
References:
Events: instances | Calendar API | Google Developers
Recurring Events | Calendar API | Google Developers
I've been puzzling through this same issue, and I think I've found a way forward that doesn't involve going through every single instance to check if they've been moved/edited:
Each event returned by the Calendar API has an iCalUID field. For a standalone event, this should match the event's id, with an #google.com suffix. e.g. an event with the id of abcdef has an iCalUID of abcdef#google.com.
When it comes to recurring series, every single instance of that event has the same iCalUID value - and, most importantly, you can use iCalUID as a filter when listing events, which will return the main recurring series event and all modified instances. Unmodified instances are not returned.
Tracking which instances have been deleted is slightly more fiddly. They might be returned in the list with the matching iCalUID, but with a status set to cancelled. Or, they may be specified within the recurrence property (an array of strings) on the main series event as timestamps (within the given time-zone, which should match whichever time-zone the main series event uses):
[
"RRULE:FREQ=WEEKLY,COUNT=5",
"EXDATE;TZID=Australia/Melbourne:20211227T110000,20220103T110000"
]
I haven't figured out why some recurring events use the specific-instances-as-cancelled approach, and others use the EXDATE approach (and I think they can also be combined, so don't presume the presence of one rules out the other). Given both are possible, you'll have to allow for that.

Measurement Protocol with uid but without cid not received in GA

I have a booking system where a booking can be made:
1. immediately by a customer, or
2. on their behalf by a customer service agent.
For 1, I've had success POSTing an event hit to the Measurement Protocol with a cid and our uid for a "purchase". Initially without the cid, it wasn't working despite the docs saying only one of uid or cid are required.
For 2, which isn't customer initiated, when I don't pass a cid nothing comes through to GA (neither the real-time dashboard or the ecomm report).
Here's the hit for option 1, broken in to lines for easier viewing:
t=event
&v=1
&tid=UA-XXXXXXX-2
&ec=Ecommerce
&ea=Purchase
&ti=176410
&ta=Some+Affiliation
&pa=purchase
&tr=123.45
&pr1id=Repair367
&pr1nm=Something+Replacement
&pr1pr=123.45
&pr1qt=1
&pr1ca=Repair%2FInspection
&pr1ps=1
&cd3=None
&ni=1
&uid=469585
OK, so it turns out this is the case:
If using cid, your hit will appear in your property's standard view's real-time Event screen (immediately) and ecomm Sales Performance screen (~10mins later for me)
If using uid and no cid, your hit will appear ONLY in those screens under your property's UserID view.
I'd been looking in the standard view and nothing was appearing as soon as I swapped over to a uid-only hit when it was customer service initiated. So although the docs say only one of either uid or cid are required, it should mention it has a significant affect on where the data is viewable in GA.
Sigh.

reporting on event hits in google analytics

I have been tasked with using Google Analytics to report of use of a desktop app so we can see which parts of the program are being used and how heavily, and potentially also see which companies are using which parts of the program (each company has a unique companyID). Ideally I'd like to be able to look at correlations (e.g., How many users who use report A also use process B?)
I currently have my program set to fire off a call to analytics. I've set it up to use the event tracking, but I'm open to app/screen tracking or something else if something would work better. I'm passing values like
v=1
&t=event // Event hit type
&tid=UA-XXXXX-Y // our ID; real code has valid value here
&cid=12345 // CustomerID
&ec=JobFinancialReport // Event Category
&ea=Run // Event Action
&el=Manager // Event label
&ev=7 // Event value
What I can't figure out is how in Google Analytics to set up reports that would show me something like:
CustomerID Category Label Total Hits Unique Users
12345 JobFinancialReport Manager 27 2
12345 MarketingReport1 Manager 6 4
I'm totally new to analytics so pardon my ignorance if I have some key misconception here. I've searched Googles sites and other questions here, but I may be wording my question incorrectly so I'm not finding something that's there. This is only one example; in some cases we might want to see how broadly each customer is using the program; in other cases we'd want to take the customerID out and just see how much a particular report is being used overall. Appreciate any guidance. Thanks.
The "cid" parameter is the client id, the value that is used to stitch single interactions into sessions and users.
The first problem that comes to mind with your setup is that the client id is not exposed in the user interface (with the single exception of the user explorer report) or the API.
You would need to implement this via a custom dimension (probably user scope, since it probably will never change for a given user) where you pass in the client id (you still need the cid parameter).
Then you could create a custom report (or create a report in Google Data Studio) with the custom value as primary dimension and your selected metric.
If you want to report "Unique Users" you would probably need to create a cid per logged-in user (if all users of the app have the same cid then you will always have but a single user reported). You should then probably create a second custom dimension for the company id, so you can segment your reports by company.
you can use custom reports in google analytics to get your desired output. here is how to create custom reports https://support.google.com/analytics/answer/1151300?hl=en

Resources