System Installation Instructions

To set up all the scripts for the first time, managers should copy the code in the MasterScript file contained in each AdWords account within the same MCC account and schedule it to run hourly. Thus, the master script will run every hour. It will read the Dashboard spreadsheet and execute the scripts that meet the pre-set schedule.

 

Do not run the MasterScript on the MCC level! The MasterScript is the .txt file. The code in this script goes to each account and this MasterScript must be scheduled to run hourly from each AdWords account (and the MCC Adwords account as well if MCC-level scripts are enabled). All the .js Scripts’ files must be placed on the Google Drive associated with the person authorizing/scheduling the MasterScript to run. The .js scripts’ files must be placed in the “Scripts” (Case sensitive) folder on the Google Drive. The person who schedules the MasterScript to run must have the access to edit the Dashboard Spreadsheet. It does not matter if the person is the account owner or not.

 

The Dashboard supplies the controls for each script’s schedule. Input target values for each script and change them as needed.


PLEASE NOTE:
You can change the column names but do not change their positions!

(click the image below to see HandsFreePPC system dashboard demo)

AdwordsScriptsDashboard-1024x484

Column “Results Spreadsheet”

 

Each script will auto create a spreadsheet for the account and store its URL in that cell for future reference. are where you must enter the scheduling info. We set up some default schedules for your convenience, but you can change them at anytime.

 

If you see the following scheduling in the Dashboard it means:

 

  1. Keyword Tokenizer -> Weekly : 5 AM : Monday

This means this script will run only on Monday at 5 A.M. So if you run the dashboard script now, this script will not run. The master script will move to the next line in the spreadsheet, which is:

 

  1. Keyword Bidding – > Daily : 4 A.M.

This script will run daily at 4 AM. So it will not run at the present time. The master script will move to the next script which is:

 

  1. Hour and Day Bidding -> Hourly

This script will run as soon as there is a trigger from an Adwords account. Thus, it will run every time you run the dashboard script. So, be careful not to run the dashboard script twice in one hour because this will cause the bids to be adjusted twice in the same hour!

 

If you enable the scripts, they will run only as per the schedule. So, for testing purposes, you can easily turn off the scheduling from the spreadsheet by changing column G value to N. Doing that would mean the script will run as per each MCC account schedule (hourly, for example) and not as per the spreadsheet schedule.

 

Note: all the scripts will only run from one script generated from the Dashboard script (Master Script). To turn off the scripts simply change the Scripts Schedule (column H) to ‘Off.’ Column ‘G’ should also be set to ‘Y’ value.

 

Each individual script input can be defined at the Adwords account level. Therefore, add the account name in the first column (A) of all the input sheets for each row containing values. Be sure to provide relevant inputs for the account. If the account name is not found, the script will not run for that account!

 

 

FINAL CONFIGURATION STEP

 

Attached is the sample template sheet for an Hour and Day bidding script. It must be placed on the Google Drive associated with the MCC account. When the Hour and Day Bidding Script runs for the first time in an account, the script will create a copy of this sheet for the corresponding account, and then add its URL to the Dashboard Spreadsheet against the account name for future reference.

 

Filling values into the Hour and Day spreadsheet template is not necessary. The values will be picked up from the Dashboard and updated in the Spreadsheet for the account.

 

The Hour and Day script needs 2 inputs -> Clicks Threshold and Target CPA.The template spreadsheet has these in cells B1 and B2 correspondingly. For each account, you can specify these values separately as Dashboard inputs.

 

 

 

“Automated Campaigns Input” – Column “Update Ad Parameters?”

 

To read more about Ad Parameters please see below:

http://adwordsapi.blogspot.in/2009/11/more-dynamic-ads-with-ad-parameters.html

 

 

0 : Do not use Ad Params – if you do not want to use ad parameters in your text ads, simply put 0 in the cell.

1 : Use Ad Params – use ad parameters (placeholders) in your text ads. If you have dynamic params in text ads like product price, quantity you can use this feature.

 

Therefore, in this example, the template for the CSV feed:

thisTemplate.param1 = “[Inventory Count]”;

 

Therefore, if you want the script to update count left in the ads as per the change in feed, then this feature will be handy.
Description1 or Desctipion2 like:

 

Only {param1:1} left!
Would mean:

 

Only 33 left! (for row 2)

Only 21 left! (for row 3)

Only 1 left! (for row 4)

Only 12 left! (for row 5)

 

In addition, these will keep on changing as and when the values change. The params can have only numeric values. Adwords allows specifying two params in an ad and this script supports all of them.

 

