(Google Analytics 4). Collect custom events sorted by "event_timestamp" - events

I have a custom event created directly on the web page, as follows:
gtag('event', <action>, {'value': <value>, 'event_timestamp': Date.now()});
Google Analytics 4 is recording them and I can see them in the reports. My problem is that the timestamp of the events has a precision of 1 second and sometimes, when two events occur in a row within the same second, GA4 records them with the same timestamp, and sometimes interleaves them in the timeline, putting the first one after the second one and breaking the sequence order.
It is very important to maintain the order of events in the Google Analytics 4 User Interface.
That's why the object 'event_timestamp': Date.now() has been added in gtag(), to get an accuracy of milliseconds.
Now, is it possible to sort the events in GA4's UI according to 'event_timestamp'?
Regards and thanks.
NOTE: I don't use Google Tag Manager or BigQuery.

Related

Implement Ajax live search in google sheet for data entry

I have a spreadsheet of few thousands row with column that has multi word sentences so its not possible to remember exact name and at which sequence the words appear
such as "Cambridge international physics coursebook for a level"
As google sheets built in search don't allow partial words search like in websites.
I have made a workaround using filter function+regexmatch+split function to filter out the exact cell
see my example search
but after that, I have to manually search it using crtl+F ,as filter function don't allow me to edit filtered data,its very tedious.
How can i implement live ajax search in google sheet or is their any workaround or other software i should use for my data entry and modification purpose.
And can I use algolia instantsearch like feature for editing my sheet.
Take in mind that Apps Script has quotas, using this AJAX approach will make your quotas expire very quickly. Try to minimize the execution of scripts with this function.
You can just use setInterval() in combination with a custom sidebar, in there call the server function that you want to execute. If you space the executions to let's say 1 every 2-3 seconds you should be good.

count event frequency per users using calculated field

Google analytics have an Event Action Dimension, Users metrics, and Total Events metrics. I want to try calculate a frequency of users who download video more than 1 video/day using data studio. And I already put the tracker in Event Action as DL_End.
but I always failed when trying to make a syntax for calculated field.
this is some syntax that I used but all of them doesn't work:
Event Action = "DL_End" && Total Events > 1
Event Action = "DL_End" AND Total Events > 1
CASE
WHEN Event Action In ("DL_End") AND Total Events > 1 THEN Users
END
Is there Any syntax that I can Use to calculate a frequency of users who download video more than 1 video/day? Is it Even possible to do it in data studio? if it can, can you help me to solve this?
You might need to create some changes under the visualization with some extra filters.
Try to add a filter to Event Action which Includes the Event Action that only contains Event Action required and add the user and total events metrics under a tabular chart first, which might give you some idea of the frequency of users associated with the Event Action
Once you get this, you will get an idea of how to distribute this into the time series.

Wrong count of users Google Reporting API v3

I use Google Analytics core Reporting v3. I request data from Google Analytics.
Request:
metrics = "ga:sessions,ga:users"
dimensions = "ga:landingPagePath"
filter = "ga:channelGrouping=#Organic"
precision = "higher_precision"
Results
{.... // 7 rows with landing pages
....
ga:users: "39"
....
containsSampledData: false}
BUT in the Google analytics website I see count of users = 34 for the same period.
If I delete dimensions = "ga:landingPagePath" from request, I get right count of users like in the UI (34 users).
How can I get data with dimensions = "ga:landingPagePath" and right count of users like in the UI for the one request?
The Google analytics database is a mulit dimensional database. It is NOT a relational database.
You can not compare things that are not exactly the same. Create a request in the Google analytics website that has exactly the same dimensions and metrics and date ranges and the data should return close to what you get in the API. There will always be a few errors especially with calculated columns.
You cant look at two different requests and expect to see the same numbers it doesn't work that way.
From the Google analytics website
From query explorer
Google Analytics website report
If you for example want to see this report You are going to have to include all of the dimensions and metrics you can see here in order to get the same results back in the API. You cant just take Landing pages and sessions and expect the numbers to match up. This is again not a relational database its a multi dimensional database.
Also remember to be sure that the dates you are checking are at least 48 hours old. Data under 48 hours old has not completed processing and may cause your numbers to be off.
For the one you have linked in comments you would need something like this
ga:landingPagePath
ga:users
ga:newUsers
ga:sessions
ga:bounceRate
ga:pageviewsPerSession
ga:avgSessionDuration
ga:goal1ConversionRate
ga:goal1Completions
ga:goal1Value

QTP cannot select data in drop down if more than 50

I've been looking for answers and try so many ways. I need to automate one websites and this country field have 230 data. When I try to run the script, if the data less then 50 it can select easily. But if I want to select data from 50 onward it only scroll down until the last data. This is my code im using now. Working fine if the data that I want to select in the first 50 range
ObjPage. WebElement(xpath="some xpath data" ). Click
ObjPage. WebList("xpath=" some xpath data" ). Selecr strcountry
most probably the list items are loaded asynchronously(lazy loading) with AJAX, on-demand. Your best try is to look up in javascript / ask the developer about the events that make the list load the rest of the values. If this is clear, send those events to the list via UFT to trigger the loading
(Under the hood you could try calling the Javascript method directly with some runJS commands, however the event based solution is more realistic)

RSS functioning problem

I need to create an RSS feed for our information system, which is written in PHP.
I had no problems with the RSS 2.0 specification, nor with the creation of RSS feed generator. Items for the feed are to be fetched from a large table containing lots of records, so it will take a lot of time to get all the necessary information from this table. Therefore, it is necessary to implement the following scheme:
To show 5 latest items to new
subscribers.
For the existing subscribers – to
show only those items which have
been added since their last view of
the feed.
I have no problems with the first condition: I can simply use the LIMIT clause
to limit the number of fetched rows. Something like this:
$items = function_select(“SELECT * FROM some_table ORDER BY date DESC LIMIT 5);
But this creates the following problem: Suppose there are real feed subscribers who have already read the items from 1 up to 10. After they've been away for some period of time new items have been created; say, 10 new items.
During their next check-in we want them to see all the new 10 items, but not all at once. They will see only the last 5 ones (from 16 up to 20), but not all 10 of them. The items from 11 up to 15 will be omitted.
I suppose that in order to succeed in solving this problem there should be a kind of a flag to be sent to feed. For example: pubDate of the lasted fetched item. Twitter's feed uses something similar. However, that link is hand-made. How could it be done another way?
Please let me know if you have any ideas. If you have any example ready (no matter in what language) just share a link with me. I would appreciate it greatly.
Thank you in advance.
Standard RSS feeds don't render different content to different users. They simply always provide the most recent few items (often 10), and rely on the RSS reader to poll them often enough that they don't miss any updates. Unless you have a particularly compelling reason not to do this, this is the simplest and most effective mechanism.

Resources