Firebase Console: How to see "action" event count over time - firebase-analytics

I'm tracking some events in my app. However, I only can see the count of "action" events in the last 30 minutes. I would like to see the count of those events in a given period of time.

If you're talking about the "view" parameter name for your action event, you would need to logged a custom dimension for them to appear on your event reporting. Once you logged them on the Custom Definitions page, a data card for each parameter you logged is added to the related event-detail report. However, note that it may take up to 24 hours for the data card to appear. During this 24-hour period, you may see (not set) appear as a parameter value. Once that initial 24-hour period has passed, you will see the expected parameter values from that point forward. You may also check this documentation regarding custom dimensions and metrics for your reference.

Related

Unable to Save Due to Record Locking (by Current Machine)

Updated***
To quickly summarize what I said before which was lengthy and probably too roundabout confusing...
My issue was I have a main form interface with 2 subforms that does the following:
the First one is always shown for current daily event task(s) based on a label control with current date or any given dates via the prev/next toggle buttons as criteria.
The second one is part of the main subform that will be called based on the selection from the main navigation controls. This subform shows all the event tasks that are created in the database.
Both use saved query select statements with a snapshot and no record lock as recordsource in a continuous form. The table source is linked via split database in the same shared network drive and the table itself contains only 8 fields:
ID (12 chars randomly generated with specific sequence via VBA with no duplicate allowed)
Event Name (Text)
Event Desc (Long Text/Memo)
Occurrence (Text)
Start Date (Date)
Selected Day (Text)
Allow Weekend (Text)
Active (Boolean)
To edit a selected record, it will be called and populated onto a popup unbound model form via VBA. Here everything works fine as for records with fewer chars found in the Event Desc field. However, for records with a large number of chars (so far those that I noticed with issues were the ones with >4000 chars). I can call and display them fine to the detail view form (unbound) but when making edits, by the time it gets to the updating field for Event Desc, it would generate the record locking error by the same user (me) for those with large text size.
After several trials and errors, I noticed it has to do with the displayed continuous subforms that I have presenting. I noticed that the form for them were originally set as dynaset to which I tried to switch over to snapshot and it was a hit and miss (mostly miss). I don't know how much of this setting was an issue to the record updating as I had no problem saving records with smaller character counts.
Finally, I decided to before saving the record, I went and remove the recordsource for both of the continuous forms to empty ("") then save then reassign the query (saved or direct doesn't matter) and it worked without errors after. I personally don't like doing it this way as it makes the continuous forms update look ugly and not smooth (see the #Name?) in the assigned controls due to unrecognized control source since the recordsource is now empty. However, this was the best way that I could think up at the moment.
I even tried using a bounded form for editing the record instead of the unbound form and the same error outcome, but that time it gave a different record locking error# but pretty much for the same reason.
I'm sure this issue is not related to how my VBA code was written nor the queries used in the continuous forms. It's most likely the form settings themselves or just some limitation of Access?

Auto edit MySQL data after a given time

We have a form which is stored in draft mode. That means editing any data or deleting the entire form is possible. The beginning to end process is as follows
When a person tries to submit the form for the first time, that is stored in draft. (the isDraft column is set to 0)
The user is redirected to another page where s/he can view the Form id (a generated number), name, a few other details and Edit/Delete options.
The user can click edit button to edit anything, or even delete the form.
However this will be allowed till a given date (say 15 days from the first submission date). Once that date is passed, the form can no longer be edited or deleted. In case the form isn't deleted, the isDraft column is set to 1.
Thousands of people can submit the form . So ,it is not possible to do it manually.
Our project is done using Laravel v6.2, but I want a general idea as well .
I can use a trait or ajax on the master page, but that is too risky and also, server inaccessibility can delay the process, and some users may get an advantage.
How to do it?
If there is no concrete answer, but rather only discussion , I will remove this post
Just store the date (time component depends on how accurate you want to be when you check the 15 day interval) when the form is created as draft.
When a user wants to edit it (display the edit form) or save an edit, compare the current date (and time) with the stored creation date + 15 days. If the current date is less than the creation date + 15 days, then allow the display of the edit form or save the form, otherwise display an error message.
Not sure if I understand it correctly, but I think you like to update the updated_at timestamp automatically. You can run through the Eloquent Models by create a command and just call the save Method on them.
$model->save()

Firestore Cloud Function Trigger only when path updates with new entire

I have a firestore database that looks like this
/entries/ ....
/users/{userid}...
a bunch of documents is being sent into ... of entries and userid contains on 8 docs of user profile information.
my problem is that the entries doc contains field hours and no relation to the user doc which contains the field weekly_capacity
I need to aggregate this the two fields hours/weekly capacity setting them to Full-time equivalency variable
But the Full-time equivalency needs to be accurate and this company FTE can change so it would need to calculate the FTE over various date even if the user changed their FTE status x number of times.
And the current app only fetched the entries when the user logins into the app, which can be whenever.
None of the API requests that I am using will give me a json that holds both weekly_capacity and hours on the same fetch. If every time a user logs into the app firestore calls the http to fetch all entries then how can I compare the hours field on the collection's entries to the weekly_capacity field
Just a little context: FTE = Full-time equivalency and is used to measure as a standard to see if an employee compares to there core commit hours they signed up for which is 40. SO if I agreed to work 40 and I work actually work 40 hours then I would be 1 whole FTE. If I worked 20 and I suppose to work 40 I am .5 FTE. The math is really simple it's just that in my situation the variable FTE can change any time and the app will allow the user to enter a range of dates fetching the total actual hours they worked and FTE letting them know how many hours they were supposed to work vs how many hours they actually worked. Since the variable changes, I need some way in firestore to track the change and aggregate correctly against the hours actually worked. To give an error example: let's say I changed my FTE from 1 to .7 on March 20th, I then want to generate a report of March 1 to March 30th stating my hours worked and FTE status meaning did I reach my goal. The kicker is that I can't fetch or merge the entries which hold the var hours and /users/ which hold the var weekly_capacity.
I don't even think a cloud function would solve the problem since entries are only fetched when the user logins in right?
I'm assuming the following for answering your question.
Requirement: To calculate FTE for a user when user's weekly_capacity is updated or user logs in.
Problems:
Some way in firestore to track the change.
Calculate FTE correctly according to the change.
Here's what I think will solve the problems.
Google Cloud Firestore supports listeners for the collections in which you store the data. So you can listen for any change in users collection and entries collection. This is how you can track the change.
To calculate FTE, when a change is made to weekly_capacity of user document or a new entry is made to entries collection you need to query both collections separately to get the records corresponding to the user affected. You can also use a collections-group query for this purpose but that depends on your database design.
Hope that helps.

Proton CEP: How to count distinct instances in temporal context

I wish to count the number of distinct visitors to a store each half an hour.
I know I will need:
the temporal context (half an hour)
What kind of EPA should I create to count distinct visitor ids?
I suppose I will need an internal segmentation by visitorId?
Here you go:
The EPA should be of type Aggregate.
Yes, you need internal segmentation context by visitorId.
See the documentation for a sample which demonstrates how to perform count:
https://github.com/ishkin/Proton/tree/master/documentation/sample/fraud
A pdf doc included.
Hope this help.
If you want to count how many times each user entered the store, then you can use Aggregate EPA with segmentation context on the visitorId as suggested by #urishani.
If you want to count how many distinct visitors entered the store (assuming you can get multiple input events for each visitor), then you need to:
Aggregate all the input events related to the same visitor that arrived during a half hour to one event, lets call it distinctVisitor
Count how many distinctVisitor events arrived in the previous half hour
To implement (1) I would use an Aggregate type EPA with segmentation context on the visitorId, and an half hour sliding window temporal context. It will have condition that the count over the input events is at least 1, its evaluation policy will be deferred (at the end of the half hour), and it will derive the distinctVisitor event.
To implement (2) I would use an Aggregate type EPA, that will take the distinctVistor as input event, will have sliding window temporal event that will be open every half hour for a short time (lets say 30 second), it will count the number of distinctVisistor events, and its evaluation policy will be deferred. It will not use a segmentation context, since you want to count events of all visitors.

Auto renewal of SSRS report

I have created a report which represents daily sales. It has a Date parameter. Users of this report want it to renew, for instance, each hour, without clicking anywhere, and show results on the screen. They don't want to receive it by mail, they want to see it renewed version each hour on browser.
If it didn't have any parameter, I heard that it is possible to arrange schedule in browser itself, but it has a parameter (Date).
Is there a way to do this? Thanks in advance for any help.
Agreed with SFrejofsky to be careful about DB security. When I've needed to do this in the past though, there is a report auto refresh property that you can set that worked well.
Click anywhere outside of the report. Then in the report properties pane (if not already displaying... with report selected, press F4, or go to View-->Properties Window) set the auto refresh property (in number of seconds) to how often it should refresh (in your case... 1 hour... set to 3600), then with the report rendered, any new data since report first rendered or last refresh, should display upon the refresh.
I've done this when users run a report that they leave open for a bit and new data is being sent to the DB every couple minutes or less and they want it refreshed like every 30 seconds. I'd be curious though about the need to keep the report open for so long and a required auto-refresh of an hour.
Hope that helps.
I have to post a comment to your comment as an answer because I don't have enough reputation yet to add a commemt.
I went back to reports that I did as I described above. I see that the reason it worked in my cases is because there is a date range for the reports (from datetime and to datetime) which are defaulted to today at 12am to today at 11:59pm. So the reason this worked in my case is because when the business users are looking at this during the day, the new records will display, as they will still fall within that datetime range. All parameters for the report have default values. I tried changing one of the datetime values and running the report. It ran with the new datetime value, but each time it refreshes (every 30 seconds), the datetime doesn't get reevaluated. This is due to a long standing issue(?) ...opened in April 2011... with SSRS and not reevaluating default parameters that are changed by the user, that many people out there have mentioned they would like, and have the need, to have control over, and Microsoft just always responding with... it is not a bug, this is working as designed, as there isn't a way, currently, of knowing if the parameter was changed by the user.
So in my case, this was suffice, but I can see that based on the report requirements, it may not be a viable solution in every case.