The script creates a campaign from external Excel or CSV file/feed. Here’s how works:

 

Let us take row 2 of the Sample Feed below:

 

Subdivision City Inventory Count Bid
Carilion Greenville 33 $1.10
The Cliffs at Mountain Park Travelers Rest 21 $1.25
Willow Creek Greer 1 $3.21
Dove Tree Greenville 12 $5.07

 

 

  1. Ad Group Name

 

The ad group name template says:

 

thisTemplate.ad groupsName = “[Subdivision] [City]”;

 

So, the ad group name for row 2 will be – Carilion Greenville

 

 

  1. Max CPC

 

This is keyword max cpc and not ad group max cpc.

 

thisTemplate.maxCpc = 0.25;

 

This means for all the keywords max cpc would be 0.25. If you have a column in the feed which can be used to derive the max cpc like column “Bid” in the sample feed then you can keep the template as:

 

thisTemplate.maxCpc =[Bid];

 

 

  1. Keywords:

 

thisTemplate.exactKeywordsTemplate = new Array (‘[Subdivision] [City]’, ‘Homes [City]’);

 

thisTemplate.bmmKeywordsTemplate = new Array (‘[City] [Subdivision]’); //Broad Match modifier

 

thisTemplate.phraseKeywordsTemplate = new Array (‘homes for sale’, ‘[Subdivision] [City] Homes’);

 

thisTemplate.broadKeywordsTemplate = new Array (‘[Subdivision] [City]’, ‘Homes [City]’);

 

Therefore, we have 4 arrays, one for each: Exact Match, Broad Match Modifier, Phrase Match and Broad Match Keywords.

 

Taking example of Exact Match for row 2:

Script will create three exact match keywords:

 

[carilion greenville] & [homes greenville]

 

Taking the example of Broad Match Modifier for row 2:

Script will create one bmm keywords:

 

+greenville +carilion

 

…and so on.

 

If you want to create only phrase match keywords in every ad groups – do not delete all other three keywords’ arrays, keep them blank like:

 

thisTemplate.exactKeywordsTemplate = new Array (‘[Subdivision] [City]’, ‘Homes [City]’);

 

thisTemplate.bmmKeywordsTemplate = new Array (); //Broad Match modifier

 

thisTemplate.phraseKeywordsTemplate = new Array ();

 

thisTemplate.broadKeywordsTemplate = new Array ();

 

This sample template file illustrates the above example:

 

 

