Sending GA for Firebase event via Measurement Protocol - firebase

I'm using Google Analytics property for Firebase project, and I'm trying to send some event via Measurement Protocol but as far as I see there is no specific MP parameters for such events.
Is there any way to do this?

If you're trying to add an additional attribute to your GA data then a custom variable or dimension/metric within GA might be what you're after.
Once that's in place you should be able to populate it using the MP.

Related

Retrieve Google Analytics 4 event parameters via API

Google Analytics (particularly version 4, "GA4") has various predefined events, each with its own parameters. E.g. the purchase event has an items parameter, which contains data such as item_id and item_name for each purchased item. JS code on a website can send these events and pass the extra data, and I can actually see the data in the "Analysis hub" in the Google Analytics interface.
Is there a way to also fetch this extra data using the Google Analytics Data API? There is a way to retrieve some predefined dimensions and also "custom dimensions" (via customEvent:parameter_name), but e.g. purchase item data doesn't seem to be a part of that.
Do I have to define custom dimensions (e.g. a purchasedProductId) and send them in addition to the items parameter, if I want to access this data via API?
Jan,
Ecommerce reporting is not yet supported in the Google Analytics Data API. I will update this question once I have more information about the timeline of this feature implementation.
Thanks,
Ilya
The Google Analytics Team

Google Analytics SDK UserActivity cannot show custom metrics?

The SDK reference
https://developers.google.com/analytics/devguides/reporting/core/v4/rest/v4/userActivity/search
shows that custom dimensions are part of the result Activity, but custom metrics are not mentioned
I have a very simple problem, but cannot seem to find the answer anywhere:
How can I get the google analytics data, event by event, including my custom metrics?
Lets say given a client id
I have tried connecting the dataLayer variables through Tag Manager to Google Analytics in various ways and cannot find the custom metrics in detail (i.e. raw, event by event) anywhere in Analytics - Seems that only Analytics 360 allows it via BigQuery; but there must be a way using the SDK
Or is it just not possible?

How to send Google's Data Layer data to other analytics paltform

I'm trying to set up an events tracking pipeline for my website to track different kinds of events like button clicks, page views, capturing form fields etc. Now, I'd like to store this data somewhere, one way is to send this data to Google Analytics but it doesn't store string type of data like form data.
Is there some way to send DataLayer data to other third-party platforms and store it?
If not, what's the best way to access/export this user-level data
dataLayer is an object loaded on a page. This means that you can access it and pick it up with Javascript and pass it on wherever you like.
However, the fact that there is a dataLayer, makes it probable that there is Google Tag Manager installed on those pages. If that is true, you can use GTM to pass on those values from dataLayer (even if they are the contents of the form, like name, email, etc. which you must not push to Google Analytics) to whichever other platforms.

Custom trigger showing up in Google Analytics - but NOT the value itself

I have a gtag account setup and that also connects to google analytics.
And I have made a successful tag/trigger to make event tracking for when an FAQ item is opened at my clients FAQ-page
I am sending the trigered FAQ question text as a value as well. And I wish to have a list in Google Analytics in which the questions are shown in a list.
Am I missing something? Should I setup the trigger/tag in another way, or am I missing something in the GA.
Thanks for taking your time.
DEBUGGER
TAG CONFIGURATION:
GA:
The event value in Google Analytics must be a number. You are currently passing {{Click Text}} string, which actually gets ignored by ga object, and will not reach Google Analyitics. More details on event tracking.
Basically, you should send this text data in a text field into Analytics.
Original recommendation, using custom dimensions:
I recommend you to set up a hit based custom dimension, where you can submit additional text data in connection to your event. You'll be able to analyze it as a secondary dimension in standard event reports, or by creating custom reports.
In GTM, you have to modify either the Google Analytics setting variable, or the Analytics tag itself, and assign the desired value (click text in your case) to the custom dimension ID, which you have created in Google Analytics. E.g. custom dimension 6 gets passed like this:
An other option, based on Eike's suggestion:
You can also use any of the other standard event fields for this, e.g. send it in the label. As pointed out, this can even hold larger set of data (500 bytes), compared to custom dimensions (150 bytes). This is also easier to be implemented in GA and GTM as well, as you don't have to deal with custom dimension creation and reporting.

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.

Resources