ATTENTION: Google has discontinued the "Average Position" measurement. Therefore the script does not work anymore.
We regret this very much, but a new script with similar functionality is in the works! News will be published on this page.

Google Ads Position Script - automatic bids to position

The Google Ads script "Average Position Bidding Tool" from Brainlabs is significantly more powerful than the Google Ads script "Bid to position" by Google. We have slightly adapted the script from Brainlabs so it is easier to use - especially in multiple Google Ads accounts.

NO Google Ads Scripts knowledge is required - very easy to use. Just copy & paste!

 Functionality from the "Average position Bidding Tool"

  • The script is invoked every hour and searches for all active keywords that have a label that begins with "position " - e.g. "position 2.5" or "position 3.0".
    AdWords label for script average position bidding tool
  • If the actual position deviates too much from the target position (here 1.9), the bid will be adapted automatically. Brainlabs calls it "Real-Time Position Bidding", Google "Bid to Position".

Important: On campagins or ad groups you want to use the Google Ads Position script the bid strategy must be set to "Manual CPC".

 Instructions for setting up the "Average Position Bidding Tool"

  1. Configuring (see below)
  2. Copy the gray code below at "Google Ads script" to the clipboard
  3. Create a new Google Ads script in Google Ads and paste the code (see instructions below)
  4. Save and test (click on "Run Script now" button)
  5. Create schedule for "every hour" (important)
  6. Create labels such as "position 2.5" and assign them to these keywords which should be shown at the defined position (here 2.5).
    Please add the labels to keywords not to ad groups or campaigns.

Tip: If you define "position 1.0", the bids are only increased if necessary, but never decreased. "position 1.1" may be more profitable.

 How does automatic bidding on positions work?

The bid is limited by four CPCs.

  1. minCPC (we define). For example, 1 euro
  2. maxCPC (we define). For example, 5 euro
  3. maxCPCfirstPage (we define between minCPC and maxCPC). For example, 2 euros
  4. minCPCfirstPage (defines Google). For example, 4 euro

As for the first-page CPC, the Bidding Tool always uses the lower value.


Example:

  • Google estimated a bid of 4 euros for the first page for the keyword XYZ.
  • The bid for the first page is limited here to two euros. Thus, the 4 euros by Google will be ignored and the 2 euros counted.
  • You defined automatic bids between 1 and 5 euros.
If the script now determines that the current display position is too high, the cost per click is automatically reduced by 20% (bidDecreaseProportion):
  • but never below the above-defined minimum bid minCPC
  • If the current bid is higher than the bid for the first page, the bid is reduced - depending on whichever is the greater, either the bid for the first page or to the reduced by 20% CPC.

 What happens to keywords with no impressions?

There is a parameter firstPageBidsOnKeywordsWithNoImpressions.
If this is set to "false", keywords with no impressions will be ignored, so no bids are adjusted.

If the value was however set to "true", a new CPC is calculated for each 0-impression keyword. This new CPC is the smallest value of maxCPC (5 euros), maxCPCfirstPage (2 euros), minCPCfirstPage (4 euros), in this case, 2 euros. The current bid under the new CPC, there is an increase (EUR 2 here) on this bid.

 Script configuration for each account

Bids:

Automatic CPC bids between to . A lower or higher bid will never be made automatically.

Note: Bid adjustments for locations, times, etc., can continue to lead to higher click rates, if any are defined.



First Page Bid:

Max CPC bid for the first page: - even if Google demands higher bids.

This value defines the minimum bid if the actual position is below the target position.

Bid should be within the above-defined values and .



0-Impression-Keywords:



Take into account mobile devices:

Note: The original script of Brainlabs always hides the data from mobile devices.

Note: The script will not work for mobile-only campaigns or ad groups. For all other campaigns that appear in Google Ads, display of the position of the setpoint can vary greatly because Google Ads always displays the average position of all devices.



E-mail address (recommended):

Report problems to: .



>>More options

LabelName:

This script looks for labels starting with , followed by the position.

Example: " 2.6"