function setupTemplate() {

this.main = function() {

 

var templates = new Object();

templates.templateArray = new Array();

 

/************************************************* Template 1 starts ********************************************************/

var template = new Object();

// Campaign stuff

template.campaignName = “Test Campaign 1”;

 

template.ad groupsName = “[Subdivision] [City]”; //This defines the ad group name

template.maxCpc = 0.25; //Keyword Max CPC – Can come from feed as well (Ex. [Bid])

 

template.exactKeywordsTemplate = new Array (‘[Subdivision] [City]’, ‘Homes [City]’);

template.phraseKeywordsTemplate = new Array ();

template.broadKeywordsTemplate = new Array ();

template.bmmKeywordsTemplate = new Array (); //Broad Match modifier

 

template.param1 = “[Price]”;

template.param2 = “[Inventory Count]”;

 

template.adTemplates = new Array();

 

//{param1:1} is the dynamic paramter. This will be updated on daily basis. This can be used in description1 or description2

//If you do not wish to use param simply remove it

 

//Ad 1

var adTemplate = new Object();

adTemplate.headline = “[Subdivision] Homes for Sale”;

adTemplate.description1 = “View {param2:1} for sale in [Subdivision]”;

adTemplate.description2 = “[City] Real Estate”;

adTemplate.displayUrl = “Example.com/[City]”;

adTemplate.destinationUrl = “http://example.com/[Subdivision]-[City]”;

adTemplate.isMobilePreferred = false;   // Can be true or false

template.adTemplates.push(adTemplate);

 

//Ad 2

var adTemplate = new Object();

adTemplate.headline = “[Subdivision] Homes for Sale”;

adTemplate.description1 = “{param2:1} properties in [City]”;

adTemplate.description2 = “Prices starting from ${param1:1}”;

adTemplate.displayUrl = “Example.com/[City]”;

adTemplate.destinationUrl = “http://example.com/[Subdivision]-[City]”;

adTemplate.isMobilePreferred = false;   // Can be true or false

template.adTemplates.push(adTemplate);

 

//Default Ad (Without Dynamic Replacement) This template will be used only when none of the templates above fit size limts after dynamic replacement

template.defaultHeadline = “Homes for sale”;

template.defaultDescription1 = “Luxury Villas in your city.”;

template.defaultDescription2 = “Call now for exciting prices.”;

template.defaultDisplayUrl = “example.com/”;

template.defaultDestinationUrl = “http://www.example.com/”;

template.isMobilePreferred = false;   // Can be true or false

 

templates.templateArray.push(template);

/******************************************************** Template 1 ends ***************************************************/

 

/************************************************* Template 2 starts ********************************************************/

var template = new Object();

// Campaign stuff

template.campaignName = “Test Campaign 2”;

 

template.ad groupsName = “[Subdivision] [City]”; //This defines the ad group name

template.maxCpc = 0.25; //Keyword Max CPC – Can come from feed as well (Ex. [Bid])

 

template.exactKeywordsTemplate = new Array ();

template.phraseKeywordsTemplate = new Array (‘[Subdivision] [City]’, ‘Homes [City]’);

template.broadKeywordsTemplate = new Array ();

template.bmmKeywordsTemplate = new Array (); //Broad Match modifier

 

template.param1 = “[Price]”;

template.param2 = “[Inventory Count]”;

 

template.adTemplates = new Array();

 

//{param1:1} is the dynamic paramter. This will be updated on daily basis. This can be used in description1 or description2

//If you do not wish to use param simply remove it

 

//Ad 1

var adTemplate = new Object();

adTemplate.headline = “[Subdivision] Homes for Sale”;

adTemplate.description1 = “View {param2:1} for sale in [Subdivision]”;

adTemplate.description2 = “[City] Real Estate”;

adTemplate.displayUrl = “Example.com/[City]”;

adTemplate.destinationUrl = “http://example.com/[Subdivision]-[City]”;

adTemplate.isMobilePreferred = false;   // Can be true or false

template.adTemplates.push(adTemplate);

 

//Ad 2

var adTemplate = new Object();

adTemplate.headline = “[Subdivision] Homes for Sale”;

adTemplate.description1 = “{param2:1} properties in [City]”;

adTemplate.description2 = “Prices starting from ${param1:1}”;

adTemplate.displayUrl = “Example.com/[City]”;

adTemplate.destinationUrl = “http://example.com/[Subdivision]-[City]”;

adTemplate.isMobilePreferred = false;   // Can be true or false

template.adTemplates.push(adTemplate);

 

//Default Ad (Without Dynamic Replacement) This template will be used only when none of the templates above fit size limits after dynamic replacement

template.defaultHeadline = “Homes for sale”;

template.defaultDescription1 = “Luxury Villas in your city.”;

template.defaultDescription2 = “Call now for exciting prices.”;

template.defaultDisplayUrl = “example.com/”;

template.defaultDestinationUrl = “http://www.example.com/”;

template.isMobilePreferred = false;   // Can be true or false

 

templates.templateArray.push(template);

/******************************************************** Template 2 ends ***************************************************/

 

/************************************************* Template 3 starts ********************************************************/

var template = new Object();

// Campaign stuff

template.campaignName = “Test Campaign 3”;

 

template.ad groupsName = “[Subdivision] [City]”; //This defines the ad group name

template.maxCpc = 0.25; //Keyword Max CPC – Can come from feed as well (Ex. [Bid])

 

template.exactKeywordsTemplate = new Array ();

template.phraseKeywordsTemplate = new Array ();

template.broadKeywordsTemplate = new Array (‘[Subdivision] [City]’, ‘Homes [City]’);

template.bmmKeywordsTemplate = new Array (); //Broad Match modifier

 

template.param1 = “[Price]”;

template.param2 = “[Inventory Count]”;

 

template.adTemplates = new Array();

 

//{param1:1} is the dynamic paramter. This will be updated on daily basis. This can be used in description1 or description2

//If you do not wish to use param simply remove it

 

//Ad 1

var adTemplate = new Object();

adTemplate.headline = “[Subdivision] Homes for Sale”;

adTemplate.description1 = “View {param2:1} for sale in [Subdivision]”;

adTemplate.description2 = “[City] Real Estate”;

adTemplate.displayUrl = “Example.com/[City]”;

adTemplate.destinationUrl = “http://example.com/[Subdivision]-[City]”;

adTemplate.isMobilePreferred = false;   // Can be true or false

template.adTemplates.push(adTemplate);

 

//Ad 2

var adTemplate = new Object();

adTemplate.headline = “[Subdivision] Homes for Sale”;

adTemplate.description1 = “{param2:1} properties in [City]”;

adTemplate.description2 = “Prices starting from ${param1:1}”;

adTemplate.displayUrl = “Example.com/[City]”;

adTemplate.destinationUrl = “http://example.com/[Subdivision]-[City]”;

adTemplate.isMobilePreferred = false;   // Can be true or false

template.adTemplates.push(adTemplate);

 

//Default Ad (Without Dynamic Replacement) This template will be used only when none of the templates above fit size limts after dynamic replacement

template.defaultHeadline = “Homes for sale”;

template.defaultDescription1 = “Luxury Villas in your city.”;

template.defaultDescription2 = “Call now for exciting prices.”;

template.defaultDisplayUrl = “example.com/”;

template.defaultDestinationUrl = “http://www.example.com/”;

template.isMobilePreferred = false;   // Can be true or false

 

templates.templateArray.push(template);

/******************************************************** Template 3 ends ***************************************************/

 

return templates;

}

}

 

 

 

 

