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.
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.
Workflow
Google Analytics 4 and Loops
External resources
Used extensions & nodes
Created with KNIME Analytics Platform version 5.3.1
- Go to item
- Go to item
- Go to item
- Go to item
- Go to item
- Go to item
Legal
By using or downloading the workflow, you agree to our terms and conditions.