making adwords scripts scale - the norisk approach

39
Making SCALE Chris Gutknecht & Alex Groß |

Upload: norisk

Post on 23-Jan-2018

297 views

Category:

Data & Analytics


3 download

TRANSCRIPT

Page 1: Making Adwords Scripts SCALE - The norisk approach

Making SCALE

Chris Gutknecht & Alex Groß |

Page 2: Making Adwords Scripts SCALE - The norisk approach

BACKGROUND: PPC MEETUP MUNICH

Meetup Group – Founder: Philipp Mainka

meetup.com/de-DE/PPC-Meetup-Munich/

•  First event in August 2017 @ SEM Boutique

•  Spinoff of SEM Stammtisch

•  Idea: Talks – Drinks – Food – Network (EN & DE)

•  Frequency : Every two months

>> Call for Speakers, Hosts, Sponsors, Panel Attendants!

Page 3: Making Adwords Scripts SCALE - The norisk approach

ABOUT NORISK – ABOUT US

norisk

Chris Alex

Page 4: Making Adwords Scripts SCALE - The norisk approach

1.  Reasons for AdWords Scripts

2.  Limitations of Adwords Scripts

3.  Performance Tweaks

1.  Run time: Job-Splitting, Log-DB and Sync Best Practices

2.  Updates: External Hosting

4.  Takeaways

Page 5: Making Adwords Scripts SCALE - The norisk approach

PPC: HUMAN VS MACHINE?

Page 6: Making Adwords Scripts SCALE - The norisk approach

PPC: HUMAN VS MACHINE?

Understand intent

Express emotion

Adapt to change, context

Design structure

Find errors & Learn

Handle big datasets

Routine tasks (Syncs)

Calculate probability

Monitor & Alert

Page 7: Making Adwords Scripts SCALE - The norisk approach

GOOGLE: WE USE AI FOR {INSERT_NEW_TOPIC}

Page 8: Making Adwords Scripts SCALE - The norisk approach

TREND TOWARDS AUTOMATION & AI

Page 9: Making Adwords Scripts SCALE - The norisk approach

TREND ZU AUTOMATION (& AI)

Page 10: Making Adwords Scripts SCALE - The norisk approach

LEARN TO THINK LIKE A MACHINE

Page 11: Making Adwords Scripts SCALE - The norisk approach

MACHINE VS HUMAN: WHAT DO PPCS SAY?

Source: The PPC Battle: Human vs Machine? (n ~ 100)

Page 12: Making Adwords Scripts SCALE - The norisk approach

CORE QUESTION: MAKE OR RENT?

Page 13: Making Adwords Scripts SCALE - The norisk approach

CORE QUESTION: MAKE OR RENT?

MAKE SaaS RENT AdWords

Scripts

API-Tool

Page 14: Making Adwords Scripts SCALE - The norisk approach

SAAS VENDOR IS TIME-CONSUMING

BUY

Time

Cost

SaaS

Vendor selection

Requirements definition

Page 15: Making Adwords Scripts SCALE - The norisk approach

ADWORDS SCRIPTS vs SAAS-TOOL

AdWords

Scripts

API-Tool

BUY

MAKE

Time

Cost

SaaS

Requirements specification needed for both!

Page 16: Making Adwords Scripts SCALE - The norisk approach

WHY IS „MAKE“ FOR ADWORDS MORE ATTRACTIVE?

vs

Feed platfoms

Free adwords script

Ad Customizer & Business data

Code-Tutorial platforms

Machine Learning APIs

Camato

Delta Method

Smarter Ecommerce

DIY Tools (MAKE) RENT

Page 17: Making Adwords Scripts SCALE - The norisk approach

CORE QUESTION: MAKE OR RENT?

MAKE SaaS RENT AdWords

Scripts

Standardized Individual

Specific

Isolated

Stable

Scalable

Complex

Lack of know-how

Volatile

Perspective

2016 vs 2017

Page 18: Making Adwords Scripts SCALE - The norisk approach

ADWORDS SCRIPTS VS API-TOOL

Additional cost of API-tool

•  Maintenance cost

•  API cost

•  Utility-cost (Auth, Log, Email)