Example: You want to create 3 separate campaigns for each Feed:

  • one with exact match keywords only
  • another with phrase match keywords only
  • one with modified broad match keywords only

 

Using the same keywords and the same ad templates for each of those campaigns, the script provides support for multiple campaign templates. Therefore, in the template file you will notice three templates. You can add as many as you like. In the sample, we just customized the templates to show you how to specify three separate campaign templates for three different match types.

 

 

 

 

 

  1. Ad Params:

 

If you have dynamic params in text ads like product price, quantity you can use this feature.

 

The template for the CSV feed:

 

thisTemplate.param1 = “[Inventory Count]”;

 

The script will update the count left in the ads as per the change in the feed.

 

For example:

Description1 or Desctipion2:

Only {param1:1} left!

 

Would mean:

 

Only 33 left! (for row 2)

Only 21 left! (for row 3)

Only 1 left! (for row 4)

Only 12 left! (for row 5)

 

The results will keep on revising as and when the values change. The params can have only numeric values. Adwords allows specifying two params in an ad, and this script supports all of them.

 

 

  1. Ads:

 

The template below specifies one copy of ad for each row/ad group:

 

var adTemplate = new Object();

adTemplate.headline = “[Subdivision] Homes for Sale”;

adTemplate.description1 = “View {param1:1} homes for sale in [Subdivision]”;

adTemplate.description2 = “[City] Real Estate”;

adTemplate.displayUrl = “Example.com/[City]”;

adTemplate.destinationUrl = “http://example.com/[Subdivision]-[City]”;

adTemplate.isMobilePreferred = false;   // Can be true or false

thisTemplate.adTemplates.push(adTemplate);

 

Therefore, per current feed, if you use the above template, the ad would appear thus:

 

Headline: Carilion Homes for Sale

Description1: View 33 homes for sale in Carilion

Description2: Greenville Real Estate

Display Url: Example.com/Greenville

Destination Url: http://example.com/Carilion-Greenville

 

Mobile Preference will be turned off for this ad as -> adTemplate.isMobilePreferred = false;

 

In addition, there is a fallback template (default template):

 

thisTemplate.defaultHeadline = “Homes for sale”;

thisTemplate.defaultDescription1 = “Luxury Villas in your city.”;

thisTemplate.defaultDescription2 = “Call now for exciting prices.”;

thisTemplate.defaultDisplayUrl = “example.com/”;

thisTemplate.defaultDestinationUrl = “http://www.example.com/”;

thisTemplate.isMobilePreferred = false;   // Can be true or false

 

 

This template will only be used under the following scenario:

 

After replacing text from the feed in your ads, if your ad does not meet the size limits set by adwords, the result could be zero ads in the ad group. To avoid this, we use this default ad template. Thus, an alternate ad will be created only if our dynamic templates create none of the ads.

 

The Script is able to create several ads for the same ad group, by adding multiple ad templates. In the template file, there are three text ad templates currently configured.

 

The below piece of code defines one ad template:

 

var adTemplate = new Object();

adTemplate.headline = “[Subdivision] Homes for Sale”;

adTemplate.description1 = “{param2:1} properties in [City]”;

adTemplate.description2 = “Prices starting from ${param1:1}”;

adTemplate.displayUrl = “Example.com/[City]”;

adTemplate.destinationUrl = “http://example.com/[Subdivision]-[City]”;

adTemplate.isMobilePreferred = false;   // Can be true or false

thisTemplate.adTemplates.push(adTemplate);

 

You can copy this over with the changes and make any number of copies as per your requirements.

 

NOTE: Each column in the Google Spreadsheets configuration files contain detailed explanatory mouse-over notes.

 

If you require any installation or setup assistance, or have a new module or feature suggestion, please email us.

 

Contact-us-now