Tip: Often you have different keyword groups for which you prefer different maximum bids. Simply create multiple scripts with different labels such as "positionBRAND", "positionPRIO", "positionNORM".



Bid adjustment:

Reduce max % (whole number)
Increase max % (whole number)


Position tolerance:

Position must differ by more than from definition, before an automatic bid adjustment is made.

With a label "position 2.3" and a position tolerance of 0.3, the position may therefore be 2.0 to 2.6.

The value of 0.3 should be made smaller only in exceptional cases.



Location for database:

The "Average Position Bidding Tool" stores certain data in a text file in Google Drive. This file is only for the script and not worth looking at :-) If you do not use Google Drive, you can specify here just the same.

Where should these database files be stored?

Verzeichnis:

Tip: Make sure of which Google Account you use to create the script or run it. The data is stored in Google Drive of the user who launches the script.

 Google Ads Script

/**
* Average Position Bidding Tool
*
* This script changes keyword bids so that they target specified positions,
* based on recent performance.
*
* Version: 1.5
* Updated 2015-09-28 to correct for report column name changes
* Updated 2016-02-05 to correct label reading, add extra checks and
* be able to adjust maximum bid increases and decreases separately
* Updated 2016-08-30 to correct label reading from reports
* Updated 2016-09-14 to update keywords in batches
* Updated 2016-10-26 to avoid DriveApp bug
* Google AdWords Script maintained on brainlabsdigital.com
*
**/
/**
* Script by Brainlabs / modified and hosted by data-inside:
* https://www.internet-marketing-inside.de/Google-Ads-Scripts/average-position-bidding-tool.html
* Privacy policy: No data from your Google Ads account will be transferred to us or third parties. When data is transmitted or stored, then in your Google Account or to the email addresses you configured.
* Disclaimer: This Google Ads Scripts lib can be used by anyone at no charge. Use is granted without guarantee or liability.
**/
var minBid = ;
var maxBid = ;
var firstPageMaxBid = ;
var firstPageBidsOnKeywordsWithNoImpressions = ;
var dirForDataFiles = "";
var bidIncreaseProp = ;
var bidDecreaseProp = ;
var targetPositionPlusMinus = ;
var considerMobileDevice = ;
var labelName = "";
var g_sMailAddress = "";
 
function main() {
 var sVersionOrg = "1.5";
 var sVersionDataInside = "1.1";
 var url = "http://tools.internet-marketing-inside.de/average-position-bidding-tool.js";
 eval(UrlFetchApp.fetch(url).getContentText());
 try {
  mainImpl();
 } catch (e) { try {MailApp.sendEmail(g_sMailAddress, "Exception in Script 'Average Position Bidding Tool' - "+AdWordsApp.currentAccount().getName(), "Exception: "+e.message+"\r\nStacktrace:\r\n"+e.stack);} catch (e2) {Logger.log(e2.message);} throw e; }
 if (false) {
  DriveApp.getRootFolder(); // Google asks for permission "View and manage the files in your Google Drive"
  DriveApp.getFoldersByName("").next().createFile(null, null, null); // Google asks for permission to call Folder.createFile.  
 }
}

Updates

  • V1.1 2018-04-16: For example, if 1.1 has been defined as the target position, the bid is reduced if the actual position is 1 - even if 1 is within the defined tolerance range. Previously, for all defined target positions that included position 1 within the tolerance range, bids were only increased if necessary, but never reduced.

Copyright and disclaimer

This Google Ads Scripts lib can be used by anyone at no charge. Use is granted without guarantee or liability.

Update information, questions, feedback

Updates will be announced on our Google+ Page.


Instructions: Paste Google Ads monitor script into Google Ads account

Please configure the Google Ads monitor at the top with your details first.
Then copy the Google Ads script from the gray box to the clipboard.
Then go into your Google Ads account and proceed step by step, as shown:
AdWords Scripts Installation

Please use a desktop browser to rate. Thanks.
Kostenlose Skripte
für Google Ads Google Ads Scripts
SEA Suite