•  Script transfer to Java, PHP, Python

Page 19: Making Adwords Scripts SCALE - The norisk approach

1.  Reasons for AdWords Scripts

2.  Limitations of Adwords Scripts

3.  Performance Tweaks

1.  Run time: Job-Splitting, Log-DB and Sync Best Practices

2.  Updates: External Hosting

4.  Takeaways

Page 20: Making Adwords Scripts SCALE - The norisk approach

LIMITATIONS OF ADWORDS SCRIPTS

RUNTIME(30min) STORAGE(5-10GB)

ENTITYLIMITS

SPREADSHEET(2Mio)

MISSINGMETHODS

CODESTRUCTURE(ES5) UPDATES

ERROR-ALERTING&UTILITIES

SERVICELIMITS

Limits-Docs: https://developers.google.com/adwords/scripts/docs/limits Thomas Grübel SMX: bit.ly/inbiz_smx

(only „hard“ limitation)

Page 21: Making Adwords Scripts SCALE - The norisk approach

TREND ZU AUTOMATION (& AI)

BENCHMARK

LinkCheckerDeluxe nrFeedCampaigns nrShoppingSync

Maxelements/hour(/day)

3000(72k)

4000(92k)

1000(24k)

OperaSon CheckfinalUrl&label CreateadGroups,Ads,Keywords,Sitelinks,Labels

Syncproductgroupsalongtreestructure

( )

Page 22: Making Adwords Scripts SCALE - The norisk approach

RULE OF THUMB: LINEAR SCALABILITY

More logic => flatter curve

0

500

1000

1500

2000

2500

3000

3500

0 5 10 15 20 25 30 35 40

CreatedElementsandExecuBonTimeinmin(n=12)

Page 23: Making Adwords Scripts SCALE - The norisk approach

[SCRIPTS BASICS: THE ITERATOR OBJECT]

