|
You are here: iOpus > iMacros > Support > IIM Tutorial: Automate Google Adwords
Tutorial: Google Adwords
Goal: Automate Google Adwords Management
Prerequisites: iMacros Power Surfer Edition or better
This tutorials discusses a few macros that help you to manage your Google Adwords listing much faster and save money.
1. Automate the login: GoogleMacro1
Before you can do anything on Google Adwords, you need to login.
VERSION BUILD=310015
URL GOTO=https://adwords.google.com/select/main#a
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:main#a ATTR=NAME:login.userid CONTENT=YourIDheregoogle@iopus.com
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ACTION:main#a ATTR=NAME:login.password CONTENT=IUZIZ785688788E90
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:main#a ATTR=NAME:login&&VALUE:Login
|
2. Download the campaign stats into a comma-separated text file: GoogleMacro2
Google does not allow you to download the data as text file. No problem, IIM can do this with only two lines! Of course, the same commands can extract any TABLE you see on the web (price lists, stocks, ...) into a CSV formatted text file!
To run this macro, navigate to the Campaign you want to download. Use POS=1 for the first AdGroup, POS=2 for the second AdGroup and so on:
VERSION BUILD=3351223
SET !FILEXTRACT google.csv
EXTRACT POS=1 ELEM=0 ATTR=<TABLE<SP>class=report<SP>cellSpacing=0<SP>cellPadding=3<SP>border=1>*
SAVEAS TYPE=EXTRACT
|
3. Change the campaign end date for all listings: GoogleMacro3
Google does not provide a method to change the campaign date for several campaigns at once. But no problem for iMacros:
VERSION BUILD=310015
URL GOTO=https://adwords.google.com/select/main#a
TAG POS=1 TYPE=SELECT FORM=NAME:f ATTR=NAME:campaignid CONTENT={{!loop}}
TAG POS=1 TYPE=A ATTR=TXT:Edit<SP>Campaign<SP>Settings
TAG POS=1 TYPE=SELECT FORM=ACTION:main#a ATTR=NAME:date.end.month CONTENT=11
TAG POS=1 TYPE=SELECT FORM=ACTION:main#a ATTR=NAME:date.end.day CONTENT=26
TAG POS=1 TYPE=SELECT FORM=ACTION:main#a ATTR=NAME:date.end.year CONTENT=1
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:main#a ATTR=NAME:save&&VALUE:Save<SP>changes
|
To start this macro, click LOOP. The macro now navigates to all campaigns and sets the campaign end date to 2002-11-26
4. Run campaigns one on certain hours of the day:GoogleMacro4/5
To save money, it can be a clever, to run expensive advertising campaign only when your target audience is only, for example during work hours. The following macros pauses (switch off) the first three campaigns ("GoogleMacro3"):
VERSION BUILD=320024
URL GOTO=https://adwords.google.com/select/main#a
TAG POS=1 TYPE=B ATTR=TXT:View<SP>/<SP>Edit<SP>Campaigns
TAG POS=1 TYPE=SELECT FORM=NAME:f ATTR=NAME:campaignid CONTENT=1
TAG POS=1 TYPE=A ATTR=TXT:Pause<SP>Ad<SP>Group
TAG POS=1 TYPE=SELECT FORM=NAME:f ATTR=NAME:campaignid CONTENT=2
TAG POS=1 TYPE=A ATTR=TXT:Pause<SP>Ad<SP>Group
TAG POS=1 TYPE=SELECT FORM=NAME:f ATTR=NAME:campaignid CONTENT=3
TAG POS=1 TYPE=A ATTR=TXT:Pause<SP>Ad<SP>Group
|
And this macro enables (resume) the campaigns again ("GoogleMacro4"):
VERSION BUILD=320024
URL GOTO=https://adwords.google.com/select/main?cmd=CampaignManagement&campaignid=0
TAG POS=1 TYPE=SELECT FORM=NAME:f ATTR=NAME:campaignid CONTENT=1
TAG POS=1 TYPE=A ATTR=TXT:Resume<SP>Ad<SP>Group
TAG POS=1 TYPE=SELECT FORM=NAME:f ATTR=NAME:campaignid CONTENT=2
TAG POS=1 TYPE=A ATTR=TXT:Resume<SP>Ad<SP>Group
TAG POS=1 TYPE=SELECT FORM=NAME:f ATTR=NAME:campaignid CONTENT=3
TAG POS=1 TYPE=A ATTR=TXT:Resume<SP>Ad<SP>Group
|
Of course, there are many more Adwords related tasks that can be automated with iMacros.
 |
With the command line interface of the PRO or SCRIPTING Edition, this process can be completely automated using the Windows Task Scheduler: Add "C:\IIM3\iimpro.exe -macro googlemacro3 -tray" to stop the campaigns and and create a second task with "C:\IIM3\iimpro.exe -macro googlemacro4 -tray" to resume the campaign again later. |
|