Search Query Mining for N-gram Analysis

Are you struggling to effectively mine and analyze the performance of specific phrases within your Google Ads search queries?

The challenge of understanding the impact of n-grams, those crucial phrases made up of multiple words, has become more daunting with the limitations of the traditional Google Ads scripts experience. Fortunately, there's a solution: a custom script designed to efficiently dissect the performance metrics of n-grams within your search queries. This script empowers advertisers to delve deeper into the clicks, impressions, cost, conversions, and their corresponding rates, enabling informed decision-making for optimizing ad groups and refining keyword strategies.

Before setting up the script, get familiar with the interface and navigation in Google ads.

1. Tools- The Tools tab provides direct links to various Google Ads account tools. Use these tools to monitor and make changes to your account, ads, ad groups, and keywords.

2. Bulk actions- It allows advertisers to modify multiple campaigns, ad groups, ads, or keywords in a single action, saving time and effort.

3. Scripts- It allows advertisers to automate and customize their bulk actions. This tool allows advertisers to create custom scripts that perform specific actions on their campaigns or accounts, such as updating bids, pausing underperforming ads, or adding new keywords.

4. + button- It allows advertisers to create new scripts. 

5. New Script- It allows advertisers to create a new script from scratch.

6. Add Script Name- It allows advertisers to name their scripts. 

7. Authorize-  It allows advertisers to grant permission for their script to access their Google Ads account.

8. Save- It allows advertisers to save their scripts after making changes or creating new ones.

9. Frequency- It allows advertisers to set how often a script runs.

10. Script - The given script name is Track Google Ads Spend Script.

11. Run- It allows advertisers to execute a script.

12. Logs- The log statement in Google Ads Script Tools is used to output messages to the script's log, helping advertisers track progress, troubleshoot issues, and create custom reports

Steps to add the search Query Mining for N-gram Analysis  Script in Google Ads:

Step- 1  Log in to your Google Ads account and navigate to the "Bulk Actions" tab.

Step- 2 Choose "Scripts" from the drop-down menu.

Step- 3 Click on the "Add" button to create a new script and give it a name. And Copy-paste the complete code into the script. And don't forget to update the following changes:

  • Set the startDate and endDate to define your date range.
  • Define your currencySymbol for proper formatting.
  • Modify campaignNameContains and campaignNameDoesNotContain to focus or exclude specific campaigns; optional based on filtering needs.
  • Set ignorePausedCampaigns and ignorePausedAdGroups to true for analyzing only active campaigns; optional if focusing solely on active campaigns.
  • Determine whether to consider negatives by setting checkNegatives to true or include all queries by setting it to false; optional, particularly if managing numerous negatives.
  • Provide the spreadsheetUrl for results storage; essential for saving query data.
  • Adjust minNGramLength and maxNGramLength to specify phrase length; optional, depending on the analysis needed.
  • Set clearSpreadsheet to true to overwrite existing data or false to append new results.

*  If the script times out, try running it multiple times with different campaignNameContains and campaignNameDoesNotContain settings to manage account size.

Step- 5 Click the "Authorize" button to authorize the script to access your account.

Step- 6 Click on the "Save" button.

Step- 7  Go back to the "Scripts" section and set the report frequency to be generated (Schedule the script weekly.)

Step- 8 Then click on Search Query Mining for N-gram Analysis Script.

Step- 9 Click the "Run" button to run the script. The script will take some time to run, depending on your account size.

Free website audit image

Get your free website Audit

Run an instant, highly detailed audit of your entire website. Identify over 200 common issues based on priority and importance, and find out how to fix them.

Check Now

Get your Script

Download your script

Oops! Something went wrong while submitting the form.