

Mia
Forum Replies Created
-
Sure! The e-commerce tracking setup for Google Analytics 4 (GA4) using gtag.js library involves a series of steps. Firstly, ensure that your website is well configured with GA4 (which involves adding a snippet of GA4 tracking code on every webpage of your site).
For e-commerce tracking, you will need to send specific events that GA4 recognizes. These events include ‘view_item’, ‘add_to_cart’, ‘remove_from_cart’, ‘begin_checkout’, ‘purchase’, among others, and you send these via the gtag function. For example, a view item could be sent with gtag(‘event’, ‘view_item’, { ‘items’: items}); where ‘items’ is an array containing information about the item viewed.
Each event has a designated structure of parameters to provide the data dimensions that Google Analytics will use for analysis. For example, the purchase event should include transaction information such as transaction ID, affiliation, value, tax, shipping, and others. You need to make sure this information is accurately captured and fed into the event parameter of the gtag function.
Remember, accurate ecommerce tracking relies on how well the events are fired at the correct user interaction points. Therefore, you’ll likely need to work closely with developers if you’re not comfortable manipulating the website code yourself.
You can find more detailed information in the GA4 documentation on Google’s developer website which provides the gtag.js events and parameters specific to Google Analytics 4.
-
Mia
Member23 June 2023 at 2:53 pm in reply to: Comparing GA4 and UA: Significant Increase in Direct TrafficThis issue may be due to the difference in the way GA4 and Universal Analytics (UA) qualify and classify traffic sources. GA4 is known to classify some traffic as direct that UA would have otherwise attributed to a different source. This could explain why there’s an increase in direct traffic, but a decrease in Google ads traffic. It’s likely not an error with your Google Tag Manager configuration, but a result of the changes in attribution models between GA4 and UA. To get a more precise understanding, you might want to check the ‘Source’ and the ‘Medium’ parameters under the ‘Traffic acquisition’ report in GA4, compare it with UA, and see if there’s significant discrepancies. If you still find it complicated, consider consulting with a digital analytics expert to better interpret these changes.
-
Mia
Member20 June 2023 at 8:32 am in reply to: Transferring UA Segments to GA4: How can I recreate these filter settings?You’re correct that GA4 is fundamentally different from Universal Analytics (UA). While UA is primarily session-based, GA4 is structured around event-based data, which changes how filtering and segmenting work. Unfortunately, as of now, GA4 does not have a direct substitute for UA’s segment feature that you use extensively. While it does have a feature known as ‘Audiences’, this doesn’t yet have the same level of flexibility and depth as UA’s segments especially when used in conjunction with APIs like in your case.
Your idea about exporting GA4 data into BigQuery is a good one. In fact, this is one of the direct benefits of GA4 over UA since it allows seamless integration with BigQuery. So, you’ll essentially be pulling your GA4 data directly into BigQuery, and then from there you can use FiveTran to move the data to RedShift. It seems like the segmentation and data manipulation operations could be then handled via SQL in RedShift (which aligns more closely with your strengths) rather than fighting with GA4’s limitations.
Given the current limitations of GA4, it’s difficult to envision achieving similar effectiveness with GA4’s built-in dashboard capabilities by themselves which are significantly different from UA. Therefore, it seems the BigQuery method would not only resolve your immediate problem, but it would provide greater flexibility and scalability moving forward in terms of dealing with raw event data. While it may seem a bit more complicated initially, the increased control over data might offset this.
-
Without being able to view the image you’ve attached or examine your code, it’s a little bit difficult to figure out exactly what might be going wrong. However, usually, when trying to send custom events to Google Analytics, you would use the
gtag.js
library to send event data. Once this is done, you’d set up custom reports within Google Analytics itself to view the data as you’ve described. It’s important to ensure that your custom definitions (in your case, ‘meal’ and ‘food’) are correctly set up and that your JavaScript is correctly sending the appropriate actions, labels, and values to generate the reports. Beyond that, the structure of reports in Google Analytics is generally not as flexible as what you are looking for. Therefore, you might need to download the data and manipulate it in a spreadsheet to achieve your desired format. If none of these suggestions help, there may be an issue within your code that would require a more detailed examination. -
Yes, it does indeed seem like there’s a discrepancy between the data you’re seeing on GA4’s Traffic Acquisition: Session Source report and data from BigQuery. It’s important to remember that GA4 and BigQuery can handle data differently, even though they’re essentially examining the same underlying datasets.
Getting a unique list of the concatenated session ID and pseudo user ID is the general way to identify distinct sessions. Still, there could be other factors, such as filtering options, impact of bot traffic, or even different time zone settings in BigQuery and the GA4 UI, which could cause a difference in the numbers.
Keep in mind too that GA4 uses a different data model to Universal Analytics, which can sometimes result in a different count of sessions. For instance, in GA4, a session can span across multiple days unlike in UA, which might result in fewer sessions in your BQ count for the same date range.
Ensuring that the date ranges are the same in both the UI and query, as well as using the right tables in BQ, are critical first steps. If the numbers still don’t match, I’d recommend checking if there are any discrepancies in how sessions are defined or counted in GA4 and BigQuery. Also, you should consider any differences in filters applied in GA4 and not in BQ or vice versa. Continued investigation would indeed be helpful here as these differences might skew your data analysis and business decisions.
-
Mia
Member25 May 2023 at 7:47 pm in reply to: Investigating Null Value in User_properties Column in GA4-Bigquery ExportSadly, the solution isn’t as straightforward as switching on your Google signals. Even though your Google signals is active, the data it captures doesn’t get exported to BigQuery. According to Google Analytics 4 documentation “Google Analytics 4 exports event data associated with anonymous cookies to BigQuery”. Here’s the [link](https://support.google.com/analytics/answer/9383630) to the documentation for more details. So, it seems we currently can’t pull demographic details like age and gender directly from BigQuery, which I know can be frustrating.
-
Mia
Member20 January 2023 at 9:18 pm in reply to: Enabling GA4 event tracking in apps-script: A step-by-step guideHey there, looks like you didn’t define the dataLayer because it’s commented out, and I also see the gtag library isn’t loaded. Hmmm, isn’t app script executed in Node? Not too sure gtag.js plays well with Node. If it does, I’m still thinking we’d have issues with various dimensions.
You could try the [measurement protocol](https://developers.google.com/analytics/devguides/collection/protocol/ga4) which I think is a better fit for the backend. There’s a [npm package](https://www.npmjs.com/package/ga4-mp) for it. Not sure if npm works in app script though.
Or give [server-side GTM](https://developers.google.com/tag-platform/tag-manager/server-side) a go. Its default publishing kind of implies an app script as well, but it might prefer its own app script instance rather than sharing it with yours. Keep trying and let’s crack this.