59
#SMX #24B @armondhammer Decoding Code The Secret Code of AdWords Scripts Steve Hammer President, RankHammer

The Secret Codes of AdWords Scripts By Steven Hammer

Embed Size (px)

Citation preview

Page 1: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Decoding Code

The Secret Code of

AdWords Scripts

Steve HammerPresident,

RankHammer

Page 2: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Breaking the Code

Page 3: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Is this how code feels

Page 4: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

From Fear to Confidence

Page 5: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Page 6: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

About Me

FAMILYWhat it’s all about

FOOD AND WINE

Eating as an art form?

HOCKEYGo Stars

RANKHAMMERDallas Based Digital Marketing Agency

Page 7: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

What do we do every day?

Page 8: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Manage by rules

Exceeds GoalCPA Too HighBid Reduce

by 15%Actio

n

Page 9: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Let’s Translate

Page 10: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Page 11: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer12

Basic Logic

When

• Conditions

In

• Item Scope

Change

• Operation

Unless

• Limits

Selector

Iterator logic

Page 12: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Specifying a Script

When

• Conditions

In

• Item Scope

Change

• Operation

Unless

• Limits

When

• CPA is higher than XXX

In

• Target Campaign

Change

• Bids by -10%

Unless

• Impression share is <50%

Page 13: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Code.org/starwars

Page 14: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Blockly

https://developers.google.com/blockly/

Page 15: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Loops and Conditions

Page 16: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

http://www.codecademy.com/tracks/javascripthttp://www.w3schools.com/js/

default.asp

http://www.learn-js.org/

Learning a little JavaScript

https://www.khanacademy.org/computing/computer-programming

Page 17: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Make the blocks your own

Page 18: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Worst Script Ever

Page 19: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Function

Page 20: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Comments

Page 21: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Statements

Page 22: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Logger – Line 2

Bulk Operations >Logs>

Details>Logs>

Page 23: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Selector – Line 3 - 6

Makes an array of the typeFiltered by conditionsFinished with get();

Page 24: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Selector

Conditions are ANDConnect with .

End with ;

Page 25: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Selectable?

https://developers.google.com/adwords/scripts/docs/reference/adwordsapp/adwordsapp_adselector

Page 26: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Variables

Discreet

• 5.23• ‘Office’• 5+3• ‘Today’ + variable

Arrays• [4, 5, 7, 9]• [‘Home’,’Office’,’Hotel’]

Objects

• {name:’Steve’,zip:75204,car:’Subaru’}• {1:Array1,2:Array2}

Page 27: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Selector

Get all keywordsWith a CTR greater than

0.01For all time

Page 28: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

We Now Have

Selected every keywordThat has everGotten a click

Page 29: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

While Next

Sets up the repeating

Page 30: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Payload

Calls a method to make a change

Page 31: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Iterator

Find the maximum CPCAdd 1%

Set as new Max CPC

Page 32: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Worst Script Ever

Page 33: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

First Change

Page 34: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

First Change

Page 35: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

End Product

Page 36: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Change {almost}anything

Page 37: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Next Level

Prewritten Scripts

+

Code Snippets

Page 38: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Starting Scripts

http://www.rankhammer.com/blog/2541/i-heard-you-like-adwords-scripts

https://developers.google.com/adwords/scripts/docs/solution/

http://freeadwordsscripts.com

Page 39: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Defining a Function

Functions can return values to feed a variable

Functions can also just be invoked, even without

parameters

Page 40: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Snippets

https://developers.google.com/adwords/scripts/docs/examples/

Page 41: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Not exactly ready to use

Page 42: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Odd Selector Logic

Values have to become strings

Page 43: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

ODD Selector LOGIC

To make it flexible it has to be:

“Column Operator” + Value

'Name = "' + var + '"'

Odd Selector Logic

Page 44: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Tweak The Selector

Page 45: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer46

Organize

Protip:Make a Text DocumentStore modified function snippetsCopy Paste next time

Page 46: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Multiple Functions

Page 47: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Look at real needs

Page 48: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Good CandidatesDaily Activities• Scale Changes• Profit bidding

Bulk Changes• KW addition

Rapid Movement• Limited

Inventory• Price Changes

Creative Models• Correlated

Bidding

Ad Copy Rotation• Timely Changes

Page 49: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Specifying a Script

When

• Conditions

In

• Item Scope

Change

• Operation

Unless

• Limits

When

• CPA is higher than XXX

In

• Target Campaign

Change

• Bids by -10%

Unless

• Impression share is <50%

Page 50: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Franchises – Locations growing

Page 51: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Our problem

When

• Conditions

In

• Item Scope

Change

• Operation

Unless

• Limits

When

• A new location launches

In

• New adgroup

Change

• Add city name to base keywords

Unless

• N/A

Page 52: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

The goal – another way

Marketing

+marketing

+plano

“marketing plano”

“plano marketin

g”

Page 53: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Flesh out the basic idea – all comments

Page 54: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Find snippets and modify

Page 55: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Flesh out the details

Page 56: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Test and Preview

Page 57: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

I expect you to die try

Page 58: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

Protip:Copy To EditorReview Changes as “proposed”Reject to undo

Page 59: The Secret Codes of AdWords Scripts By Steven Hammer

#SMX #24B @armondhammer

LEARN MORE: UPCOMING @SMX EVENTS

THANK YOU! SEE YOU AT THE NEXT #SMX