I've been asked to set up some custom dimensions in Google Analytics, for a client who is unfortunately still using Universal Analytics and can't switch to GA4 yet. This is for a web app.
The custom dimension is supposed to have session scope, and have a value of "true" or "false" based on whether a particular event happened at any time within the session. That is, they want to be able to make a custom report with two rows, one for users who performed a particular action (at any time during the session) and one for users who didn't.
The trouble is that there seems to be no way to set a default value for a dimension, nor to show a row in a report for sessions where the dimension has no value. I could set the value to "false" when a user first visits, then set it to "true" when they perform the action in question. But then if a new session starts, I would need to set it to "false" again; but I don't see a way to be notified when a new session starts. (GA's concept of a session is different from a web browser's sessions.)
I suspect the correct answer to this is something like "Don't use custom dimensions and reports for this; use [some other feature that was designed for this]". My employer asked me for a custom dimension, but I suspect they know what they're doing even less than I do.
Is there a way to achieve this?
On many other analytics platforms, this would just be a matter of tracking an event when the user performs the action, and setting up an appropriate funnel view to divide users into those who sent the event and those who didn't.
(The client would also like to be able to do the same thing at the user scope, i.e. have a separate custom dimension that works like the above one, but based on whether the user has ever performed the action, not just whether they've done it within a particular session.
Again, I could likewise set it to "false" when the user first arrives at the site, and "true" when they perform the action. This should be fine as long as they only ever visit on one device, in one browser, and never clear their cookies. But if the same user were to visit on a different device (assuming GA is able to discern that it's the same user), I would unfortunately be setting the dimension back to "false" when it should remain "true".)
Related
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.
I've setup a Zapier automation to fire an event every time a new deal is made on a 3rd party CRM. The automation triggers fine, and retrieves the GA Client ID stored in the CRM. The goal of this automation is to add the value of the deal to the client's session history. This works completely fine on a new test GA View I made as well as the original one (the one left without any filters).
However, there's one GA View which has both, anti-bot/spider setting and 3 filters set up. I tried disabling all four of them, yet the event still wasn't being fired - not in real-time, nor User Explorer. Wondering what could be the cause of this. All views are, of course, of the same property. Are there any other filters (besides the anti-bot/spider setting and view filters) or options I may have missed that are view-specific that would cause events sent by Zapier not to fire on just this one view?
Any help is appreciated!
The update of the settings, in the specific case relating to the filters, may not be immediate. If you leave the filters disabled, you can certainly check if after midnight (or after a few hours after midnight) you see that data in the reports.
This happens because after midnight the data is reprocessed again, so for that day (which has therefore become the previous one), if you have removed the filters, you should find all the data.
I would like to compare some data between a 3rd party analytics tool and GA.
Now I would love to see the IP addresses that Ga is receiving however it seems that they do not reveal this information, fine, however, I cannot find a way to use the flat table in the GA custom report to show me the following if possible;
Full Date Time (Seems as though they don't want you to have this either)
Browser Version
Browser Width & Height
Page (from the hit)
And I would like this data not to be grouped by the metric, this way I can see that if the same user has hit a page 3 times it isn't grouped.
If anyone can help please let me know. If the question is poorly phrased please let me know.
Thanks,
Connor.
This requires some work, and it will allow the breakdown only for future hits, not for hits that are already collected.
To view individual hits you need to create a hit based dimension that is unique per hit. Unless your page has an amazing amount of traffic a timestamp in milliseconds (e.g. new Date().getTime()) will be sufficient (for your report you might want to format that in a nice way). So in the admin section of your GA property you go to custom definitions, create a hit scoped custom dimension, and then modify your pagecode to send the timestamp to that dimension. Hit scoped means it is attached to the pageview (or other interacton hit) it is sent with.
If you want to break down your report by user you need the clientid (clientid is how Google recognizes that hits belong to the same user). Again, send it as a custom dimension.
This does not tell you how many sessions the user had (there is no session identifier in GA). If you need to know that you can create a session scoped custom dimension and send a random number along ("session scope" means that GA only stores the last value in a session, so you don't need to maintain a session id over multiple pageviews, since the last value will be set for all hits within the session). The number of different sessions ids per client id then tells you the number of sessions per user.
The takeaway is that GA only shows aggregated data, and if you want to defeat this mechanism you need to throw data at it that cannot be aggregated further. You might run into other constraints (i.e. there is a limited number of rows per report).
There are two events.
User visit /point1.
User visit /point2.
If the events occur in this order, I want the goal to be hit.
I have created a funnel for this, but the problem is that even if the user does not visit /point1, and visit /point2, the goal is hit! (destination is point2..)
I want the goal to be hit only when the user visit /point1 and /point2 in that order.How can I accomplish this?
Basically you can't (not via configuration, that is). Funnels only affect the visualisation, not goal completion.
You can either do a workaround in code - set a cookie on /point1, then fire an event on /point2 only when the cookie is set, and change your configuration to use an event based goal.
If you do not need to actual goal conversion, but just want to know how many users completed the steps in the correct order, you can create a segment of the "sequence" type (step1 page equals /point1 followed by step2 page equals /point2), which will limit the data displayed in the standard reports to sessions where users visited one point after the other.
I currently have website (vb.net) that uses google analytics and it has been working fine. What i want to do is turn off GA when the employees of my company log in and turn in on when the clients use it. Each login has a unique id so the first thing that i thought of was to just check the id and add/remove the GA code depending on who logs in. I'm not sure if doing this will affect the stats in any way. Are there other ways to achieve this? Thanks
Depending on your use case, it could be better to utilize this data by placing it within a custom variable, saying if the member is an employee or a regular user. Within the reporting you could then segment the traffic based on value. In most cases this will be the better option as you won't have an inflated drop off rate at the login screen.
If you're still needing to abort the calls, you have a few options:
Add the JavaScript window['ga-disable-UA-#######-##'] = true; on the page. This will need to be done before you call the normal Google Analytics code.
Add logic to fire or not include the entire Google Analytics code block if the user is within a certain group or has a certain ID. This will obviously depend on what language you're developing in.