

Brooke
Forum Replies Created
-
Brooke
Member17 May 2023 at 3:58 am in reply to: Adding `host_name` using Measurement Protocol for GA4: Is it feasible?Hello! Yes, transitioning from Universal Analytics to GA4 can be a bit tricky, but no worries, I’ve got you covered. So, you’re wanting to pass along the ‘host_name’ parameter in GA4, correct? Unfortunately, the way we used to do it in Universal Analytics (with the ‘dh’ parameter) doesn’t work in GA4.
However, there are other ways for you to track the domain. In the GA4 schema, you can use the
fullPageUrl
dimension which gives you details like host-name, page path, and query string for the web pages visited. Check out this document for more info ‘API Dimensions & Metrics’.Another option is to use
page_location
which is one of the automatically collected events in GA4. Check out ‘Automatically collected events’ for more info.In case you choose the second option, remember to create a custom dimension with the exact name
page_location
. You can create this by logging into your Google Analytics account, going to the “Configure” menu in GA4, and following the prompts from there. If you need more help on this, take a peek at ‘Creating Custom Dimension and Metric’.I hope this helps you out! If you’ve got more queries, just let me know. All the best with your data adventures in GA4!
-
Brooke
Member12 May 2023 at 10:29 am in reply to: Troubleshooting Service Account Authentication for GA4 Analytics Data APIIt looks like your issue is related to the authentication scopes you’re using for your requests. The error message is saying that you don’t have the right permissions to do what you are trying to do.
So, you have to use either the ‘https://www.googleapis.com/auth/analytics.readonly’ or the ‘https://www.googleapis.com/auth/analytics’ scope when you authenticate.
Once you switch to either of these scopes, give it another shot and you should be good to go!
-
Brooke
Member24 April 2023 at 11:42 pm in reply to: Integrating GA4 Session Manual Term into a QueryThe term “Session Manual” isn’t used in your original query, and it seems like you’re trying to filter results based on specific values present in your UTM parameters. Regarding the attempt with “term”, please ensure that it is a valid event parameter in your provided dataset; otherwise, no data will be returned. If you’re sure “term” is a valid key and should have values, then it is possible that the query isn’t running as expected due to other portions of the WHERE clause.
For the part of the query that’s giving you the issue with a URL, it seems you’re trying to parse out the “utm_content” value from a URL or a set of URLs. It appears the confusion might be stemming from the fact that “URL” is called without being selected or joined from any table because it’s not included in the event_params. If URL is a field in your analytics event datatable, then you need to point to this field properly and it should function correctly. If it’s not a field, you will need to adjust the query to pull in the URLs in question from the correct location.
Without more specific details on your dataset and the precise role supposed to be played by “Session Manual”, it’s tricky to provide a more precise answer. I would recommend making sure that “term” and “URL” are valid inclusions in your WHERE and SELECT clauses.
-
Brooke
Member24 April 2023 at 4:08 am in reply to: Extracting Organic Search Terms from GA4 API: Is It Possible?Hey Marta! I understand how this might be a bit confusing. Essentially, when you link GSC (Google Search Console) to GA4 (Google Analytics 4), the data doesn’t merge in the traditional sense. Instead, it just makes GSC data visible in GA.
GSC data is usually pre-aggregated and not raw, and it’s heavily sampled. Due to this, the data can’t be totally matched on a granular level, and you might find slight inconsistencies even with the overall trend comparisons.
But here’s the catch: you can still make sense of the data from both sources together. Although this might not answer all your questions with pin-point accuracy, it can offer insightful analysis.
Just think of it like making a jigsaw puzzle: even though you might be missing a few pieces, you can still get a pretty good idea of the complete picture.
There’s actually a neat example of how you can use both data sources simultaneously over [here](https://practicaldatascience.co.uk/data-science/how-to-join-google-analytics-and-google-search-console-data). Check it out, it might help clarify things more. Good luck with your data dive!
-
Brooke
Member22 April 2023 at 10:44 pm in reply to: Implementing HTML Custom Attributes with Google Tag Manager for Tracking Button ClicksSure, you can handle this through Google Tag Manager. You’ll need to create a new GA4 event tag that tracks clicks on those buttons. You’ll probably want to use a click Element attribute that captures the unique data attribute of each button. This way, you can easily differentiate between the car model clicks in your analytics. So basically, GTM is your way forward.
-
Brooke
Member16 April 2023 at 10:28 pm in reply to: Understanding the Occurrence of Multiple User Pseudo IDs with GA4 Session IDsCertainly, I’d be happy to simplify.
The situation you’re experiencing is normal and has to do with how sessions are identified in Google Analytics 4. Essentially, a unique session in GA4 isn’t determined solely by the session ID, but rather by a combination of both the session ID, or
ga_session_id
, and theuser_pseudo_id
.So, you might run into a situation where it appears two different
user_pseudo_id
s are associated with the samega_session_id
. But remember, it’s the combo of these two that identifies a unique session, not just the session ID alone. Basically, GA4 is designed to work this way!If you want more info, you can check out an article I put together explaining how to identify and calculate sessions on the official Google Analytics Developers page. I sure hope this clears things up!
-
Brooke
Member17 March 2023 at 5:56 am in reply to: The issue of duplicate TotalUsers in GA4 Query ExplorerThis isn’t necessarily a glitch in GA4. Rather, it’s due to the way GA4 calculates and presents data based on different dimensions. When you select multiple dimensions, like appVersion and firstUserCampaignId, GA4 provides a count of totalUsers for every unique combination of those dimensions. This means if a user matches multiple combinations, they will be counted multiple times, hence the higher total. When you use just one dimension, the count will be more straightforward as the user matches fewer combinations. So the sum value of totalUsers does vary depending on the parameters you choose.
-
Brooke
Member3 March 2023 at 6:21 pm in reply to: How to Integrate Google Analytics 4 into a .pug TemplateThe problem seems to be with how Google Analytics is being integrated with your PUG file. If you’re getting a notification from Google Analytics saying it isn’t collecting any data, it’s possible that the tracking code might have been incorrectly installed or isn’t functioning properly. Sometimes, it can take up to 24 hours for data to begin appearing in Google Analytics after the tracking code has been installed. The code you’ve included looks fine, but you may want to double-check the G-********** part, which should represent your Google Analytics’ unique tracking ID. If the problem persists, consider getting further assistance to resolve the error in your coding.
-
Brooke
Member19 February 2023 at 4:01 pm in reply to: Trouble with GA4 visibility of events pushed through GaqHey!
Alright, let’s tackle this together. Firstly, it’s important to know that in GA4, the idea of ‘Category’, ‘Action’, and ‘Label’ doesn’t exist. Do take a look over here to get yourself acquainted with GA4: [GA4 Guide](https://support.google.com/analytics/answer/9744165#zippy=%2Cin-this-article). The metrics between GA4 and Universal Analytics do differ – here’s a comparison: [Comparing Metrics](https://support.google.com/analytics/answer/11986666?hl=en#zippy=%2Cin-this-article).
Right. Now let’s talk about creating custom events in GA4 – you’ll find this helpful: [GA4 Custom Events](https://support.google.com/analytics/answer/12229021?hl=en).
For creating custom events, you have two paths – GTAG and DataLayer. Depending on your familiarity, you could choose either, though I think GTAG might be a little more straightforward as it uses the gtag.js API to send info or events to Google Analytics API.
For GTAG, you’d need to follow these steps: [Set Up an Event for Website Apps](https://developers.google.com/analytics/devguides/collection/ga4/events?client_type=gtag). The function is pretty intuitive:
`html
gtag(‘event’, ”, {});
`
If you’d like to hold onto the Category, Action, and Label, I suggest you create Custom Dimensions for these three. You still get to keep your old database structure, and no added workloads for the developers. Do take a look here: [Custom Dimensions and Metrics](https://support.google.com/analytics/answer/10075209?hl=en). Please bear in mind, it takes a bit of time (about 48 hours) for GA4 API to recognise your custom dimensions.Alternatively, if you’d like to work with DataLayer, you’ll also need to interact with GTM or Google Tag Manager. Here’s more about it: [GTM](https://developers.google.com/analytics/devguides/collection/ga4/events?client_type=gtm).
That’s a starter. Hope it helps! Cheers.
-
Brooke
Member14 February 2023 at 5:43 am in reply to: Enabling Google Analytics integration on Cordova Android appGiven that you’re developing your app in Cordova, you’re going to need to make some additional adjustments since the guide you’re using is indeed more geared towards native apps. There are several Cordova plugins available that would allow you to track mobile activity using Google Analytics 4. One such plugin is the “cordova-plugin-google-analytics” which you can install into your project, and it will help you set up Google Analytics 4 for a Cordova-built app. Be aware though, these plugins require some degree of technical knowledge to set up properly, so make sure to read any available documentation or ask in the respective plugin’s community if you run into issues. If you continue to have issues, you may want to consider hiring a developer with experience in both Cordova and Google Analytics.