Learn business growth with Google Analytics 4 Forums Google Analytics 4 How can I replicate the Views metric from Looker-Studio in Google BigQuery?

  • How can I replicate the Views metric from Looker-Studio in Google BigQuery?

    Posted by Oliver on 29 October 2022 at 1:39 am

    So here’s the thing: I’m trying to reproduce a simple report from Looker-Studio in Google BigQuery. Right now, Looker-Studio is pulling the right data from Google Analytics 4.

    This Looker report shows a metric for view count, which you can check out right here: [Views metric in Looker-Studio]. What I’m hoping to see in Google BigQuery is something quite similar to this Looker-Studio report but that’s not quite happening yet.

    Here’s the query I’m working with in BigQuery: [insert code here].

    Despite my efforts, I’m not even getting close to the metric that’s shown in my Looker-Studio report. Just to give you an idea of the difference – while my Looker report is showing 40k views for the same date range, my query in BigQuery only shows a disappointing 13k views. Any clue on why this discrepancy might be happening?

    Robert replied 1 year, 5 months ago 3 Members · 2 Replies
  • 2 Replies
  • Gabriel

    Member
    29 December 2022 at 4:10 pm

    The discrepancy you’re experiencing between the Looker report and your Google BigQuery results could be due to a number of reasons. A likely factor could be how the ‘views’ are defined in each platform (Looker vs Google BigQuery). There may be differing criteria for defining a ‘view’, thus contributing to a difference in counts. For instance, unique views could be counted in one platform while total views, including multiple views by the same visitors, could be counted in the other. Also, there could be a mismatch in the date filtering between the platforms or the data may not have been updated synchronously on both platforms, causing an apparent discrepancy. It could also be a result of Looker using a different query or join-condition to compute the total views. It might be helpful to directly compare the Looker query with your BigQuery query to identify potential differences.

    Moreover, the data you’re querying with BigQuery could potentially be an unclean dataset, and might require some preprocessing to match the criteria applied in your Looker-Studio report. This could include removing duplicate entries, filtering out irrelevant data, or transforming the data into a suitable format. Finally, it could be a simple error in your BigQuery syntax leading to incorrect results being returned. A thorough review of the code and comparison with Looker’s query could help identify and fix the issue.

  • Robert

    Member
    16 May 2023 at 1:36 pm

    There could be a few reasons for this discrepancy. One explanation could be due to the different ways Looker and BigQuery handle data. Looker uses a model of data that may include transformations or aggregations that aren’t present in your BigQuery query.

    Another possibility is that your Looker report and BigQuery query aren’t using the exact same data range or have different filter parameters. The date range might be the same, but if Looker is accounting for time zones in a different way, it could yield different results.

    Also, ensure that you are considering events in Google Analytics that could influence the number of views, such as bot filtering or data sampling. Moreover, double-check that your query in BigQuery corresponds to the same actions taken when Looker extracts the data from Google Analytics.

    Lastly, it could be due to the freshness of the data. Google Analytics does take time for data ingestion in BigQuery. Differences in the timing of data accessibility in GA4 BigQuery export and Looker could account for the discrepancy.

    I’d advise reviewing the settings and transformations in Looker-Studio, adjusting your BigQuery query accordingly, and verifying the freshness of your data in Google BigQuery.

Log in to reply.