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.
In this example, learn to use "Dimension Filter" in the Google Analytics Query node to save quota consumption while using the API.
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 created two branches using the Google Analytics Query node. The top branch extracts results for dimensions: page path, date, event name, browser, and screen resolution. The metric is total users. The bottom branch execute the same query, but excluding the Home page and small screens and keeping only Chrome users.
After executing the node, the top branch returns more rows since no filter was applied. We then apply filters using KNIME nodes (inside the metanode "Filters") and use the "Table Difference Finder" node to show that the two results are equal.
When using the Google Analytics Query node to extract data, you can view the amount of quota consumed by each request by selecting "Output property quotas as flow variables" in the configuration window. This allows you to see the quota consumed for each request, with or without dimension filters.
Usually, extracting fewer rows reduces quota usage, but complex filters use up the quota. You need to test different combinations of data extraction to find the best one in terms of quota consumption.
URL: GA4 Filter Expression - Docs https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/FilterExpression?hl=en
URL: Managing quota for Google Analytics Data API https://developers.google.com/analytics/blog/2023/data-api-quota-management?hl=en
URL: GA4 Quotas - Docs https://developers.google.com/analytics/devguides/reporting/data/v1/quotas?hl=en#property_tokens_quota
To use this workflow in KNIME, download it from the below URL and open it in KNIME:
Download WorkflowDeploy, schedule, execute, and monitor your KNIME workflows locally, in the cloud or on-premises – with our brand new NodePit Runner.
Try NodePit Runner!Do you have feedback, questions, comments about NodePit, want to support this platform, or want your own nodes or workflows listed here as well? Do you think, the search results could be improved or something is missing? Then please get in touch! Alternatively, you can send us an email to mail@nodepit.com, follow @NodePit on Twitter or botsin.space/@nodepit on Mastodon.
Please note that this is only about NodePit. We do not provide general support for KNIME — please use the KNIME forums instead.