

Michael
Forum Replies Created
-
Michael
Member28 June 2023 at 10:46 am in reply to: Understanding the Occurrence of Multiple User Pseudo IDs with GA4 Session IDsSure, let me break this down as simply as I can. Google Analytics 4 (GA4) assigns each browsing session a unique ‘session ID’ and each user/visitor a ‘pseudo ID’. This helps it track how users are interacting with your website. Normally, each session ID should be associated with only one user (or pseudo ID), but you have discovered that some session IDs are tied to two different pseudo IDs. This is unusual and seems to suggest that two different users are somehow sharing the same browsing session.
Now, you tried testing this by deleting cookies partway through a session, but that wasn’t the cause. This is because GA4 keeps using the same pseudo_ID for a user even if cookies are deleted midway.
One plausible explanation is that GA4 sometimes assigns the same session ID to multiple browsing sessions that start at the exact same time. That’s why it is important to consider both the session and pseudo IDs when doing your analysis. The combination of the two helps you more accurately track unique browsing sessions.
-
Michael
Member18 June 2023 at 11:48 pm in reply to: Trouble with GA4 API's dateHour parameter in the query explorerGoogle Analytics 4 (GA4) API’s “dateHour” option is used to retrieve data down to the hour level. If you’re not getting any rows, it might be because the period you’ve selected doesn’t contain data at the hourly level. This may occur either because you selected a duration that is too short (i.e., an hour or less), or there is no data for that specific hour. Another possibility is if there’s an issue with how the query is configured. You might want to check if you have the correct parameters set (for instance, choosing the right property ID) and that the metrics you are querying are in the correct format. Remember that GA4 API needs a few hours to process realtime data, so if the timeframe is too close to the current time, data may not be available yet.
-
Michael
Member25 May 2023 at 5:08 pm in reply to: Alternative Methods for Importing Google Analytics Data into S3 BucketYes, you can use Google Analytics Reporting API to fetch data, then you can write a script (in Python for example) to export this data to a CSV or JSON file. Then, Amazon’s SDKs (like Boto3 for Python) can be used to upload these files to your S3 bucket.
-
Michael
Member7 May 2023 at 10:08 am in reply to: How can I send user properties in React-GA4 for Google Analytics?Sure! So, it looks like the piece you might be missing is how to use the
ReactGA.gtag
function to send user properties. This can be done directly whenever you want to track some custom analytics data, or you can save yourself some time and effort by setting it up in a utility function.To put it simply, the
gtag
function takes a string and an object of data to send back to Google Analytics. You can use something like"set", "user_properties"
for the string, and then put whatever data you want in the object. After that, it’s as simple as just calling the function whenever you want to send data.Here’s an example of tracking whether a user’s account is verified or not, and what their name is:
`jsx
import ReactGA from “react-ga4”;ReactGA.gtag(“set”, “user_properties”, {
account_verified: true,
});ReactGA.gtag(“set”, “user_properties”, {
name: “John”,
});
`
You can also create utility functions to simplify tracking your properties, like this:
`jsx
import ReactGA from “react-ga4”;export const setAccountProperty = (value: boolean) => {
ReactGA.gtag(“set”, “user_properties”, {
account_verified: value,
});
};export const setNameProperty = (value: string) => {
ReactGA.gtag(“set”, “user_properties”, {
name: value,
});
};
`
After setting up everything in your app, you can go to your Google Analytics dashboard and click on DebugView to check if everything’s working fine.
-
Michael
Member9 April 2023 at 2:12 am in reply to: GA4 events_ in BigQuery fragmented into multiple tablesIt’s possible that you’re running into an issue with how Google BigQuery automatically creates Partitions and Sharded tables. Every day, Google Analytics exports raw data to BigQuery and creates a new table, called a “shard.” These shards are part of the main ‘events_’ table, but they appear as separate tables when you view them in BigQuery. This could explain why your project appears to have been split into two tables even though they have the same name. If you are expecting single table, instead consider utilizing wildcard which enables you to query multiple tables at once. Remember to filter by the date, otherwise, costs could be high due to massive data. It’s always a good idea to review Google BigQuery’s documentation for common issues and best practices. If this doesn’t solve your issue, it might be worth reaching out to Google support for more in-depth troubleshooting.