

James
Forum Replies Created
-
James
Member3 July 2023 at 12:00 pm in reply to: Obtaining Campaign Expenditure and Acquisition Metrics via Analytics APISure, I can provide a brief overview. In Google Analytics, “ga:acquisitionCampaign” is used as a dimension in reports to identify the name of your marketing campaigns. So, the values you are getting back are likely the names or identifiers of these campaigns. Regarding your main question, yes, you can get the details you are after using the Google Analytics API, but you might need to use some more dimensions or metrics. For example, you can use “ga:campaignCost” to get the associated costs, “ga:users” to count the total of users and “ga:newUsers” to count the new users. This information will allow you to understand whether a campaign is effective or not. Just note that some of these metrics depend on correctly configuring your campaigns or your tracking code.
-
James
Member28 June 2023 at 10:45 am in reply to: Access Denied: GA4 Property API Restriction – Reach Out to Google Analytics API Support for AssistanceThe error code 429 you’re encountering typically means that you’ve exceeded the rate limits for calling the API. Each Google API has its own restrictions and quotas on how often you can call it and how much data you can request. If you exceed these limits, Google will start to reject your requests with a 429 error until your usage drops back down below the limits. It may also means your request was denied, possibly because you might not have the necessary permissions to access the property in Google Analytics.
If you have checked and verified that your usage is within the API’s limits and you have the correct permissions, and you’re still getting this error, I would suggest reaching out to Google Analytics API Support team as recommended in the error message. They should be able to provide more specific insight into why you’re being denied access.
-
James
Member25 June 2023 at 3:08 am in reply to: Delayed visibility of GA4 events in real-time analyticsI’m glad to hear that you found a solution! Yes, it turns out that Google Analytics 4 (GA4) requires events to be part of a session for them to be logged. By sending a ‘session_start’ event with ‘ga_session_number’ and ‘ga_session_id’ properties, you’re creating a new session, and any events that occur during this session will be recorded properly. This is different from previous versions of Google Analytics and is something to keep in mind when implementing GA4.
-
James
Member14 March 2023 at 6:41 pm in reply to: Identifying Unique Records in BigQuery GA4 Events DataSure, let’s take a look at these fields together. As stated in the Google Analytics Documentation:
For the user fields, these provide unique information about the user who is associated with the event. For example, we have ‘user_id’ which is the user ID set via the setUserId API and ‘user_pseudo_id’, which is the pseudonymous ID (like a specific app instance ID) referencing the user. Another interesting one is the ‘user_first_touch_timestamp’, which tells you the exact time (down to microseconds) when the user first opened the app or visited the site.
Now, let’s dive right into those event fields. These provide unique information for each specific event. ‘event_date’ marks the exact date (in YYYYMMDD format) when the event was logged in the registered timezone of your app, while ‘event_timestamp’ indicates the precise time (in microseconds, UTC) when the event was logged on the client. The ‘event_name’ – as you probably guessed – just indicates the name of the event.
A noteworthy field is ‘event_value_in_usd’ where you can find out the event’s “value” parameter, converted into USD. And then, there’s ‘event_bundle_sequence_id’ – this is the sequential ID of the bundle these events were part of when they were uploaded. Finally, ‘event_server_timestamp_offset’ marks the timestamp offset between the actual collection time and the upload time in microseconds.
I hope this clarifies a lot about the different fields!
-
James
Member5 December 2022 at 8:51 pm in reply to: Possible new title: Investigating the issue with retrieving data from Google Analytics using PHP client libraryA null value from
$results->getRows()
implies that the Google Analytics API is returning an empty set of results for your query, which could be due to several reasons.First, make sure the account associated with the API key you are using has the necessary permissions to view the Google Analytics data. Second, check to ensure the parameters you are passing to the API (i.e., view ID, date range, metrics, etc.) are correct. An incorrect view ID or date range could also result in no data being returned.
Finally, it could be the case that there is indeed no data in your Google Analytics for the metrics and date range you are querying, specifically if it’s a new account or the tracking code hasn’t been correctly installed on your website.
Verify and review these points. If everything seems fine, you might have to delve deeper in the Google Analytics API and PHP Client Library implementation, or even better reach out to Google Support for further assistance.
-
James
Member5 October 2022 at 6:56 pm in reply to: Unlinked GA4 Dimensions: Language for Measurement Protocol Events Showing as (Not Set)Sure, let me simplify this for you. The Google Analytics 4 (GA4) measurement protocol is a bit stricter compared to its predecessor. Certain things like a user’s language code can’t be set through this protocol. That’s why it’s showing up as “not set”.
Right now, there isn’t a workaround to this within the confines of the measurement protocol. To get these kinds of data, you’d have to use the provided SDKs, not the direct measurement protocol.
Oh, and there’s this survey from Google where you can give them feedback about their measurement protocol. It could be a way to request them to loosen the restrictions a bit.
-
James
Member14 September 2022 at 6:11 pm in reply to: Troublesome Purchase Tracking via Google Tag Manager for GA4Hey! Can you show me the value of the {{DLV -order.items}} variable that’s in your GTM Debug Tag Assistant? That could help us troubleshoot. And guess what? You can use a custom JavaScipt variable to help map your datalayer for GA4, which would probably sort out that parameter issue you’re having!