How to find the event triggered before settings event is triggered in BigQuery? - sql

I want to find the event triggered before the event setting was triggered. For instance a user might click on setting from home_screen (home_screen being the event). There might be multiple sources(events) from where the user might tap on setting. How to find out the count of users from different sources?
Events that might help: user_pseudo_id, event_name, event_timestamp(in micros)
event_timestamp and event_name
user_pseudo_id
Desired Results (Here screen refers to previous source from where the setting was triggered)
I'm using BigQuery standard SQL.

You want screen_view from Analytics. "When a screen transition occurs, Analytics logs a screen_view event that identifies the new screen."[1].
You'll be able to access firebase_previous_screen, firebase_previous_class, firebase_previous_id parameters[2]
[1]https://firebase.google.com/docs/analytics/screenviews#automatically_track_screens
[2]https://support.google.com/firebase/answer/6317485?hl=en

Related

How to tell which logstream in cloudwatch triggered alarms

I am using fluentd-cloudwatch to forward logs from Kubernetes to cloudwatch.
All logs are forwarded to the same log group, but each container has its own log stream.
I have some filter metrics and alarms based these metrics.
For example, one filter metric could be "xxx connection error". Every time the error appears in the log, I will receive an notification. That's all working. But the problem is that I couldn't tell which log stream the error is from as I wanted to know which container generated that error.
If you have an active alarm, you can see which logstream triggered it by navigating to the Cloudwatch dashboard, select the specific Alarm. In top right (above the graph of the alarm's status) is a "View in Metrics" button. Click that to go to the specific Metric that triggered the Alarm. Above the graph of the Metric, is an "Actions" button, the last option under "Actions" is "View Logs", and you can select the metric name. The next view will show all instances of the Metric and the logstream that generated the metric.

Allow natural back button behaviour with use case of dynamically-added query parameters

I have the case that I push some parameters to the nuxt router (https://router.vuejs.org/guide/essentials/navigation.html) whenever somebody visits a page without any parameters.
Example:
somebody visits: /program it will end up in /program/first-event?year=2018&month=6
(First the view filters the program for current events (therefore the parameters for this year and this month) and then from the filtered events it will set the first event as active post (also by pushing it to the router).
This is all wanted and good. BUT now I detected the following problem:
Somebody is visiting /aboutus and then navigates to /program, the router will automatically change to /program/url-of-event-post?year=2018&month=6.
Assuming the user wants to go back to /aboutus he clicks on the browser back button. This will bring him back to: /program which automatically adds the post and the parameters again (effectively moving one step forward again).
Means the user is caught in clicking endlessly on the back button.
My approach would be to try to register if a user clicks on the back button and if so, I would not add the parameters. But I don't know how to do this.
I thought the router would provide some 'from' property, but so far I did not find anything.
I would be very happy to hear some thoughts on this. Thank you heaps in advance.
You need use router.replace.
https://router.vuejs.org/guide/essentials/navigation.html#router-replace-location-oncomplete-onabort

How the "event user count" is calculated for any event in fabric-answer dashboard

There is a user count ( Event Users) to each event in answer dashboard. How this count is changed as I can see whenever I install the app then only its increased by 1. But I want it to be updated whenever any new user sign in/sign out to my app.
And is there any way to link all events to a particular user or add user info in all events by default so that we don't need to add in each event all the info individually?
Todd from Fabric. Right now it's not possible to track individual users through Answers. You can use custom events and attributes to log these activities, but you will need to set the attributes for each event as they happen. Check out this page for more info.

Custom variables in Google Analytics

I have an application in which I am displaying dynamic advertisements. There are some ads displayed on pages without logging in, and others on pages that you have to log in to access them.
First, I want to be able to track how many clicks have been made on a given ad accessible anonymously.
I added this code to the onclick event of the ad
onclick="ga('set', 'dimension1', '#item.Id')" // #item.Id is the Id of the Ad
I can see that the event is triggered in the GA Debugger in Chrome, but I cannot see the result in GA even after 24h.
Second, I want to be able to track the Ids of the users who have clicked on the a given ad. And I don't know if this can be done using GA.
An ideas ?
Custom Dimensions and Metrics are necessarily connected to an interaction and cannot be sent on their own - they must always be followed by an interaction hit (pageview, event, transaction etc).

Changing CSS variables based on JavaScript events

We have a Facebook app here which has three boxes with three buttons. Each button, when clicked, should change state once an event (successfully) happens. The buttons are almost all working (a few minor bugs) but they have been done a rather long-winded and inefficient way.
My question is, what is the most efficient way to link events (i.e. page 'liked', personal information submitted, page 'shared') with the state of the buttons?
You can use jQuery and the .trigger() function to fire off events. Then you can use .bind() to listen to the events and do something. For example, when the user logs in, you can trigger a user_logged_in_event, and bind to it. In the function, you can then use JS to change the login button to logout...