var adGroupIterator = AdWordsApp.adGroups() .withCondition("Name CONTAINS '" + var + "') .withCondition("Impressions > 10") .forDateRange("LAST_MONTH") .get();

while (adGroupIterator.hasNext()) { var adGroup = adGroupIterator.next(); // Do stuff adGroup.setStatus("ENABLED"); var adOperation = adGroup.newAd().expandedTextAdBuilder()... var keywordBuilder = adGroup.newKeywordBuilder().withText(); adGroup.createNegativeKeyword(); adgroup.addSitelink();

}

Selector

Sel.+ get()= Iterator

Page 24: Making Adwords Scripts SCALE - The norisk approach

1.  Reasons for AdWords Scripts

2.  Limitations of AdWords Scripts

3.  Performance Tweaks

1.  Run time: Job-Splitting, Log-DB and Sync Best Practices

2.  Updates: External Hosting

4.  Takeaways

Page 25: Making Adwords Scripts SCALE - The norisk approach

SCALING = HOURLY RUNS + JOB-SPLITTING

vs

Iterative processing

Saving the current state

LinkCheckerDeluxe

Issues:

›  Logic for saving & loading

›  State-Sync-Errors (1%)

Simple logic

Endlessly repeatable

DailyAccountSpendPrinter

Issues: 30 Min Run time

STATELESSNESS JOB-SPLITTING

Page 26: Making Adwords Scripts SCALE - The norisk approach

START W

Page 27: Making Adwords Scripts SCALE - The norisk approach

PROGRESS LOG FOR JOB SPLITTING

Alternatives

LABELS GET-STATUS & COMPARE LOG-DB

Use Case� Daily Checks

Status update

Feedbased entity creation & update Entity selector without string search

Google Sheets vs Big Query

Example� LinkCheckerDeluxe

AdGroups, Ads, Keywords

Product groups

Sitelinks

Limitation� Status accuracy < 100%

Labels not always available

GetAll method not always available

2 Mio Google sheet cells

Exact data set definition in advance

Example: Manage Multi-account MCC script via labels (Russ Savage)

Page 28: Making Adwords Scripts SCALE - The norisk approach

TEST: LINKCHECKER DELUXE (BY HOLGER SCHULZ)

Hourly Scheduling

Job Splitting via label

Good stuff

URL fetch limit 10k/user/day

https://www.internet-marketing-inside.de/AdWords-Scripts/LinkChecker.html

✔ ✔ ✔ !

Finished.

Page 29: Making Adwords Scripts SCALE - The norisk approach

ADDON: NORISK-TIMER LIBRARY

Custom Scheduling: Start later!

https://gist.github.com/norisk-marketing/9876221a815092fecfec99414b0e28e5

Page 30: Making Adwords Scripts SCALE - The norisk approach

SYNCHRONISATION CHALLENGES

Target State 1. Get &

Find Gap

Actual State (AdWords)

DB

2. Update

SCRIPT

3. Log

Page 31: Making Adwords Scripts SCALE - The norisk approach

GOOGLE SHEETS vs BIG QUERY

SYNC BEST PRACTICES I

Well documented API

Non-tech access

Free

Can break with lots of data

Read/write slower

Sheet limitations (2 mio cells)

Fast/easy setup

Integrates into Google Cloud

Fast read/write access

AdWords Scripts API not well documented

User permissions complex

Costs with big amounts of data

Page 32: Making Adwords Scripts SCALE - The norisk approach

Manage DB containing multiple Spreadsheets

SYNC BEST PRACTICES II

Service creates new sheets as needed

References every sheet in JSON file in Drive

Easy data access through one method

✔ ✔ ✔ !

https://gist.github.com/norisk-marketing/7cb04d87080dc80c056dc8b1785ded63

Page 33: Making Adwords Scripts SCALE - The norisk approach

Manage BigQuery data tables via Storage Handler

SYNC BEST PRACTICES III

SQL-Wrapper for Google BigQuery => easy to use, no SQL needed

Data safely stored in cloud database

Super cheap for small/medium amounts of data

✔ ✔ ✔ ! !

Storage InserBng Querying

Freedatapermonth 10GB - 1TB

Permonthcost 0,02$/GB 0,05$/GB 5$/TB

https://gist.github.com/norisk-marketing/8f459d666ac016a4d7eecf8f180771e1

Page 34: Making Adwords Scripts SCALE - The norisk approach

STOP WATCH

RUN TIME BEST PRACTICES I

Log start time and current_time => Calculate difference

Stop if not enough time left!

No data sync inaccuracies!

✔ ✔ ✔

Page 35: Making Adwords Scripts SCALE - The norisk approach

DB data access via object key

RUN TIME BEST PRACTICES II

Comparison of two sets of data (arrays)

Converting the base array into an object with id as key

Syntax object assignment and read

~2500 times faster than array comparison

Ex.: 10k sets of data à 0,1 sec = 16 min > 32 sek

✔ ✔ ✔ ✔

Page 36: Making Adwords Scripts SCALE - The norisk approach

Managing Scripts and Updates centrally

EXTERNAL HOSTING

Get and execute external javascript files, hosting anywhere, e.g. Google Drive, github, own file server

Manage updates from one central file for +10 Accounts

✔ ✔ !

Page 37: Making Adwords Scripts SCALE - The norisk approach

ADDON EXCEPTION HANDLING

Always wrap logic in try/catch

Print errors into console for error tracing

Get to root cause quickly! Be happy!

✔ ✔ ✔ !

Debugging with try/catch

Page 38: Making Adwords Scripts SCALE - The norisk approach

TAKEAWAYS

Hourly Scheduling and Job Splitting

Job Splitting per Label, Log-DB or GetStatus

DB: Spreadsheet Wrapper or BigQuery Storage Handler

External Hosting for easy Updates and bug fixing

Test and be confident!

✔ ✔ ✔ ✔ ✔

MAKING ADWORDS SCRIPTS SCALE

Page 39: Making Adwords Scripts SCALE - The norisk approach

HAPPY AUTOMATING & SCALING !

GUTKNECHT

Head of Online Marketing�

CHRISTOPHER

TWITTER @chrisgutknecht

MAIL [email protected]

Scripts: github.com/norisk/AdWords-Scripts // gist.github.com/norisk-marketing Meetup: meetup.com/de-DE/PPC-Meetup-Munich/

GROSS

Marketing Technologist�

ALEXANDER

MAIL [email protected]