Is there a way to view surrounding logs in Stackdriver Logs Viewer? - stackdriver

Stackdriver logs search is great for finding particular logs one might be interested in, but then it's a bit annoying to zoom out and look at nearby logs e.g. what was happening around that time, especially if a lot of logs were generated on/near the same timestamp. Kibana has a feature for being able to see nearby docs[1] and apply/takeaway filters, is there a way to do this in Stackdriver?
[1] https://youtu.be/sNGbxbCv-6I

There are some basic filters available in Stackdriver which may not exactly what you see in Kibana but would serve your purpose. You can use the time-range selector drop-down menu to filter specific date and time in the logs. Once you identify a specific log, you can set time to see logs before and after using the "custom" field of time range selector.
Alternatively, you can set "Jump to time" field from the time-range selector field and then set time for specific log and then you could use another drop-down menu next to the time-range selector from where you can select time ranges (Eg. +/-1 Hour, +/-6 hours etc).

Related

Using event as view exclude filter in Google Analytics

I have an event that triggers from my tag manager every time someone clicks a certain URL link. This event appears to be tracking properly in GA. However, I am attempting to create a filtered view that excludes traffic that triggers this event. When I use the Filter Verification I get:
"This filter would not have changed your data. Either the filter configuration is incorrect, or the set of sampled data is too small."
Indeed it does not change my data. I am using the event label as the field field/pattern if that makes a difference. Any suggestions?
Ok, there are issues with this question. But first, the answer is: filters aren't meant to remove more than particular hits. They aren't meant to remove sessions or users. Only hits. But there's a hackaround.
Now, more points:
You don't exclude "traffic". Traffic is not precise enough to be useful here. You have to decide what you want to exclude: an event, a session or a user. Or something inbetween, but then you need to define it properly.
A session in Google's understanding is really a bit different from what it seems like. It is custom to believe that a session is a series of interactional events with less than 30 minutes (configurable) inbetween. Not quite. If your source changes, that's a new session. Bear with me.
You... can hack around it if you really need to. By "painting" users or sessions. You do it by setting a specific custom dimension (user- or session-level) and then delete all events that have that custom dimension set using a view filter. The CD will be backfilled, so the filter should clean stuff close to how you expect it to do.
However! GA is... a little bit odd with how they record sessions and users. There may occur a situation when you end up having users or sessions with no events in them. However, if you find this issue at play, you still can export the data to BQ and query it properly. You may find that export cleaner.

Metrics and dimensions are not showing up for hits of type 'event'

