Hub
Pricing About
WorkflowWorkflow

Google Analytics 4 and Loops

GoogleGoogle AnalyticsLoopRelease 5.1
AV
Draft Latest edits on 
Apr 17, 2024 11:34 AM
Drag & drop
Like
Download workflow
Workflow preview
This workflow showcases the capabilities of Google Analytics 4 in conjunction with the KNIME Analytics Platform. You can easily download and run the workflow directly in your KNIME installation. We recommend that you use the latest version of the KNIME Analytics Platform for optimal performance. This example demonstrates how to use loop nodes to extract data from the Google Analytics Query node. Suppose you have a large website with numerous landing pages. In that case, you may need to use loops to query data from Google Analytics for the following reasons: to avoid sampling, retrieve all data exceeding the 100,000 rows limit, and create periodic backups of your data. After mentioning the above, we can return to the workflow. As you may notice, the workflow nodes are currently not executed (indicated by the red light) because you need to authenticate through your Google account via the Google Authenticator node. Select the node and refer to its description on the left side panel for instructions on storing your credentials within the workflow. By default, the credentials are stored in memory, meaning you must authenticate again when you reset the node or close the workflow. Once authenticated, you can connect to the "Google Analytics Connector" node. We use the "Date&Time Configuration" nodes to select the desired time range for data extraction. The output table of the Create "Date&Time Range" node should display one column with all the dates within the selected range. Then we use the "Table Row To Variable Loop Start" to take each date row and set it as a flow variable in the Google Analytics Query node. Thus, we perform a separate query for each day within our time range. The "Loop End" node output is a table that contains all the information extracted in each iteration. This table is then passed to a "CSV Writer" node to back up our data as a CSV file. Additionally, we can connect it to a DB node to store the data in a data warehouse.

External resources

  • GA Sampling - Docs
  • GA4 Data Retention - Docs
  • GA4 Report pagination - Docs
Loading deploymentsLoading ad hoc jobs

Used extensions & nodes

Created with KNIME Analytics Platform version 5.1.0
  • Go to item
    KNIME Base nodesTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.1.0

    knime
  • Go to item
    KNIME Google ConnectorsTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.1.0

    knime
  • Go to item
    KNIME Quick FormsTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.1.0

    knime

Legal

By using or downloading the workflow, you agree to our terms and conditions.

KNIME
Open for Innovation

KNIME AG
Talacker 50
8001 Zurich, Switzerland
  • Software
  • Getting started
  • Documentation
  • Courses + Certification
  • Solutions
  • KNIME Hub
  • KNIME Forum
  • Blog
  • Events
  • Partner
  • Developers
  • KNIME Home
  • Careers
  • Contact us
Download KNIME Analytics Platform Read more about KNIME Business Hub
© 2025 KNIME AG. All rights reserved.
  • Trademarks
  • Imprint
  • Privacy
  • Terms & Conditions
  • Data Processing Agreement
  • Credits