Learn business growth with Google Analytics 4 Forums Google Analytics 4 Can't get data from GA4 API prior to when an included Custom Definition was created

  • Can't get data from GA4 API prior to when an included Custom Definition was created

    Posted by Alexander on 26 June 2023 at 8:48 am

    Hey there,

    So, I’ve run across this peculiar thing when adding a custom dimension or metric. It seems that the data starts from when that most recent dimension/metric was recorded, despite having a beginning date set before that. It’s not from the registration point, but rather from when it was dated. Let me unravel this a bit more:

    • I’ve counted up Events by Date,
    • And also totaled up Event Counts by Date along with a brand new Dimension (created smack dab in the middle of the 8th).

    The starting date for both was May 1st. Yet, the second only displayed data from the 8th onward. Interestingly enough, total Event Counts for the 8th and 9th were a match in both cases.

    This makes it clear that our second Event Count descriptor isn’t just starting from when the dimension was recorded (or else the 8th’s Event Count would have been lower). No, it’s more like it resets the start date to coincide with the date when the new dimension was logged.

    I road tested this in both the GA4 Magic Reports and SyncWith addons for Google Spreadsheets, with identical results all round.

    So, this got me wondering. Is this just how it’s meant to go? Or if not, any solutions spring to mind? Any thoughts or tips would be much appreciated.


    Gabriel replied 11 months, 2 weeks ago 3 Members · 2 Replies
  • 2 Replies
  • Jackson

    5 July 2023 at 1:59 am

    It seems like you’re encountering a fairly common issue when dealing with custom dimensions or metrics in platforms like Google Analytics 4. When you create a new custom dimension or metric, the data collection for that specific dimension/metric starts from the point it was created, it won’t retroactively pull data from before that creation date.

    In your case, it appears that even though your starting date for both evaluations started from May 1st, the new dimension (created on the 8th) only displayed data from its creation date forwards.

    That’s why your second Event Count descriptor matches the data for the 8th and 9th in both scenarios – it started collecting data from the same point in time. It’s more or less behaving as it should be, restricting the data from the point of creation of the dimension or metric.

    Unfortunately, there’s not a direct solution aside from planning your dimensions and metrics ahead of time. If retroactive data for the new dimension is crucial, you might need to look into exporting and reprocessing your raw data, depending on your data architecture and resources.

  • Gabriel

    7 July 2023 at 1:43 pm

    It sounds like the situation you’re experiencing is likely due to the nature of how custom dimensions and metrics work. When you create a new dimension or metric, it doesn’t retroactively apply to pre-existing data. That’s because, when data is sent to Google Analytics, it includes the dimensions and metrics at that point in time. Any dimension or metric created subsequently wouldn’t apply to this data. That’s likely why you’re seeing data from the 8th onwards, which is when the new dimension was created. It’s a standard behavior rather than an anomaly. As for the identical results in both GA4 Magic Reports and SyncWith addons, they fetch data from Google Analytics using the same principles, so this is also expected. To have insights from a certain period with a custom dimension or metric, you should create and apply this dimension/metric at the start of that period.

Log in to reply.