Search our Knowledge Base
Search

Google Ads Connection Tool



To integrate Google Ads data directly into your Rank Ranger account, an authorization script needs to be generated and added to the Google Ads account. Two options are available: Daily Ads updates and Historical Ads for either Campaign or Demographics data import and storage in your Rank Ranger account for use in reports and graphs.

Each Rank Ranger campaign can be integrated with one Google Ads account. Google Ads campaigns can be filtered in the report and metric graph settings.

Note: Not all campaign types are supported by the Google Ads Script API. Campaign types such as Discover Search and Smart Shopping are not supported by the script as per Google Ads official confirmation from Google Ads Script Team.
 
Google Ads Connection Tool
 

Generate Campaign Daily Google Ads Data Script

             
 
Google Ads Connection Tool
The Google Ads connection script generation tool is located in Reports & Tools > Paid Search > Google Ads

Google Ads Daily Updates

*Notes:
In order to exclude Paused Google Ads campaigns change the line of code from .withCondition('Status != REMOVED') to .withCondition('Status = ENABLED')
In order to include 0 impressions remove the line .withCondition("Impressions > 0")
Each change should be applied after both lines in order to include both Shopping campaigns and other campaigns:
  • var campaigns = AdsApp.campaigns()
  • var shoppingCampaigns = AdsApp.shoppingCampaigns()

  • Select a Campaign
  • Select the Daily option to enable daily updates of Google Ads data to Rank Ranger
  • Click the Generate button
  • Copy the Code
  • Proceed to the Authorize Google Ads Integration instructions below


Generate Campaign Historical Google Ads Data Script

             
 
Get Historical Ads Data for Reporting Trends

Integrate Historical Google Ads data

*Notes:
In order to exclude Paused Google Ads campaigns change the line of code from .withCondition('Status != REMOVED') to .withCondition('Status = ENABLED')
In order to include 0 impressions remove the line .withCondition("Impressions > 0")
Each change should be applied after both lines in order to include both Shopping campaigns and other campaigns:
  • var campaigns = AdsApp.campaigns()
  • var shoppingCampaigns = AdsApp.shoppingCampaigns()
  • Select a Campaign
  • Select the Historical option for storage of Google Ads data
  • Select the Date Range for the data that you want to be imported to Rank Ranger
  • Click the Generate button
  • Copy the Code
  • Proceed to the Authorize Google Ads Integration instructions below
If you receive an error message indicating that your script exceeded the maximum execution time, please try again with a date range of 1 year or less. Google places limitations on this service, so the time range for which you may retrieve data will depend upon the amount of data (e.g., number of campaigns, length of time).

Generate Demographics Daily/Historical Google Ads Data Script

             
 
Get Demographics Daily or Historical Ads Data for Reporting Trends

Select Demographics for the Data Type (2) and the rest of the steps are the same as mentioned in the previous sections for either Daily or Historical data.
Integrate Demographics Google Ads data

Authorize Google Ads Integration

             
 
Google Ads Tools
Access your Google Ads account and click the TOOLS icon and then select Scripts in the BULK ACTIONS section. 

Note: If you have more than one account, select the related account from the available drop-down list on the left side, between the Google Ads logo and Bulk Action title.

Google Ads Tools Scripts

Add Script
Click the +Add script button 

add script

Authorize
Click the AUTHORIZE link in the yellow bar 

Authorize script

Select a Google Account
This must be a Google account that has administrative permissions for Google Ads

select Google account

Click the Allow button

allow access



Add Script

This example is for Historical update which is a one-time script.

add Google Ads script
  • Name the script, we recommend using a name that is descriptive of the data to help anyone working in the Google Ads account understand what the script is for.
  • Paste the Rank Ranger script code into the box, overwriting their default content 
  • Click the SAVE link
  • Click Scripts

Additional Steps for Daily Updates
If this script is for DAILY updates, locate the new script in the list and click the pencil icon to edit it. 

script frequency
  • Set frequency to Daily and select a time and click Save
  • Click AUTHORIZE
  • Select the Google Account

    choose account

  • Click the Allow button

    Authorize script


Script Status
Click the SCRIPT HISTORY tab to view the scripts that have been processed (i.e., Status will be "Finished successfully" and they will display data in the Results column)             
Google Ads Scripts

Scripts Processed Today
Select Today in the calendar to determine if your new script has been processed (it usually is not ready instantly, you may need to wait an hour).
             
scripts today

Script Action Options
If your new script isn't displayed in the Script History for today within an hour of creating it, you can click back to the Scripts screen and in the Actions column, select the Run option. 

Script action options



Google Ads Metrics


Ads performance data directly from the Google Ads API* can be viewed in the Google Ads Campaigns report, Insight GraphsSingle Metric Widgets, which can be displayed in branded Marketing Dashboards, Client Dashboards, and scheduled PDF Reports.
* Refer to integration instructions

Metric Options
  • Avg CPC: The average cost per click
  • Avg CPM: The average cost per thousand
  • Avg CPV: The average cost per view
  • Clicks: The number of times a link was clicked
  • Conversions: The number of conversions for all conversion actions that you have opted into optimization.
  • Conversion Rate: The number of conversions divided by total clicks that can be tracked to conversions.
  • Cost: The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period.
  • CTR: The number of clicks your ad receives (Clicks) divided by the number of times your ad is shown (Impressions).
  • Impressions: Count of how often your ad has appeared on a search results page or website on the Google Network.
  • Search Absolute Top Impression Share: The impressions you've received in the absolute top location (the very first ad above the organic search results) divided by the estimated number of impressions you were eligible to receive in the top location.
  • Search Budget Lost Impression Share: The estimated percent of times that your ad was eligible to show on the Search Network but didn't because your budget was too low.
  • Search Impression Share: The impressions you've received on the Search Network divided by the estimated number of impressions you were eligible to receive.
  • Search Rank Lost Impression Share: The estimated percentage of impressions on the Search Network that your ads didn't receive due to poor Ad Rank.
  • Search Top Impression Share: The impressions you've received in the top location (anywhere above the organic search results) compared to the estimated number of impressions you were eligible to receive in the top location.
  • Views: The number of times your ads were viewed.

    Learn more... about Google Ads metrics.

Available Third Party Integrations


Third Party data can be used to create individual or blended metrics Insight Graphs and Single Metric Widgets and is also available in a wide variety of reports.
Authorize these Connections for comprehensive marketing reports and graphs: See a list of the available Third Party connections in the below "Related" section.


Get the ultimate SEO tools with the Rank Ranger Software
Learn More About Rank Ranger