I have a fully functional and working code (written in C#) which purpose is to track some hits to the specified GA property. This code has been tested and still works successfully. It adds some predefined dimensions (like App Version) to each hit and a several custom metrics to a certain hit types (like event with a certain Event Action).
So far so good everything works flawlessly when taking into account the first property to which these hits are being sent. Also everything is fine when I set up a brand new GA property and track my hits to it - that is, I'm able to see events in Realtime reports, and events show up in custom reports after a while so that I can see my custom metrics.
The issue is that when I try to send absolutely the same hits to the existing property which had been created and configured ages ago - there is no both dimensions (even predefined) and custom metrics in my custom reports. I see these events in realtime and behavior reports, and I'm even able to create a custom report against events count - but that's it. I'm able to use for example Day of the month as a primary dimension, but when I try to use App Version as a dimension or my custom metrics as report metrics - it says "There is no data for this view.".
I've already tried everything I could, have read almost every post about custom definitions in Google and viewed almost each related SO question and answer - still with no luck.
We use measurement protocol
There is a correct User Agent being sent with each hit
17 days has passed since my first attempt to track these hits with existing property
There is no filters and segments at all
There is only one view
For me it looks like a property misconfiguration, but I've inspected each configuration page (I have all possible rights granted) and have not found anything related.
Will appreciate any help with this issue.
UPD: The hit itself (with the sensitive data replaced):
t=event&ec=session&ea=connection_end&el=b225d53a-6bb2-8021-f7b5-ae7004ae0a00&cm1=174960&cm2=1751494&cm3=479033&tid=UA-XXXXXXX-X&cid=4119e77f-be87-4530-04d3-33882f8eea77&v=1&av=XX.XX.99.555&an=my-awesome-app&aid=app.awesome.my
UPD: Here is what I'm trying to achieve (screenshot was made at the test property, where everything works like a charm):

Tracking events and making sense of it

Lets say I wish to track
User action - game he played - which area he stays - his house number.
If I were to track these event actions in Tabular format, it would look like:
UserId|Game|Area|House|Timestamp so on.
Then I can always run SQL queries if I want to answer few business queries. Like
1. In a given day/week, who is the most active User
2. Which game is most-played?
3. Which area plays most events
4. Which user from which area are the most active
Whats the best way to capture this using Google analytics? Will custom dimensions be useful. Or GA is not suitable for this kind of insight?
Thanks.
First of all, the house number is too precise, it would be against GA's ToS.
In GA everything is captured in "hits", you can think of this as one "row" of data.
Let's look at what you wanted to find out:
Most Active User? - This depends on how you determine "Active". Is it the longest Session durations? Tried most games? Most logins? Most sessions? To track a user, you'd need a User ID tracked.
Which game is played the most? - Again, what is played the most? Longest time in game? Most "start" games? This would require you to know the Game that was played and when someone started playing
Which area is most active? -This would go back to the definition of active, the region information is needed along with the active definition
Which users are most active in an area? Same as above, the user would need to be identified and area
To determine which Custom Dimensions (CDs) you want, let's look at the example data points you want to track and try to determine the scope and if it already exists as a standard dimension:
User ID - this is obviously related to the user, makes sense to be user-scoped
Game - This is a tougher CD. I would think that in a single session, users can play multiple games, thus I'd think you'd want this to be hit-scoped.
Area - GA already provides this based on the ISP
Timestamp - GA already provides time dimensions
From above, we can determine that you need to create two CDs, one to track User ID, the other to track the Game.
You can also look into using the userid feature in GA for cross-device tracking.

IFTTT - record timestamp (rather than time range) in Google Calendar

I created an IFTTT recipe that logs the time I arrive and leave work every day, but it always records it in 1hr blocks.
I'm using iPhone's location to track when I arrive and leave. Everything seems to be working, but calendar events are showing as 1hr blocks rather than just a timestamp.
For example, if I arrive at 8:05am it will show as a block on my calendar from 8:05 to 9:05 rather than just showing for one minute. I'd rather it just say "I arrived at work at 8:05". Thanks in advance!
Am I right in assuming you used the default "Track your work hours in Google Calendar" applet made by Google ?
It uses the Quick add event action to add this event to your calendar. Instead, create your own version of the applet that uses the Create a detailed event action. This allows you to set the following parameters (specifically, it includes Start time and End time):
You can set the start time and end time to the same value, but it will, of course, still read as an event that runs from e.g. 9:05 to 9:05.
If you want to record just a single timestamp, you will need to use a different service to store your data. Perhaps record the data in a Google spreadsheet ?
Any queries, post a comment and I'll get back to you.

Google Analytics Goal Not Recording Accurately

I'm not getting the right results returned for a goal I have set up. The goal says the last 7 days have 92 goal conversions, when it should be 400+.
When a user completes a subscription purchase, they land on a confirmation page. We have several subdomains that the user can be coming from as well as the potential for a reference appended to the URL. So, I have the goal set up as a regular expression like this:
.*/insider/confirm.*
If, for example, the user pays and then is directed to the following page, shouldn't the goal be recorded?
test.com/insider/confirm?ref=2343
As I can't see anything wrong with the regular expression, although very greedy, the goals should be captured with the above example URL and goal setup.
Have you recently set this goal up? A thing with goals are that they aren't historically applicable to your data. They start collecting data from the point where you set it up.
Have you tried using the above regexp in the "All pages"-report under "Behavior"? Enter it into the filter pattern and there you can see exactly what pages your regexp would capture.

Resources