GA Management API Update Users Custom Dimension value, Goal Tracking strategy - google-analytics

So Let's assume I have a custom event inside my APP and I push custom dimension that has a certain value,
Is it possible through GA Management API to get that Custom Dimension by the value and then update it to the new value?
What I'm trying to achieve is, I want to track when user do his first paying process inside the app and to compare how many users that hit the first Goal (Signup) ended up paying it, what's the best way to do that thru the GA?
Thanks!

You cannot update historical data in Google Analytics.
You can track userId, sessionId and hitTimestamp information as custom dimensions and work on it: https://www.simoahava.com/analytics/improve-data-collection-with-four-custom-dimensions/

Related

How to set up Google Analytics for a website that is based on RFQ's?

Looking for a way to set up Google Analytics that help track an organize RFQ's my client receives through their website. I know it can't all be explained in one post (or who would want to), but I am curious if there is a way to track a customers RFQ's in GA. If anyone has any information on this it would be much appreciated.
You can start by using GTM to track the forms they use to submit these RFQs.
You can also go a step further and generate an ID for the RFQ, pass this ID to GA as a custom dimension and also track it in your CRM so later on you can analyze the closing rate from RFQ to buying. If you can provide more details on the mechanisms/processes in your RFQ, we can go into more specifics.

Sending custom event data to Google Analytics

I need to track events in Google Analytics from a server through the Measurement Protocol. I can do this just fine, but my problem is that I want to send additional/custom data along with the event. Specifically, I want to send a UUID along with the event so that it is possible for me to fetch data from the Google Analytics API in the future and correlate events with rows in a relational database.
Is there any decent way to send custom data along with events? I looked at using the event value, but it must be an integer, and it is not intended for things like this. The event category, action, and label are reserved for other purposes.
I am not that proficient in Google Analytics, so the solutions off the top of my head would be:
Send an additional event containing the UUID in the event label or something like that. Seems like a bit of a hack/workaround to send two events, with one being used exclusively behind the scenes.
Perhaps using a custom dimension or metric. I am not 100% sure about the implications of this and if that's a decent approach or not.
So basically my question is: what would be the best way for me to send a UUID along with a Google Analytics event from a server, taking into consideration that I cannot use the event category, action, and label for the current event? Is there any other way in which I could link events retrieved from the Google Analytics API to rows in a database?
So let's say I trigger a "Completed Order" event to GA, and I also have orders in a MySQL database. So what I want to do, is to link an event to an order row in the database.
There are several things that you can do and it pretty much depends on what you want to do with the information you are storing. For starters, all your requests should include the uid field with the value being the user ID within your system. This way all Google Analytics data will be calculated on the same user. Note: this is an internal value used within Google Analytics and you won't be able to see it.
Second, I would create a custom dimension of the name user_id and store the user information in that. You will then be able to use this information within your reports to see what each user is doing. Note: it's against TOS to send user name, email, or any other PII (personally identifiable information) to Google Analytics. But you can send your internal user ID.
I have done both of these in the past and found it to work quite well.
More info on User-ID.

Query Google Analytics by User ID

Is there a way to query results using the Core Reporting API (v3) and filtering those results by the User ID assuming that it is being sent to Google Analytics properly?
I've googled this question a lot and read a whole bunch of articles but I did not find one place that does that. Moreover, the fact that I cannot see the User ID anywhere in the reporting interface makes me doubt that this is even possible. I'm guessing I will have to dome something similar to what is recommended here in order to do it?
UPDATE
Apparently, the purpose of my question is not very clear as highlighted by Eike's comment below. What I want to do is generate a report for a specific user with a specific Id using the client API and then combine those results with information I have about this user in my system's database to do something as per my business requirements.
The best place to turn to for such questions is the Dimensions and Metrics Reference. If the dimension you're looking for is not there then you cannot query it or use it in a filter.
The list is really well maintained, so it's not very likely there are as-of-yet undocumented dimensions you could use.
User id is not there.
Well there is a way now.
The docs says the following steps
Set up User-ID in your account
Agree to the User-ID Policy
Read the User-ID Policy. Under I agree to the User-ID Policy, set the switch to ON. Agreeing to the policy enables the feature in your account.
Click Next Step.
2. Set up User-ID in your tracking code
After you enable User-ID by agreeing to the policy, you must implement User-ID in your tracking code.
To employ User-ID, you must be able to generate your own unique IDs, assign IDs to new users and consistently reassign the same IDs to returning users, and include these IDs in the data you send to Analytics.
In this step, you can see the line of code that you have to add to your Analytics tracking code:
ga('set', 'userId', {{USER_ID}}); // Set the user ID using signed-in
user_id.
3. Create a User-ID reporting view
User-ID data can appear only in a dedicated User-ID view.
Click Create.
Enter a Reporting View Name.
You might want to include the term "User ID" in the name to help you remember that this is a special User-ID view.
Select a Reporting Time Zone.
Under Show User-ID Reports, set the switch to ON.
Click Create.
Related resources
https://support.google.com/analytics/answer/3123666?hl=en

how to turn Google analytics on or off depending on user log in?

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.

Is it possible to create a virtual pageview from an event using a custom filter?

I've released a mobile app (Android) which I track using Google Analytics. As my experience with Google Analytics is little, I did some mistakes by not knowing when to use events versus virtual pageviews.
My app has a login and a signup screen and I'd like to track the conversion rate of users signing up for an account. The app tracks the page views (/Account/Login and /Account/Create Account) and the actual login and account creation as individual events (Category: Account, Action:Logged In and Account Created).
So here's my problem: In order to do a nice funnel analysis, I should have created virtual pageviews instead of events if the user logs in or creates an account. Though I can create a goal based on events it will not tell me the drop off rates in the individual steps the user takes. Only the funnel visualization can do this AFAIK.
Is there a way to automatically create page views using custom filters in Google Analytics? I've tried to setup a filter like this:
Field A -> Extract A Event Category Account
Field B -> Extract B Event Action (Account Created|Logged In)
Output To -> Constructor Request URI /Account/$B1
Field A Required Yes
Field B Required Yes
Override Output Field Yes
Case Sensitive No
However, that doesn't seem to work. I do not see any additional page views or any other changes. Any suggestions?
(Of course I could release an update to the app and I will probably also do this soon, but the above solution would help me with my experiments right now - without having to alter the source code every time I have "a new idea" how to improve the analytics data)
Unfortunately I've found that it's impossible to achieve this without updating the mobile clients. However, moving forward I will take a closer look at Google Tag Manager which allows much greater flexibility.

Resources