Icon

Google Ads Query Explorer

<p>The main scope of this workflow is to provide a local data application to test<strong> Google Ads Custom Queries</strong> with your Google Ads data. Execute the "Custom Report" component and click the lens icon to open the view.</p><p>We are passing dynamically <em>custom queries</em> inside the component to the <em>Google Ads Query node</em> to demonstrate the capabilities of KNIME workflow building with the Google Ads Query node.</p><p>You can download and run the workflow in your local KNIME Analytics Platform. However, you need the latest version to do so.</p><p>It is also possible to deploy the workflow as a data application in KNIME Business Hub using the Secret Store feature and the Secrets Retriever node instead of the Google Authenticator.</p><p>Before you run the workflow, you need to authenticate actively. Using Google APIs with OAuth 2.0 "on your behalf" allows third-party applications to access and interact securely with your Google services, such as Google Sheets and Google Ads, enhancing functionality and user experience while maintaining security and control over your data.</p><p>Additionally, you will need:</p><ul><li><p>Google Ads Developer Token</p></li><li><p>Manager Customer Account ID</p></li><li><p>Account ID</p></li></ul><p>Please refer to the description of the Google Ads Connector to get more information about how to obtain these items.</p><p></p><p><strong>Workflow Step-by-Step</strong></p><ol><li><p><strong>String Configuration Nodes</strong></p><ul><li><p>Pass the necessary items to connect to the desired Google Ads account (Developer token, Manager Customer ID, Account ID). You need to input your own as the default of the nodes. It is possible to add more than one account by passing them comma-separated (<em>account1</em>, <em>account2</em>, etc.).</p></li></ul></li><li><p><strong>Unpack Account IDs</strong></p><ul><li><p>In the "Unpack Account Id" metanode, unpack the account IDs comma-separated into a table.</p></li></ul></li><li><p><strong>Custom Report Component</strong></p><ul><li><p>Right-click Component &gt; Open Component to access the "Custom Report" component.</p></li><li><p><strong>Iterate Over Account IDs</strong></p><ul><li><p>Use a Table Row to Flow Variable Loop to iterate over the Account IDs, fetching the data for each account and then concatenating the results.</p></li></ul></li><li><p><strong>Authenticate and Connect</strong></p><ul><li><p>Use the Google Authenticator for interactive authentication, providing the custom scope in the node comments. Then, connect to the Google Ads Account by providing the specified items in the Google Ads Connector node (using previously generated flow variables).</p></li></ul></li><li><p><strong>Google Ads Query Node</strong></p><ul><li><p>Use the custom query mode controlled by a flow variable. Use the Google Ads Query Builder (see the link in the External Resources section) to help build your custom query.</p></li></ul></li><li><p><strong>Example Query:</strong></p><p>"SELECT</p><p>segments.conversion_action,</p><p>segments.conversion_action_name,</p><p>segments.date,</p><p>segments.hour,</p><p>metrics.all_conversions,</p><p>metrics.all_conversions_value</p><p>FROM ad_group</p><p>WHERE</p><p>segments.date DURING LAST_MONTH"</p><p></p></li><li><p>You can copy-paste the above query into the data application.<br></p></li></ul></li><li><p><strong>Collect and Plot Data</strong></p><ul><li><p>Collect data from all iterations (all the Account IDs) and plot them in the table view.</p></li></ul></li><li><p><strong>Opening the View</strong></p></li></ol><ul><li><p>After execution, open the component's view by clicking the lens icon. You can copy-paste custom queries and, by clicking refresh, see the results fetched from your Google Ads account.</p></li></ul>

URL: Google Ads Query Builder https://developers.google.com/google-ads/api/fields/v17/overview_query_builder

Nodes

Extensions

Links