Learn business growth with Google Analytics 4 Forums Google Analytics 4 Retroactive Dimension Filling in GA4 using Page Data

  • Retroactive Dimension Filling in GA4 using Page Data

    Posted by Ella on 26 June 2023 at 11:34 pm

    So, we’ve been sending custom dimensions data in a particular way with GA4 ever since we switched up. Like, we didn’t actually set up the dimension names in custom_map, neither did we set the values separately, we did something like this:

    gtag('config', 'G-XXXX', {
      'custom_map': {'dimension1': '$val1', 'dimension2': '$val2', 'dimension3': '$val3'}
    });
    

    We just realized that we should’ve actually be doing this instead:

    gtag('config', 'G-XXXX', {
      'custom_map': {'dimension1': 'name1', 'dimension2': 'name2', 'dimension3': 'name3'},
      'name1': '$val1',
      'name2': '$val2',
      'name3': '$val3'
    });
    

    Also, we’ve been sending the language and module in the page URLs along with the page views. Now, the question is, have we lost all the data from back then? Is there like a workaround to recover those dimensions based on the event page URLs or the data we sent using the old code?

    Samuel replied 10 months, 2 weeks ago 3 Members · 2 Replies
  • 2 Replies
  • Ashton

    Member
    1 July 2023 at 1:11 pm

    Unfortunately, if you’ve been sending data with incorrect mapping on your custom dimensions, the raw data Google Analytics 4 (GA4) received before you corrected the issue is not retrievable in the correctly mapped format. GA4 only processes data as it’s received; it doesn’t reprocess data based on changes you make to your configuration down the line.

    In GA4, custom dimensions and metrics use the parameter name you provide in events. That’s why it’s necessary to set up ‘custom_map’ to map the parameter names of the events to the corresponding custom dimensions or metrics. If the data was sent in an incorrect format, GA4 couldn’t recognize it as the corresponding dimension or metric.

    The page URLs with the language and the module will still be accessible, but they wouldn’t be mapped to the named custom dimensions you’d set up now. You’ll only start getting the correctly reported data from the time the issue was fixed forward. There’s unfortunately no workaround to apply the new custom mapping retroactively. The best course of action is to correct the implementation as you have done and move forward with the correct data collection.

  • Samuel

    Member
    6 July 2023 at 8:18 am

    Unfortunately, because data in Google Analytics is processed at the time of collection and is not retroactive, you cannot recover the old dimensions data that was incorrectly configured. The incorrect setup would mean the data was likely not stored in the way you intended. However, any dimensions sent in the URLs during page views might be recoverable by analysing the URL data, which would require a manual extraction and analysis of the URL data. Going forward, it’s recommended to correct the setup as you have indicated to ensure the data is sent and stored correctly. You should also regularly check and validate your data to ensure it’s being captured correctly.

Log in to reply.