Google APIlity Library Reference
The APIlity PHP Library provides an object-oriented way to easily access and manage the Google AdWords API from within PHP.This comes along with an abstraction from the SOAP and WSDL details.
This reference documents all functions offered by the library. The functions are categorized into several sections with different senses.
Please note: each section has its own color represented by a colored bar at the right side and the particular link color. Thus orientation is very easy.
Quicknavigator
|
APIlity structure
Click the images to resize the class organigram and/or the object hierarchy: |
Campaign.php
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
Object Operations
getActiveAdGroups()
Returns all active AdGroups of a given Campaign.
Parameters:
NoneResponse:
[AdGroup] activeAdGroupObjectsSample:
$campaignObject = createCampaignObject(123456789);
print_r($campaignObject->getActiveAdGroups());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAdScheduling()
Returns the Campaign's ad schedule.
Parameters:
NoneResponse:
adScheduling = array(
'status',
'intervals' = array(
array(
'day',
'startHour',
'startMinute',
'endHour',
'endMinute',
'multiplier'
)
)
)Sample:
$campaignObject = createCampaignObject(123456789);
print_r($campaignObject->getAdScheduling());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAllAdGroups()
Returns all AdGroups of a given Campaign.
Parameters:
NoneResponse:
[AdGroup] allAdGroupObjectsSample:
$campaignObject = createCampaignObject(123456789);
print_r($campaignObject->getAllAdGroups());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getBelongsToClientEmail()
Returns the client email this Campaign belongs to.
Parameters:
NoneResponse:
String emailSample:
$campaignObject = createCampaignObject(123456789);
echo $campaignObject->getBelongsToClientEmail();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getBudgetAmount()
Returns the Campaign's budget amount.
Parameters:
NoneResponse:
Integer budgetAmountSample:
$campaignObject = createCampaignObject(123456789);
echo $campaignObject->getBudgetAmount();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getBudgetOptimizerSettings()
Returns the Campaign's budget optimizer settings.
Parameters:
NoneResponse:
budgetOptimizerSettings = array(
'bidCeiling',
'enabled',
'takeOnOptimizedBids'
)Sample:
$campaignObject = createCampaignObject(123456789);
print_r($campaignObject->getBudgetOptimizerSettings());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getBudgetPeriod()
Returns the Campaign's budget period.
Parameters:
NoneResponse:
String budgetPeriodSample:
$campaignObject = createCampaignObject(123456789);
echo $campaignObject->getBudgetPeriod();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCampaignData()
Returns all the Campaign's attributes in one go.
Parameters:
NoneResponse:
campaignData = array(
'name',
'id',
'belongsToClientEmail',
'status',
'startDate',
'endDate',
'budgetAmount',
'budgetPeriod',
'networkTargeting',
'languages',
'geoTargets',
'isEnabledOptimizedAdServing'
)Sample:
$campaignObject = createCampaignObject(123456789);
print_r($campaignObject->getCampaignData());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCampaignNegativeKeywordCriteria()
Returns the Campaign's Negative Keyword Criteria.
Parameters:
NoneResponse:
campaignNegativeKeywords = array(
array(
'text',
'type'
)
)Sample:
$campaignObject = createCampaignObject(123456789);
print_r($campaignObject->getCampaignNegativeKeywordCriteria());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCampaignNegativeWebsiteCriteria()
Returns the Campaign's Negative Website Criteria.
Parameters:
NoneResponse:
campaignNegativeWebsites = array(
array(
'url',
)
)Sample:
$campaignObject = createCampaignObject(123456789);
print_r($campaignObject->getCampaignNegativeWebsiteCriteria());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCampaignStats($startDate, $endDate)
Returns the statistical data for a Campaign during the given period of time.
Parameters:
String startDate
String endDateResponse:
campaignStats = array(
'averagePosition',
'clicks',
'conversionRate',
'conversions',
'cost',
'id',
'impressions',
'name'
)Sample:
$yesterday = gmdate(
"Y-m-d",
mktime(
date("H"),
date("i"),
date("s"),
date("m"),
date("d") - 1,
date("Y")
)
);
$dayBeforeYesterday = gmdate(
"Y-m-d",
mktime(
date("H"),
date("i"),
date("s"),
date("m"),
date("d") - 2,
date("Y")
)
);
$campaignObject = createCampaignObject(123456789);
print_r($campaignObject->getCampaignStats($dayBeforeYesterday, $yesterday));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getEndDate()
Returns the Campaign's end date.
Parameters:
NoneResponse:
String endDateSample:
$campaignObject = createCampaignObject(123456789);
echo $campaignObject->getEndDate();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getEstimate()
Returns a performance estimate for the Campaign.
Parameters:
NoneResponse:
campaignEstimate = array(
array(
array(
'text',
'lowerAveragePosition',
'upperAveragePosition',
'lowerCostPerClick',
'upperCostPerClick',
'lowerClicksPerDay',
'upperClicksPerDay'
),
'adGroupName',
'adGroupId'
),
'campaignName',
'campaignId'
)Sample:
$campaignObject = createCampaignObject(123456789);
print_r($campaignObject->getEstimate());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getGeoTargets()
Returns the Campaign's geo targetings.
Parameters:
NoneResponse:
[String] geoTargetsSample:
$campaignObject = createCampaignObject(123456789);
print_r($campaignObject->getGeoTargets());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getId()
Returns the Campaign's ID.
Parameters:
NoneResponse:
Integer id // for MySQL use BigIntSample:
$campaignObject = createCampaignObject(123456789);
echo $campaignObject->getId();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getIsEnabledOptimizedAdServing()
Returns if the advertisment serving of the Campaign is being optimized.
Parameters:
NoneResponse:
Boolean isEnabledOptimizedAdServingSample:
$campaignObject = createCampaignObject(123456789);
echo $campaignObject->getIsEnabledOptimizedAdServing();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getLanguages()
Returns the Campaign's language targeting.
Parameters:
NoneResponse:
[String] languagesSample:
$campaignObject = createCampaignObject(123456789);
print_r($campaignObject->getLanguages());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getName()
Returns the Campaign's name.
Parameters:
NoneResponse:
String nameSample:
$campaignObject = createCampaignObject(123456789);
echo $campaignObject->getName();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getNetworkTargeting()
Returns the Campaign's network targeting.
Parameters:
NoneResponse:
[String] networkTargetingSample:
$campaignObject = createCampaignObject(123456789);
print_r($campaignObject->getNetworkTargeting());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getRecommendedBudget()
Returns the Campaign's recommended budget.
Parameters:
NoneResponse:
Budget recommendedBudgetSample:
$campaignObject = createCampaignObject(123456789);
print_r($campaignObject->getRecommendedBudget());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getStartDate()
Returns the Campaign's start date.
Parameters:
NoneResponse:
String startDateSample:
$campaignObject = createCampaignObject(123456789);
echo $campaignObject->getStartDate();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getStatus()
Returns the Campaign's status.
Parameters:
NoneResponse:
String statusSample:
$campaignObject = createCampaignObject(123456789);
echo $campaignObject->getStatus();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setAdScheduling($newAdScheduling)
Sets the Campaign's new ad schedule.
Parameters:
newAdScheduling = array(
'status',
'intervals' = array(
array(
'day',
'startHour',
'startMinute',
'endHour',
'endMinute',
'multiplier',
)
)
)None
Sample:
$interval1 = array();
$interval1['multiplier'] = 1.5;
$interval1['day'] = "Saturday";
$interval1['startHour'] = 13;
$interval1['startMinute'] = 0;
$interval1['endHour'] = 15;
$interval1['endMinute'] = 15;
$interval2 = array();
$interval2['multiplier'] = 0.7;
$interval2['day'] = "Sunday";
$interval2['startHour'] = 9;
$interval2['startMinute'] = 30;
$interval2['endHour'] = 10;
$interval2['endMinute'] = 45;
$adScheduling = array(
'status' => "Enabled",
'intervals' => array(
$interval1,
$interval2
)
);
$campaignObject = createCampaignObject(123456789);
$campaignObject->setAdScheduling($adScheduling);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setBudgetAmount($newBudgetAmount)
Sets a new Campaign budget amount.
Parameters:
Integer newBudgetAmountResponse:
NoneSample:
$campaignObject = createCampaignObject(123456789);
$campaignObject->setBudgetAmount(1000);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setBudgetOptimizerSettings($newBudgetOptimizerSettings)
Sets the Campaign's budget optimizer settings.
Parameters:
newBudgetOptimizerSettings = array(
'bidCeiling',
'enabled',
'takeOnOptimizedBids'
)Response:
NoneSample:
$campaignObject = createCampaignObject(123456789);
$budgetOptimizerSettings = array(
'bidCeiling' => 42,
'enabled' => true,
'takeOnOptimizedBids' => true
);
$campaignObject->setBudgetOptimizerSettings($budgetOptimizerSettings);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setBudgetPeriod($newBudgetPeriod)
Sets a new Campaign budget period.
Parameters:
String newBudgetPeriodResponse:
NoneSample:
$campaignObject = createCampaignObject(123456789);
$campaignObject->setBudgetPeriod('Daily');
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setCampaignNegativeKeywordCriteria($newCampaignNegativeKeywords)
Sets new Campaign Negative Keyword Criteria. Already existing Campaign Negative Keyword Criteria will be overwritten. However, already existing Campaign Negative Website Criteria will be kept.
Parameters:
newCampaignNegativeKeywords = array(
array(
'text',
'type'
)
)Response:
NoneSample:
$campaignObject = createCampaignObject(123456789);
$negativeCriterion1 = array('text' => "none", 'type' => "Broad");
$negativeCriterion2 = array('text' => "of these", 'type' => "Phrase");
$campaignObject->setCampaignNegativeKeywordCriteria(
array($negativeCriterion1, $negativeCriterion2)
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setCampaignNegativeWebsiteCriteria($newCampaignNegativeWebsites)
Sets new Campaign Negative Website Criteria. Already existing Campaign Negative Website Criteria will be overwritten. However, already existing Campaign Negative Keyword Criteria will be kept.
Parameters:
newCampaignNegativeWebsites = array(
array(
'url'
)
)Response:
NoneSample:
$campaignObject = createCampaignObject(123456789);
$negativeCriterion1 = array('url' => "spiegel.de");
$negativeCriterion2 = array('url' => "aol.com");
$campaignObject->setCampaignNegativeWebsiteCriteria(
array($negativeCriterion1, $negativeCriterion2)
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setConversionOptimizerSettings($conversionOptimizerSettings)
Sets the Campaign's conversion optimizer settings.
Parameters:
newConversionOptimizerSettings = array(
'enabled',
'maxCpaBidForAllAdGroups'
)Response:
NoneSample:
$campaignObject = createCampaignObject(123456789);
$conversionOptimizerSettings = array(
'enabled' => true,
'maxCpaBidForAllAdGroups' => 10
);
$campaignObject->setConversionOptimizerSettings($conversionOptimizerSettings);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setEndDate($newEndDate)
Sets a new Campaign end date.
Parameters:
String newEndDateResponse:
NoneSample:
$campaignObject = createCampaignObject(123456789);
$campaignObject->setEndDate("2011-12-17");
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setGeoTargets($newGeoTargets)
Sets new Campaign geo targets.
Parameters:
newGeoTargets = array(
'countryTargets' => array(
'countries' => array(),
'excludedCountries' => array()
),
'regionTargets' => array(
'regions' => array(),
'excludedRegions' => array()
),
'metroTargets' => array(
'metros' => array(),
'excludedMetros' => array()
),
'cityTargets' => array(
'cities' => array(),
'excludedCities' => array()
),
'proximityTargets' => array(
'circles' => array(
'latitudeMicroDegrees',
'longitudeMicroDegrees',
'radiusMeters'
)
),
'targetAll'
)Response:
NoneSample:
$campaignObject = createCampaignObject(123456789);
$newGeoTargets = array(
'countryTargets' => array(
'countries' => array()
),
'regionTargets' => array(
'regions' => array()
),
'metroTargets' => array(
'metros' => array()
),
'cityTargets' => array(
'cities' => array(
"Reutlingen, BW DE",
"Karlsruhe, BW DE"
),
'excludedCities' => array(
"Hamburg, HH DE"
)
),
'proximityTargets' => array(
'circles' => array()
)
);
$campaignObject->setGeoTargets($newGeoTargets);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setIsEnabledOptimizedAdServing($newFlag)
Sets the flag to show if the advertisment serving of the Campaign is being optimized.
Parameters:
Boolean newFlagResponse:
NoneSample:
$campaignObject = createCampaignObject(123456789);
$campaignObject->setIsEnabledOptimizedAdServing(true);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setLanguages($newLanguages)
Sets a new Campaign language targeting.
Parameters:
[String] newLanguages // Pass array("all") to select all languagesResponse:
NoneSample:
$campaignObject = createCampaignObject(123456789);
$campaignObject->setLanguages(array("fr", "de"));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setName($newName)
Sets a new Campaign name.
Parameters:
String newNameResponse:
NoneSample:
$campaignObject = createCampaignObject(123456789);
$campaignObject->setName("The new name");
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setNetworkTargeting($networkTargeting)
Sets the Campaign's network targeting.
Parameters:
[String] networkTargeting // Valid values: GoogleSearch, SearchNetwork, ContentNetworkResponse:
NoneSample:
$campaignObject = createCampaignObject(123456789);
$campaignObject->setNetworkTargeting(array("GoogleSearch", "SearchNetwork"));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setStatus($newStatus)
Sets a new Campaign Status.
Parameters:
String newStatus // Pass "Active" or "Paused"Response:
NoneSample:
$campaignObject = createCampaignObject(123456789);
$campaignObject->setStatus("Active");
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
toXml()
Returns the Campaign in XML format.
Parameters:
NoneResponse:
String campaignXml // Contains the Campaign in XML formatSample:
$campaignObject = createCampaignObject(123456789);
echo htmlspecialchars($campaignObject->toXml());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
Class Operations
addCampaign(
$name,
$status,
$startDate,
$endDate,
$budgetAmount,
$budgetPeriod,
$networkTargeting,
$languages,
$geoTargets,
$adScheduling,
$budgetOptimizerSettings
)
Adds a Campaign to the current customer's account.
Parameters:
String name
String status
String startDate // Pass "" in order to start the Campaign directly after creation
String endDate // Pass "" in order to get a Campaign that never ends
Integer budgetAmount
String budgetPeriod
[String] networkTargeting
[String] languages // Pass array("all") to select all languages
newGeoTargets = array(
'countryTargets' => array(
'countries' => array(),
'excludedCountries' => array(),
),
'regionTargets' => array(
'regions' => array(),
'excludedRegions' => array()
),
'metroTargets' => array(
'metros' => array(),
'excludedMetros' => array()
),
'cityTargets' => array(
'cities' => array(),
'excludedCities' => array(),
),
'proximityTargets' => array(
'circles' => array(
'latitudeMicroDegrees',
'longitudeMicroDegrees',
'radiusMeters'
)
),
'targetAll'
)
{AdScheduling adScheduling}
{BudgetOptimizerSettings budgetOptimizerSettings}Response:
Campaign campaignObjectSample:
$campaignObject = addCampaign(
"Test",
"Active",
"2007-01-01",
"2011-01-01",
50,
'Daily',
array("GoogleSearch", "ContentNetwork"),
array("fr", "de"),
array(
'countryTargets' => array(
'countries' => array()
),
'regionTargets' => array(
'regions' => array()
),
'metroTargets' => array(
'metros' => array()
),
'cityTargets' => array(
'cities' => array("Grenoble, V FR")
),
'proximityTargets' => array(
'circles' => array()
)
)
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addCampaignList($campaigns)
Adds a list of Campaigns to the current customer's account. Please
note: this will fail completely even if just one Campaign fails, but
the function causes no SOAP overhead. Parameters:
campaigns = array(
array(
'name',
'status',
'startDate', // Pass "" in order to start the Campaign directly after creation
'endDate', // Pass "" in order to get a Campaign that never ends
'budgetAmount',
'budgetPeriod',
'networkTargeting',
'languages', // Pass array("all") to select all languages
'geoTargets' = array(
'countryTargets' => array(
'countries' => array(),
'excludedCountries' => array()
),
'regionTargets' => array(
'regions' => array(),
'excludedRegions' => array()
),
'metroTargets' => array(
'metros' => array(),
'excludedMetros' => array()
),
'cityTargets' => array(
'cities' => array(),
'excludedCities' => array()
),
'proximityTargets' => array(
'circles' => array(
'latitudeMicroDegrees',
'longitudeMicroDegrees',
'radiusMeters'
)
),
'targetAll'
)
{'adScheduling'}
{'budgetOptimizerSettings'}
)
)Response:
[Campaign] campaignObjectsSample:
$campaign1 = array(
'name' => "Test1",
'status' => "Active",
'startDate' => "2007-01-01",
'endDate' => "2011-01-01",
'budgetAmount' => 50,
'budgetPeriod' => 'Daily',
'networkTargeting' => array("GoogleSearch", "ContentNetwork"),
'languages' => array("de", "en"),
'geoTargets' => array(
'countryTargets' => array(
'countries' => array()
),
'regionTargets' => array(
'regions' => array()
),
'metroTargets' => array(
'metros' => array()
),
'cityTargets' => array(
'cities' => array(
"Grenoble, V FR"
)
),
'proximityTargets' => array(
'circles' => array()
)
)
);
$campaign2 = array(
'name' => "Test2",
'status' => "Active",
'startDate' => "2007-01-01",
'endDate' => "2011-01-01",
'budgetAmount' => 50,
'budgetPeriod' => 'Daily',
'networkTargeting' => array("GoogleSearch", "ContentNetwork"),
'languages' => array("de"),
'geoTargets' => array(
'countryTargets' => array(
'countries' => array()
),
'regionTargets' => array(
'regions' => array()
),
'metroTargets' => array(
'metros' => array()
),
'cityTargets' => array(
'cities' => array(
"Grenoble, V FR"
)
),
'proximityTargets' => array(
'circles' => array()
)
)
);
$campaignObjects = addCampaignList(array($campaign1, $campaign2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addCampaignsOneByOne($campaigns)
Adds a list of Campaigns to the current customer's account. Please
note: this will not fail completely if just one Campaign fails, but the
function causes a lot of SOAP overhead. Parameters:
campaigns = array(
array(
'name',
'status',
'startDate', // Pass "" in order to start the Campaign directly after creation
'endDate', // Pass "" in order to get a Campaign that never ends
'budgetAmount',
'budgetPeriod',
'networkTargeting',
'languages', // Pass array("all") to select all languages
'geoTargets' = array(
'countryTargets' => array(
'countries' => array(),
'excludedCountries' => array()
),
'regionTargets' => array(
'regions' => array(),
'excludedRegions' => array()
),
'metroTargets' => array(
'metros' => array(),
'excludedMetros' => array()
),
'cityTargets' => array(
'cities' => array(),
'excludedCities' => array()
),
'proximityTargets' => array(
'circles' => array(
'latitudeMicroDegrees',
'longitudeMicroDegrees',
'radiusMeters'
)
),
'targetAll',
)
{'adScheduling'}
{'budgetOptimizerSettings'}
)
)Response:
[Campaign] campaignObjectsSample:
$campaign1 = array(
'name' => "Test1",
'status' => "Active",
'startDate' => "2007-01-01",
'endDate' => "2011-01-01",
'budgetAmount' => 50,
'budgetPeriod' => 'Daily',
'networkTargeting' => array("GoogleSearch", "ContentNetwork"),
'languages' => array("de", "en"),
'geoTargets' => array(
'countryTargets' => array(
'countries' => array()
),
'regionTargets' => array(
'regions' => array()
),
'metroTargets' => array(
'metros' => array()
),
'cityTargets' => array(
'cities' => array(
"Grenoble, V FR"
)
),
'proximityTargets' => array(
'circles' => array()
)
)
);
$campaign2 = array(
'name' => "Test2",
'status' => "Active",
'startDate' => "2007-01-01",
'endDate' => "2011-01-01",
'budgetAmount' => 50,
'budgetPeriod' => 'Daily',
'networkTargeting' => array("GoogleSearch", "ContentNetwork"),
'languages' => array("de"),
'geoTargets' => array(
'countryTargets' => array(
'countries' => array()
),
'regionTargets' => array(
'regions' => array()
),
'metroTargets' => array(
'metros' => array()
),
'cityTargets' => array(
'cities' => array(
"Grenoble, V FR"
)
),
'proximityTargets' => array(
'circles' => array()
)
)
);
$campaignObjects = addCampaignsOneByOne(array($campaign1, $campaign2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
createCampaignObject($givenCampaignId)
Creates a local Campaign object based on the Campaign's ID.
Parameters:
Integer givenCampaignIdResponse:
Campaign campaignObjectSample:
$campaignObject = createCampaignObject(123456789);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getActiveCampaigns()
Returns all active Campaigns of the current customer.
Parameters:
NoneResponse:
[Campaign] activeCampaignObjectsSample:
$activeCampaigns = getActiveCampaigns();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAllCampaigns()
Returns all Campaigns of the current customer.
Parameters:
NoneResponse:
[Campaign] allCampaignObjectsSample:
$allCampaigns = getAllCampaigns();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCampaignList($givenCampaignIds)
Returns a list of Campaigns with the specified IDs.
Parameters:
[Integer] givenCampaignIdsResponse:
[Campaign] campaignObjectsSample:
$campaignIds = array(123456789, 987654321, 567891234);
$campaignObjects = getCampaignList($campaignIds);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
removeCampaign($campaignObject)
Removes a Campaign and unsets its object variable.
Parameters:
Campaign campaignObjectResponse:
NoneSample:
$campaignObject = createCampaignObject(123456789);
removeCampaign($campaignObject);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
AdGroup.php
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
Object OperationsgetActiveAdsgetAdGroupData getAdGroupStats getAllAds getAllCriteria getBelongsToCampaignId getEstimate getId getKeywordContentMaxCpc getKeywordMaxCpc getMaxCpa getName getProxyKeywordMaxCpc getSiteMaxCpc getSiteMaxCpm getStatus setKeywordContentMaxCpc setKeywordMaxCpc setMaxCpa setName setSiteMaxCpc setSiteMaxCpm setStatus toXml |
Class OperationsaddAdGroupaddAdGroupList addAdGroupsOneByOne createAdGroupObject getActiveAdGroups getAdGroupList getAllAdGroups removeAdGroup |
| APIlity uses these native API AdGroup functions. | |
| These function are defined in the AdGroup Service WSDL. | |
Object Operations
getActiveAds()
Returns all active Ads of a given AdGroup.
Parameters:
NoneResponse:
[Ad] activeAdObjectsSample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
print_r($adGroupObject->getActiveAds());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAdGroupData()
Returns all the AdGroup attributes at once.
Parameters:
NoneResponse:
adGroupData = array(
'name',
'id',
'belongsToCampaignId',
'keywordMaxCpc',
'siteMaxCpm',
'siteMaxCpc',
'maxCpa',
'keywordContentMaxCpc',
'status'
)Sample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
print_r($adGroupObject->getAdGroupData());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAdGroupStats($startDate, $endDate)
Returns the statistical data for an AdGroup during the given period of time.
Parameters:
String startDate
String endDateResponse:
adGroupStats = array(
'averagePosition',
'clicks',
'conversionRate',
'conversions',
'cost',
'id',
'impressions',
'name'
)Sample:
$yesterday = gmdate(
"Y-m-d",
mktime(
date("H"),
date("i"),
date("s"),
date("m"),
date("d") - 1,
date("Y")
)
);
$dayBeforeYesterday = gmdate(
"Y-m-d",
mktime(
date("H"),
date("i"),
date("s"),
date("m"),
date("d") - 2,
date("Y")
)
);
$adGroupObject = createAdGroupObject($givenAdGroupId);
print_r($adGroupObject->getAdGroupStats($dayBeforeYesterday, $yesterday));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAllAds()
Returns all Ads of a given AdGroup.
Parameters:
NoneResponse:
[Ad] allAdObjectsSample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
print_r($adGroupObject->getAllAds());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAllCriteria()
Returns all Criteria of a given AdGroup.
Parameters:
NoneResponse:
[Criteria] allCriterionObjectsSample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
print_r($adGroupObject->getAllCriteria());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getBelongsToCampaignId()
Returns the Campaign ID to which the AdGroup belongs.
Parameters:
NoneResponse:
Integer belongsToAdGroupId // for MySQL use BigIntSample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
echo $adGroupObject->getBelongsToAdGroupId();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getEstimate()
Returns a performance estimate for the AdGroup.
Parameters:
NoneResponse:
adGroupEstimate = array(
array(
'text',
'lowerAveragePosition',
'upperAveragePosition',
'lowerCostPerClick',
'upperCostPerClick',
'lowerClicksPerDay',
'upperClicksPerDay'
),
'adGroupName',
'adGroupId'
)Sample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
print_r($adGroupObject->getEstimate());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getId()
Returns the AdGroup's ID.
Parameters:
NoneResponse:
Integer id // for MySQL use BigIntSample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
echo $adGroupObject->getId();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getKeywordContentMaxCpc()
Returns the AdGroup's KeywordContentMaxCPC.
Parameters:
NoneResponse:
Integer keywordContentMaxCpcSample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
echo $adGroupObject->getKeywordContentMaxCpc();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getKeywordMaxCpc()
Returns the AdGroup's KeywordMaxCPC.
Parameters:
NoneResponse:
Integer keywordMaxCpcSample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
echo $adGroupObject->getKeywordMaxCpc();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getMaxCpa()
Returns the AdGroup's MaxCPA.
Parameters:
NoneResponse:
Integer maxCpaSample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
echo $adGroupObject->getMaxCpa();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getName()
Returns the AdGroup's name.
Parameters:
NoneResponse:
String nameSample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
echo $adGroupObject->getName();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getProxyKeywordMaxCpc()
Returns the AdGroup's ProxyKeywordMaxCPC.
Parameters:
NoneResponse:
Integer proxyKeywordMaxCpcSample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
echo $adGroupObject->getProxyKeywordMaxCpc();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getSiteMaxCpc()
Returns the AdGroup's SiteMaxCPC.
Parameters:
NoneResponse:
Integer siteMaxCpcSample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
echo $adGroupObject->getSiteMaxCpc();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getSiteMaxCpm()
Returns the AdGroup's SiteMaxCPM.
Parameters:
NoneResponse:
Integer siteMaxCpmSample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
echo $adGroupObject->getSiteMaxCpm();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getStatus()
Returns the AdGroup's status.
Parameters:
NoneResponse:
String status // Enabled, Paused, DeletedSample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
echo $adGroupObject->getStatus();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setKeywordContentMaxCpc($newKeywordContentMaxCpc)
Sets a new AdGroup KeywordContentMaxCPC.
Parameters:
Integer newKeywordContentMaxCpcResponse:
NoneSample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
$adGroupObject->setKeywordContentMaxCpc(0.65);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setKeywordMaxCpc($newKeywordMaxCpc)
Sets a new AdGroup KeywordMaxCPC.
Parameters:
Integer newKeywordMaxCpcResponse:
NoneSample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
$adGroupObject->setKeywordMaxCpc(0.65);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setMaxCpa($newMaxCpa)
Sets the AdGroup's MaxCPA.
Parameters:
Integer newMaxCpaResponse:
NoneSample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
$adGroupObject->setMaxCpa(10);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setName($newName)
Sets a new AdGroup name.
Parameters:
String newNameResponse:
NoneSample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
$adGroupObject->setName("The new name");
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setSiteMaxCpc($newSiteMaxCpc)
Sets the AdGroup's SiteMaxCPC.
Parameters:
Integer newSiteMaxCpcResponse:
NoneSample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
$adGroupObject->setSiteMaxCpc(10);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setSiteMaxCpm($newMaxCpm)
Sets a new AdGroup SiteMaxCPM.
Parameters:
Integer newSiteMaxCpmResponse:
NoneSample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
$adGroupObject->setSiteMaxCpm(0.65);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setStatus($newStatus)
Sets a new AdGroup Status.
Parameters:
String newStatus // Pass "Enabled" or "Paused"Response:
NoneSample:
$adGroupObject = createAdGroupObject($givenAdGroupId);
$adGroupObject->setStatus("Paused");
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
toXml()
Returns the AdGroup in XML format.
Parameters:
NoneResponse:
String adGroupXml // Contains the AdGroup in XML formatSample:
$adGroupObject = createAdGroupObject(123456789);
echo htmlspecialchars($adGroupObject->toXml());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
Class Operations
addAdGroup($name, $campaignId, $status, $keywordMaxCpc)
Adds an AdGroup to the given Campaign. Please note: we need to have keywordMaxCpc XOR siteMaxCpm, so we need to set either keywordMaxCpc or siteMaxCpm to a value different from zero, but never both.
Parameters:
String name
Integer belongsToCampaignId
String status
Integer keywordMaxCpc
{Integer siteMaxCpm}
{Integer siteMaxCpc}
{Integer maxCpa}
{Integer keywordContentMaxCpc}Response:
AdGroup adGroupObjectSample:
$adGroupObject = addAdGroup("Test", 123456789, "Enabled", 0.65);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addAdGroupList($adGroups)
Adds a list of AdGroups to the given Campaign. Please note: this will
fail completely even if just one AdGroup fails, but the function causes
no SOAP overhead. Parameters:
adGroups = array(
array(
'name',
'belongsToCampaignId',
'status',
'keywordMaxCpc',
{'siteMaxCpm'},
{'Integer siteMaxCpc'},
{'Integer maxCpa'},
{'keywordContentMaxCpc'}
)
)Response:
[AdGroup] adGroupObjectsSample:
$adGroup1 = array(
'name' => "Test1",
'belongsToCampaignId' => 123456789,
'status' => "Enabled",
'keywordMaxCpc' => 0.10
);
$adGroup2 = array(
'name' => "Test2",
'belongsToCampaignId' => 123456789,
'status' => "Enabled",
'keywordMaxCpc' => 0.10
);
$adGroupObjects = addAdGroupList(array($adGroup1, $adGroup2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addAdGroupsOneByOne($adGroups)
Adds a list of AdGroups to the given Campaign. Please note: this will
not fail completely if just one AdGroup fails, but the function causes
a lot of SOAP overhead. Parameters:
adGroups = array(
array(
'name',
'belongsToCampaignId',
'status',
'keywordMaxCpc',
{'siteMaxCpm'},
{'Integer siteMaxCpc'},
{'Integer maxCpa'},
{'keywordContentMaxCpc'}
)
)Response:
[AdGroup] adGroupObjectsSample:
$adGroup1 = array(
'name' => "Test1",
'belongsToCampaignId' => 123456789,
'status' => "Enabled",
'keywordMaxCpc' => 0.10
);
$adGroup2 = array(
'name' => "Test2",
'belongsToCampaignId' => 123456789,
'status' => "Enabled",
'keywordMaxCpc' => 0.10
);
$adGroupObjects = addAdGroupList(array($adGroup1, $adGroup2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
createAdGroupObject($givenAdGroupId)
Creates a local AdGroup object based on the AdGroup's ID.
Parameters:
Integer givenAdGroupIdResponse:
AdGroup adGroupObjectSample:
$adGroupObject = createAdGroupObject(123456789);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getActiveAdGroups($campaignId)
Returns all active AdGroups of a given Campaign.
Parameters:
Integer campaignIdResponse:
[AdGroup] activeAdGroupObjectsSample:
$activeAdGroups = getActiveAdGroups(123456789);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAdGroupList($adGroupIds)
Returns only the specified AdGroups.
Parameters:
[Integer] adGroupIdsResponse:
[AdGroup] adGroupObjectsSample:
$adGroupIds = array(123456789, 987654321, 123459876);
$adGroupObjects = getAdGroupList($adGroupIds);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAllAdGroups($campaignId)
Returns all AdGroups of a given Campaign.
Parameters:
Integer campaignIdResponse:
[AdGroup] allAdGroupObjectsSample:
$allAdGroups = getAllAdGroups(123456789);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
removeAdGroup($adGroupObject)
Removes an AdGroup and unsets its local object variable.
Parameters:
AdGroup adGroupObjectResponse:
NoneSample:
$adGroupObject = createAdGroupObject(123456789);
removeAdGroup($adGroupObject);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
Criterion.php
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
Object Operations
getBelongsToAdGroupId()
Returns the AdGroup ID to which the current Criterion belongs.
Parameters:
NoneResponse:
Integer belongsToAdGroupId // for MySQL use BigIntSample:
$criterionObject = createCriterionObject(123456789, 987654321);
echo $criterionObject->getBelongsToAdGroupId();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCriterionData() // KeywordCriterion object
Returns all the KeywordCriterion's attributes at once.
Parameters:
NoneResponse:
criterionData = array(
'text',
'id',
'belongsToAdGroupId',
'type',
'criterionType',
'isNegative',
'isPaused',
'maxCpc',
'firstPageCpc',
'qualityScore',
'status',
'language',
'destinationUrl'
)Sample:
$criterionObject = createCriterionObject(123456789, 987654321);
print_r($criterionObject->getCriterionData());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCriterionData() // WebsiteCriterion object
Returns all the WebsiteCriterion's attributes at once.
Parameters:
NoneResponse:
$criterionData = array(
'id',
'url',
'belongsToAdGroupId',
'criterionType',
'isNegative',
'maxCpm',
'maxCpc',
'status',
'language',
'destinationUrl'
);Sample:
$criterionObject = createCriterionObject(123456789, 987654321);
print_r($criterionObject->getCriterionData());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCriterionStats($startDate, $endDate)
Returns the statistical data for a Criterion during the given period of time.
Parameters:
String startDate
String endDateResponse:
criterionStats = array(
'averagePosition',
'clicks',
'conversionRate',
'conversions',
'cost',
'id',
'impressions',
'text'
)Sample:
$yesterday = gmdate(
"Y-m-d",
mktime(
date("H"),
date("i"),
date("s"),
date("m"),
date("d") - 1,
date("Y")
)
);
$dayBeforeYesterday = gmdate(
"Y-m-d",
mktime(
date("H"),
date("i"),
date("s"),
date("m"),
date("d") - 2,
date("Y")
)
);
$criterionObject = createCriterionObject(123456789, 987654321);
print_r($criterionObject->getCriterionStats($dayBeforeYesterday, $yesterday));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCriterionType()
Returns the Criterion's type.
Parameters:
NoneResponse:
String criterionTypeSample:
$criterionObject = createCriterionObject(123456789, 987654321);
echo $criterionObject->getCriterionType();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getDestinationUrl()
Returns the Criterion's destination URL.
Parameters:
NoneResponse:
String destinationUrlSample:
$criterionObject = createCriterionObject(123456789, 987654321);
echo $criterionObject->getDestinationUrl();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getEstimate()
Returns a performance estimate for the Criterion.
Parameters:
NoneResponse:
keywordEstimate = array(
'text',
'lowerAveragePosition',
'upperAveragePosition',
'lowerCostPerClick',
'upperCostPerClick',
'lowerClicksPerDay',
'upperClicksPerDay'
)Sample:
$criterionObject = createCriterionObject(123456789, 987654321);
print_r($criterionObject->getEstimate());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getFirstPageCpc()
Returns the KeywordCriterion's FirstPageCPC.
Parameters:
NoneResponse:
Integer firstPageCpcSample:
$criterionObject = createCriterionObject(123456789, 987654321);
echo $criterionObject->getFirstPageCpc();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getId()
Returns the Criterion's ID.
Parameters:
NoneResponse:
Integer id // for MySQL use BigIntSample:
$criterionObject = createCriterionObject(123456789, 987654321);
echo $criterionObject->getId();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getIsNegative()
Returns if the Criterion is negative or not.
Parameters:
NoneResponse:
Boolean isNegativeSample:
$criterionObject = createCriterionObject(123456789, 987654321);
echo $criterionObject->getIsNegative();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getIsPaused()
Returns if the Criterion is paused or not.
Parameters:
NoneResponse:
Boolean isPausedSample:
$criterionObject = createCriterionObject(123456789, 987654321);
echo $criterionObject->getIsPaused();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getLanguage()
Returns the Criterion's language.
Parameters:
NoneResponse:
String languageSample:
$criterionObject = createCriterionObject(123456789, 987654321);
echo $criterionObject->getLanguage();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getMaxCpc() // KeywordCriterion
Returns the KeywordCriterion's MaxCPC.
Parameters:
NoneResponse:
Integer maxCpcSample:
$criterionObject = createCriterionObject(123456789, 987654321);
echo $criterionObject->getMaxCpc();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getMaxCpc() // WebsiteCriterion
Returns the WebsiteCriterion's MaxCPC.
Parameters:
NoneResponse:
Integer maxCpcSample:
$criterionObject = createCriterionObject(123456789, 987654321);
echo $criterionObject->getMaxCpc();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getMaxCpm()
Returns the WebsiteCriterion's MaxCPM.
Parameters:
NoneResponse:
Integer maxCpmSample:
$criterionObject = createCriterionObject(123456789, 987654321);
echo $criterionObject->getMaxCpm();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getProxyMaxCpc()
Returns the KeywordCriterion's ProxyMaxCPC.
Parameters:
NoneResponse:
Integer proxyMaxCpcSample:
$criterionObject = createCriterionObject(123456789, 987654321);
echo $criterionObject->getKeywordMaxCpc();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getQualityScore()
Returns the KeywordCriterion's QualityScore.
Parameters:
NoneResponse:
Integer qualityScoreSample:
$criterionObject = createCriterionObject(123456789, 987654321);
echo $criterionObject->getQualityScore();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getStatus()
Retuns the Criterion's status.
Parameters:
NoneResponse:
String statusSample:
$criterionObject = createCriterionObject(123456789, 987654321);
echo $criterionObject->getStatus;
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getText()
Returns the KeywordCriterion's text.
Parameters:
NoneResponse:
String criterionTextSample:
$criterionObject = createCriterionObject(123456789, 987654321);
echo $criterionObject->getText();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getType()
Returns the KeywordCriterion's type.
Parameters:
NoneResponse:
String typeSample:
$criterionObject = createCriterionObject(123456789, 987654321);
echo $criterionObject->getType();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getUrl()
Returns the WebsiteCriterion's URL.
Parameters:
NoneResponse:
String urlSample:
$criterionObject = createCriterionObject(123456789, 987654321);
echo $criterionObject->getUrl();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setDestinationUrl($newDestinationUrl)
Sets the Criterion's new destination URL.
Parameters:
String newDestinationUrlResponse:
NoneSample:
$criterionObject = createCriterionObject(123456789, 987654321);
$criterionObject->setDestinationUrl("http://groups.google.com/group/adwords-api-php");
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setIsNegative($newFlag)
Sets the flag to show if the Criterion is negative.
Parameters:
Boolean newFlagResponse:
NoneSample:
$criterionObject = createCriterionObject(123456789, 987654321);
$criterionObject->setIsNegative(true);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setIsPaused($newFlag)
Sets the flag to show if the Criterion is paused.
Parameters:
Boolean newFlagResponse:
NoneSample:
$criterionObject = createCriterionObject(123456789, 987654321);
$criterionObject->setIsPaused(true);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setLanguage($newLanguage)
Sets a new Criterion language. Please be aware that changing a Criterion's language will destroy its history.
Parameters:
String newLanguageResponse:
NoneSample:
$criterionObject = createCriterionObject(123456789, 987654321);
$criterionObject->setLanguage("fr");
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setMaxCpc($newMaxCpc)
Sets a new Criterion MaxCPC.
Parameters:
Integer newMaxCpcResponse:
NoneSample:
$criterionObject = createCriterionObject(123456789, 987654321);
$criterionObject->setMaxCpc(0.65);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setMaxCpm($newMaxCpm)
Sets a new WebsiteCriterion MaxCPM.
Parameters:
Integer newMaxCpmResponse:
NoneSample:
$criterionObject = createCriterionObject(123456789, 987654321);
$criterionObject->setMaxCpm(0.65);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setText($newText)
Sets a new KeywordCriterion text. Please be aware that renaming a KeywordCriterion will destroy its history.
Parameters:
String newTextResponse:
NoneSample:
$criterionObject = createCriterionObject(123456789, 987654321);
$criterionObject->setText("The new text");
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setType($newType)
Sets a new KeywordCriterion type. Please be aware that changing a KeywordCriterion's type will destroy its history.
Parameters:
String newTypeResponse:
NoneSample:
$criterionObject = createCriterionObject(123456789, 987654321);
$criterionObject->setType("Exact");
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setUrl($newUrl)
Sets the WebsiteCriterion's new URL. Please be aware that changing a WebsiteCriterion's URL will destroy its history.
Parameters:
String newUrlResponse:
NoneSample:
$criterionObject = createCriterionObject(123456789, 987654321);
$criterionObject->setUrl("groups.google.com");
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
toXml()
Returns the Criterion in XML format.
Parameters:
NoneResponse:
String criterionXml // Contains the Criterion in XML formatSample:
$criterionObject = createCriterionObject(123456789, 987654321);
echo htmlspecialchars($criterionObject->toXml());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
Class Operations
addKeywordCriteriaOneByOne($keywordCriteria)
Adds a list of KeywordCriteria to the given AdGroup. Please note: this will
not fail completely even if just one Keyword fails, but the function
causes a lot of SOAP overhead. Parameters:
$keywordCriteria = array(
array(
'text',
'belongsToAdGroupId',
'type',
'isNegative',
'maxCpc',
'language',
'destinationUrl',
{'exemptionRequest'}
)
)Response:
[KeywordCriterion] criterionObjectsSample:
$criterion1 = array(
'text' => "test1",
'belongsToAdGroupId' => 123456789,
'type' => "Broad",
'isNegative' => false,
'maxCpc' => 1.0,
'language' => "de",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$criterion2 = array(
'text' => "test2",
'belongsToAdGroupId' => 123456789,
'type' => "Exact",
'isNegative' => false,
'maxCpc' => 1.0,
'language' => "de",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$criterionObjects = addKeywordCriteriaOnebyOne(array($criterion1, $criterion2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addKeywordCriterion(
$text,
$belongsToAdGroupId,
$type,
$isNegative,
$maxCpc,
$language,
$destinationUrl
)
function addKeywordCriterion(
$text,
$belongsToAdGroupId,
$type,
$isNegative,
$maxCpc,
$language,
$destinationUrl,
$exemptionRequest
)
// Use the above function to upload KeywordCriteria that do not meet the Google Editorial Guidelines.
Adds a KeywordCriterion to the given AdGroup.
Parameters:
String text
Integer belongsToAdGroupId
String type
Boolean isNegative
Integer maxCpc
String language
String destinationUrl // Pass "" if default AdGroup destination URL should be used
{String exemptionRequest} // Required on policy violation.Response:
KeywordCriterion criterionObjectSample:
$criterionObject = addKeywordCriterion(
"test",
123456789,
"Exact",
false,
0.65,
"fr",
"http://groups.google.com/group/adwords-api-php"
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addKeywordCriterionList($keywordCriteria)
Adds a list of KeywordCriteria to the given AdGroup. Please note: this will
fail completely even if just one KeywordCriterion fails, but the function causes
no SOAP overhead. Parameters:
keywordCriteria = array(
array(
'text',
'belongsToAdGroupId',
'type',
'isNegative',
'maxCpc',
'language',
'destinationUrl',
{'exemptionRequest'}
)
)Response:
[KeywordCriterion] criterionObjectsSample:
$criterion1 = array(
'text' => "test1",
'belongsToAdGroupId' => 123456789,
'type' => "Broad",
'isNegative' => false,
'maxCpc' => 1.0,
'language' => "de",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$criterion2 = array(
'text' => "test2",
'belongsToAdGroupId' => 123456789,
'type' => "Exact",
'isNegative' => false,
'maxCpc' => 1.0,
'language' => "de",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$criterionObjects = addKeywordCriterionList(array($criterion1, $criterion2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addWebsiteCriteriaOneByOne($keywords)
Adds a list of WebsiteCriteria to the given AdGroup. Please note: this will
not fail completely even if just one Website fails, but the function
causes a lot of SOAP overhead.Parameters:
websiteCriteria = array(
array(
'url',
'belongsToAdGroupId',
'isNegative',
'maxCpm',
'maxCpc',
'destinationUrl'
)
)Response:
[WebsiteCriterion] criterionObjectsSample:
$criterion1 = array(
'url' => "google.com",
'belongsToAdGroupId' => 123456789,
'isNegative' => false,
'maxCpm' => 0.6,
'maxCpc' => 0,
'destinationUrl' => "http://www.google.com"
);
$criterion2 = array(
'url' => "adwords.com",
'belongsToAdGroupId' => 123456789,
'isNegative' => false,
'maxCpm' => 0.7,
'maxCpc' => 0,
'destinationUrl' => "http://www.adwords.com"
);
$criterionObjects = addWebsiteCriteriaOneByOne(array($criterion1, $criterion2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addWebsiteCriterion(
$url,
$belongsToAdGroupId,
$isNegative,
$maxCpm,
$maxCpc,
$destinationUrl
)
Adds a WebsiteCriterion to the given AdGroup.
Parameters:
String url
Integer belongsToAdGroupId
Boolean isNegative
Integer maxCpm
Integer maxCpc
String destinationUrlResponse:
WebsiteCriterion criterionObjectSample:
$criterionObject = addWebsiteCriterion(
"google.com",
123456789,
false,
0.6,
0,
"http://www.google.com"
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addWebsiteCriterionList($websiteCriteria)
Adds a list of WebsiteCriteria to the given AdGroup. Please note: this will
fail completely even if just one WebsiteCriterion fails, but the function causes
no SOAP overhead. Parameters:
websiteCriteria = array(
array(
'url',
'belongsToAdGroupId',
'isNegative',
'maxCpm',
'maxCpc',
'destinationUrl'
)
)Response:
[WebsiteCriterion] criterionObjectsSample:
$criterion1 = array(
'url' => "google.com",
'belongsToAdGroupId' => 123456789,
'isNegative' => false,
'maxCpm' => 0.6,
'maxCpc' => 0,
'destinationUrl' => "http://www.google.com"
);
$criterion2 = array(
'url' => "adwords.com",
'belongsToAdGroupId' => 123456789,
'isNegative' => false,
'maxCpm' => 0.7,
'maxCpc' => 0,
'destinationUrl' => "http://www.adwords.com"
);
$criterionObjects = addWebsiteCriterionList(array($criterion1, $criterion2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
checkCriterionList($criteria, $languages, $geoTargets)
Checks a list of Criteria for policy errors.
Parameters:
[Criterion] criteria
[String] languages
geoTargets = array(
'countryTargets' => array(
'countries' => array()
),
'regionTargets' => array(
'regions' => array()
),
'metroTargets' => array(
'metros' => array()
),
'cityTargets' => array(
'cities' => array()
),
'proximityTargets' => array(
'circles' => array(
'latitudeMicroDegrees',
'longitudeMicroDegrees',
'radiusMeters'
)
),
'targetAll'
)Response:
[ApiError] criteriaCheckSample:
$criterion1 = array(
'text' => "test1",
'type' => "Broad",
'isNegative' => false,
'maxCpc' => 1.0,
'language' => "de",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$criterion2 = array(
'text' => "test2",
'type' => "Exact",
'isNegative' => false,
'maxCpc' => 1.0,
'language' => "de",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$geoTargets = array(
'countryTargets' => array(
'countries' => array()
),
'regionTargets' => array(
'regions' => array()
),
'metroTargets' => array(
'metros' => array()
),
'cityTargets' => array(
'cities' => array(
"Grenoble, V FR"
)
),
'proximityTargets' => array(
'circles' => array()
)
);
$languages = array('de', 'fr', 'en');
print_r(
checkCriterionList(
array($criterion1, $criterion2),
$languages,
$geoTargets
)
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
createCriterionObject($givenAdGroupId, $givenKeywordId)
Creates a local Criterion object based on an already existing Criterion ID and its Criterion AdGroup ID.
Parameters:
Integer givenAdGroupId
Integer givenKeywordIdResponse:
Criterion keywordObjectSample:
$criterionObject = createCriterionObject(123456789, 987654321);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAllCriteria($adGroupId)
Returns all Criteria of a given AdGroup.
Parameters:
Integer adGroupIdResponse:
[Criterion] allCriterionObjectsSample:
$allCriteria = getAllCriteria(123456789);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCriterionList($adGroupId, $criterionIds)
Returns only the specified Criteria of a certain AdGroup.
Parameters:
Integer adGroupId
[Integer] criterionIdsResponse:
[Criterion] criterionObjectsSample:
$criterionIds = array(123456789, 987654321, 123459876);
$criterionObjects = getCriterionList(123456789, $criterionIds);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCriterionListStats($adGroupId, $criterionIds, $startDate, $endDate)
Returns stats of a list of Criteria in an AdGroup.
Parameters:
Integer adGroupId
[Integer] criterionIds
String startDate
String endDateResponse:
[StatsObject] criterionStatsSample:
$yesterday = gmdate(
"Y-m-d",
mktime(
date("H"),
date("i"),
date("s"),
date("m"),
date("d") - 1,
date("Y")
)
);
$dayBeforeYesterday = gmdate(
"Y-m-d",
mktime(
date("H"),
date("i"),
date("s"),
date("m"),
date("d") - 2,
date("Y")
)
);
$criterionIds = array(123456789, 987654321, 123459876);
$criterionStats = getCriterionListStats(123456789, $criterionIds, $dayBeforeYesterday, $yesterday);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
removeCriterion($criterionObject)
Removes a Criterion and unsets its object variable.
Parameters:
Criterion criterionObjectResponse:
NoneSample:
$criterionObject = createCriterionObject(123456789, 987654321);
removeCriterion($criterionObject);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
removeCriterionList($criterionObjects)
Removes a list of Criteria.
Parameters:
[Criterion] criterionObjectsResponse:
NoneSample:
$criterionIds = array(123456789, 987654321, 123459876);
$criterionObjects = getCriterionList(123456789, $criterionIds);
removeCriterionList($criterionObjects);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
updateCriterionList($criteria)
Updates a list of Criteria.
Parameters:
[Criterion] criteriaResponse:
NoneSample:
$criterion1 = array(
'text' => "test1",
'belongsToAdGroupId' => 123456789,
'type' => "Broad",
'isNegative' => false,
'maxCpc' => 1.0,
'language' => "de",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$criterion2 = array(
'text' => "test2",
'belongsToAdGroupId' => 123456789,
'type' => "Exact",
'isNegative' => false,
'maxCpc' => 1.0,
'language' => "de",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
updateCriterionList(array($criterion1, $criterion2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
Ad.php
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
Object Operations
getAdData() // CommerceAd objects
Returns all the Ad attributes at once.
Parameters:
NoneResponse:
adData = array(
'id',
'belongsToAdGroupId',
'description1',
'description2',
'headline',
'prePriceAnnotation',
'postPriceAnnotation',
'priceString',
'productImage',
'displayUrl',
'destinationUrl',
'status',
'isDisapproved'
);Sample:
$adObject = createAdObject(123456789, 987654321);
print_r($adObject->getAdData());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAdData() // ImageAd object
Returns all the Ad attributes at once.
Parameters:
NoneResponse:
adData = array(
'id',
'belongsToAdGroupId',
'image',
'displayUrl',
'destinationUrl',
'status',
'isDisapproved'
);Sample:
$adObject = createAdObject(123456789, 987654321);
print_r($adObject->getAdData());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAdData() // LocalBusinessAd objects
Returns all the Ad attributes at once.
Parameters:
NoneResponse:
adData = array(
'id',
'belongsToAdGroupId',
'address',
'businessImage',
'businessKey',
'businessName',
'fullBusinessName',
'city',
'countryCode',
'customIcon',
'customIconId',
'description1',
'description2',
'phoneNumber',
'postalCode',
'region',
'stockIcon',
'targetRadiusInKm',
'displayUrl',
'destinationUrl',
'status',
'isDisapproved',
'latitude',
'longitude'
);Sample:
$adObject = createAdObject(123456789, 987654321);
print_r($adObject->getAdData());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAdData() // MobileAd object
Returns all the Ad attributes at once.
Parameters:
NoneResponse:
adData = array(
'id',
'belongsToAdGroupId',
'businessName',
'countryCode',
'description',
'headline',
'markupLanguages',
'mobileCarriers',
'phoneNumber',
'displayUrl',
'destinationUrl',
'status',
'isDisapproved'
);Sample:
$adObject = createAdObject(123456789, 987654321);
print_r($adObject->getAdData());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAdData() // TextAd object
Returns all the Ad attributes at once.
Parameters:
NoneResponse:
adData = array(
'id',
'belongsToAdGroupId',
'headline',
'description1',
'description2',
'displayUrl',
'destinationUrl',
'status',
'isDisapproved'
);Sample:
$adObject = createAdObject(123456789, 987654321);
print_r($adObject->getAdData());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAdData() // VideoAd objects
Returns all the Ad attributes at once.
Parameters:
NoneResponse:
adData = array(
'id',
'belongsToAdGroupId',
'video',
'image',
'name',
'displayUrl',
'destinationUrl',
'status',
'isDisapproved'
);Sample:
$adObject = createAdObject(123456789, 987654321);
print_r($adObject->getAdData());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAdStats($startDate, $endDate)
Returns the statistical data for an Ad during the given period of time.
Parameters:
NoneResponse:
adStats = array(
'averagePosition',
'clicks',
'conversionRate',
'conversions',
'cost',
'id',
'impressions',
'name'
)Sample:
$yesterday = gmdate(
"Y-m-d",
mktime(
date("H"),
date("i"),
date("s"),
date("m"),
date("d") - 1,
date("Y")
)
);
$dayBeforeYesterday = gmdate(
"Y-m-d",
mktime(
date("H"),
date("i"),
date("s"),
date("m"),
date("d") - 2,
date("Y")
)
);
$adObject = createAdObject(123456789, 987654321);
print_r($adObject->getAdStats($dayBeforeYesterday, $yesterday));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAdType()
Returns the Ad's type.
Parameters:
NoneResponse:
String adTypeSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getAdType();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAddress()
Returns the Ad's address.
Parameters:
NoneResponse:
String addressSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getAddress();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getBelongsToAdGroupId()
Returns the AdGroup ID to which the Ad belongs.
Parameters:
NoneResponse:
Integer belongsToAdGroupId // for MySQL use BigIntSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getBelongsToAdGroupId();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getBusinessImage()
Returns the Ad's business image.
Parameters:
NoneResponse:
Image businessImageSample:
$adObject = createAdObject(123456789, 987654321);
print_r($adObject->getBusinessImage());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getBusinessKey()
Returns the Ad's business key.
Parameters:
NoneResponse:
String businessKeySample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getBusinessKey();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getBusinessName()
Returns the Ad's business name.
Parameters:
NoneResponse:
String businessNameSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getBusinessName();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCity()
Returns the Ad's city.
Parameters:
NoneResponse:
String citySample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getCity();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCountryCode()
Returns the Ad's country code.
Parameters:
NoneResponse:
String countryCodeSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getCountryCode();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCustomIcon()
Returns the Ad's custom icon.
Parameters:
NoneResponse:
Image customIconSample:
$adObject = createAdObject(123456789, 987654321);
print_r($adObject->getCustomIcon());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCustomIconId()
Returns the Ad's custom icon ID.
Parameters:
NoneResponse:
Integer customIconIdSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getCustomIconId();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getDescription()
Returns the Ad's description.
Parameters:
NoneResponse:
String descriptionSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getDescription();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getDescription1()
Returns the Ad's description1.
Parameters:
NoneResponse:
String description1Sample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getDescription1();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getDescription2()
Returns the Ad's description2.
Parameters:
NoneResponse:
String description2Sample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getDescription2();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getDestinationUrl()
Returns the Ad's destination URL.
Parameters:
NoneResponse:
String destinationUrlSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getDestinationUrl();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getDisplayUrl()
Returns the Ad's display URL.
Parameters:
NoneResponse:
String displayUrlSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getDisplayUrl();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getFullBusinessName()
Returns the Ad's full business name.
Parameters:
NoneResponse:
String fullBusinessNameSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getFullBusinessName();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getHeadline()
Returns the Ad's headline.
Parameters:
NoneResponse:
String headlineSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getHeadline();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getId()
Returns the Ad's ID.
Parameters:
NoneResponse:
Integer id // for MySQL use BigIntSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getId();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getImage()
Returns the Ad's image.
Parameters:
NoneResponse:
Image imageSample:
$adObject = createAdObject(123456789, 987654321);
print_r($adObject->getImage());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getIsDisapproved()
Returns if the Ad is disapproved.
Parameters:
NoneResponse:
Boolean isDisapprovedSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getIsDisapproved();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getLatitude()
Returns the Ad's latitude.
Parameters:
NoneResponse:
String latitudeSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getLatitude();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getLongitude()
Returns the Ad's longitude.
Parameters:
NoneResponse:
String longitudeSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getLongitude();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getMarkupLanguages()
Returns the Ad's markup languages.
Parameters:
NoneResponse:
[String] markupLanguagesSample:
$adObject = createAdObject(123456789, 987654321);
print_r($adObject->getMarkupLanguages());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getMobileCarriers()
Returns the Ad's mobile carriers.
Parameters:
NoneResponse:
[String] mobileCarriersSample:
$adObject = createAdObject(123456789, 987654321);
print_r($adObject->getMobileCarriers());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getName()
Returns the Ad's name.
Parameters:
NoneResponse:
String nameSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getName();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getPhoneNumber()
Returns the Ad's phone number.
Parameters:
NoneResponse:
String phoneNumberSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getPhoneNumber();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getPostPriceAnnotation()
Returns the Ad's post-price annotation.
Parameters:
NoneResponse:
String postPriceAnnotationSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getPostPriceAnnotation();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getPostalCode()
Returns the Ad's postal code.
Parameters:
NoneResponse:
String postalCodeSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getPostalCode();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getPrePriceAnnotation()
Returns the Ad's pre-price annotation.
Parameters:
NoneResponse:
String prePriceAnnotationSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getPrePriceAnnotation();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getPriceString()
Returns the Ad's price string.
Parameters:
NoneResponse:
String priceStringSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getPriceString();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getProductImage()
Returns the Ad's product image.
Parameters:
NoneResponse:
Image productImageSample:
$adObject = createAdObject(123456789, 987654321);
print_r($adObject->getProductImage());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getRegion()
Returns the Ad's region.
Parameters:
NoneResponse:
String regionSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getRegion();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getStatus()
Returns the Ad's status.
Parameters:
NoneResponse:
String statusSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getStatus();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getStockIcon()
Returns the Ad's stock icon.
Parameters:
NoneResponse:
String stockIconSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getStockIcon();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getTargetRadiusInKm()
Returns the Ad's target radius in kilometers.
Parameters:
NoneResponse:
String targetRadiusSample:
$adObject = createAdObject(123456789, 987654321);
echo $adObject->getTargetRadiusInKm();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getVideo()
Returns the Ad's video.
Parameters:
NoneResponse:
Video videoSample:
$adObject = createAdObject(123456789, 987654321);
print_r($adObject->getVideo());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setDescription1 ($newDescription1)
Sets the Ad's description1.
Parameters:
String description1Response:
NoneSample:
$adObject = createAdObject(123456789, 987654321);
$adObject->setDescription1 ("The new description1");
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setDescription2 ($newDescription2)
Sets the Ad's description2.
Parameters:
String description2Response:
NoneSample:
$adObject = createAdObject(123456789, 987654321);
$adObject->setDescription2 ("The new description2");
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setDestinationUrl ($newDestinationUrl)
Sets the Ad's destination URL.
Parameters:
String destinationUrlResponse:
NoneSample:
$adObject = createAdObject(123456789, 987654321);
$adObject->setDestinationUrl("http://groups.google.com/group/adwords-api-php");
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setDisplayUrl ($newDisplayUrl)
Sets the Ad's display URL.
Parameters:
String displayUrlResponse:
NoneSample:
$adObject = createAdObject(123456789, 987654321);
$adObject->setDisplayUrl ("http://groups.google.com/group/adwords-api-php");
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setHeadline ($newHeadline)
Sets the Ad's headline.
Parameters:
String headlineResponse:
NoneSample:
$adObject = createAdObject(123456789, 987654321);
$adObject->setHeadline ("The new headline");
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
setStatus ($newStatus)
Sets the Ad's status.
Parameters:
String statusResponse:
NoneSample:
$adObject = createAdObject(123456789, 987654321);
$adObject->setStatus ("Paused");
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
toXml()
Returns the Ad in XML format.
Parameters:
NoneResponse:
String Xml // Contains the Ad in XML formatSample:
$adObject = createAdObject(123456789, 987654321);
echo htmlspecialchars($adObject->toXml());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
Class Operations
addCommerceAd(
$belongsToAdGroupId,
$description1,
$description2,
$headline,
$postPriceAnnotation,
$prePriceAnnotation,
$priceString,
$productImageLocation,
$status,
$displayUrl,
$destinationUrl
)
Adds a Commerce Ad to the given AdGroup.
Parameters:
Integer belongsToAdGroupId
String description1
String description2
String headline
String prePriceAnnotation
String postPriceAnnotation
String priceString
String productImageLocation
String status
String displayUrl
String destinationUrlResponse:
Ad adObjectSample:
$commerceAd = addCommerceAd(
123456789,
"Description 1",
"Description 2",
"Headline",
"pre-price",
"post-price",
"price",
"TestSuite_CommerceAd.gif",
"Enabled",
"http://groups.google.com",
"http://groups.google.com/group/adwords-api-php"
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addCommerceAdList($ads)
Adds a list of Commerce Ads to the given AdGroup. This will fail completely even if just one Ad fails, but the function causes no SOAP overhead.
Parameters:
ads = array(
array(
'belongsToAdGroupId',
'description1',
'description2',
'headline',
'prePriceAnnotation',
'postPriceAnnotation',
'priceString',
'productImageLocation',
'status',
'displayUrl',
'destinationUrl'
)
)Response:
[Ad] adObjectsSample:
$commerceAd1 = array(
'belongsToAdGroupId' => 123456789,
'description1' => "Description 1",
'description2' => "Description 2",
'headline' => "Headline1",
'prePriceAnnotation' => "pre-price",
'postPriceAnnotation' => "post-price",
'priceString' => "price",
'productImageLocation' => "TestSuite_CommerceAd.gif",
'status' => "Enabled",
'displayUrl' => "http://groups.google.com",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$commerceAd2 = array(
'belongsToAdGroupId' => 123456789,
'description1' => "Description 1",
'description2' => "Description 2",
'headline' => "Headline2",
'prePriceAnnotation' => "pre-price",
'postPriceAnnotation' => "post-price",
'priceString' => "price",
'productImageLocation' => "TestSuite_CommerceAd.gif",
'status' => "Enabled",
'displayUrl' => "http://groups.google.com",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$commerceAds = addCommerceAdList(array($commerceAd1, $commerceAd2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addCommerceAdsOneByOne($ads)
Adds a list of Commerce Ads to the given AdGroup. This will not fail completely if just one Ad fails, but the function causes a lot of SOAP overhead.
Parameters:
ads = array(
array(
'belongsToAdGroupId',
'description1',
'description2',
'headline',
'prePriceAnnotation',
'postPriceAnnotation',
'priceString',
'productImageLocation',
'status',
'displayUrl',
'destinationUrl'
)
)Response:
[Ad] adObjectsSample:
$commerceAd1 = array(
'belongsToAdGroupId' => 123456789,
'description1' => "Description 1",
'description2' => "Description 2",
'headline' => "Headline1",
'prePriceAnnotation' => "pre-price",
'postPriceAnnotation' => "post-price",
'priceString' => "price",
'productImageLocation' => "TestSuite_CommerceAd.gif",
'status' => "Enabled",
'displayUrl' => "http://groups.google.com",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$commerceAd2 = array(
'belongsToAdGroupId' => 123456789,
'description1' => "Description 1",
'description2' => "Description 2",
'headline' => "Headline2",
'prePriceAnnotation' => "pre-price",
'postPriceAnnotation' => "post-price",
'priceString' => "price",
'productImageLocation' => "TestSuite_CommerceAd.gif",
'status' => "Enabled",
'displayUrl' => "http://groups.google.com",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$commerceAds = addCommerceAdsOneByOne(array($commerceAd1, $commerceAd2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addImageAd(
$belongsToAdGroupId,
$imageLocation,
$name,
$status,
$displayUrl,
$destinationUrl
)
Adds an Image Ad to the given AdGroup.
Parameters:
Integer belongsToAdGroupId
String imageLocation // Pass [image URL] XOR [path]+[fileName] RELATIVE to your web server's root folder (often called "htdocs")
String name
String status
String displayUrl
String destinationUrlResponse:
Ad adObjectSample:
$imageAd = addImageAd(
123456789,
"Creative-TestSuite_Banner.jpg",
"Test",
"Enabled",
"http://groups.google.com/group/adwords-api-php",
"http://groups.google.com/group/adwords-api-php"
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addImageAdList($ads)
Adds a list of Image Ads to the given AdGroup. This will fail completely even if just one Ad fails, but the function causes no SOAP overhead.
Parameters:
ads = array(
array(
'belongsToAdGroupId',
'imageLocation',
'name',
'status',
'displayUrl',
'destinationUrl'
)
)Response:
[Ad] adObjectsSample:
$imageAd1 = array(
'belongsToAdGroupId' => 123456789,
'imageLocation' => "Creative-TestSuite_Banner.jpg",
'name' => "Test1",
'status' => "Enabled",
'displayUrl' => "http://groups.google.com/group/adwords-api-php",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$imageAd2 = array(
'belongsToAdGroupId' => 123456789,
'imageLocation' => "Creative-TestSuite_Banner.jpg",
'name' => "Test2",
'status' => "Enabled",
'displayUrl' => "http://groups.google.com/group/adwords-api-php",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$imageAds = addImageAdList(array($imageAd1, $imageAd2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addImageAdsOneByOne($ads)
Adds a list of Image Ads to the given AdGroup. This will not fail completely if just one Ad fails, but the function causes a lot of SOAP overhead.
Parameters:
ads = array(
array(
'belongsToAdGroupId',
'imageLocation',
'name',
'status',
'displayUrl',
'destinationUrl'
)
)Response:
[Ad] adObjectsSample:
$imageAd1 = array(
'belongsToAdGroupId' => 123456789,
'imageLocation' => "Creative-TestSuite_Banner.jpg",
'name' => "Test1",
'status' => "Enabled",
'displayUrl' => "http://groups.google.com/group/adwords-api-php",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$imageAd2 = array(
'belongsToAdGroupId' => 123456789,
'imageLocation' => "Creative-TestSuite_Banner.jpg",
'name' => "Test2",
'status' => "Enabled",
'displayUrl' => "http://groups.google.com/group/adwords-api-php",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$imageAds = addImageAdsOneByOne(array($imageAd1, $imageAd2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addLocalBusinessAd(
$belongsToAdGroupId,
$address,
$businessImageLocation,
$businessKey,
$businessName,
$city,
$countryCode,
$customIconLocation,
$customIconId,
$description1,
$description2,
$phoneNumber,
$postalCode,
$region,
$stockIcon,
$targetRadiusInKm,
$status,
$displayUrl,
$destinationUrl,
$exemptionRequest = false
)
Adds a Local Business Ad to the given AdGroup.
Parameters:
Integer belongsToAdGroupId
String address
String businessImageLocation
String businessKey
String businessName
String city
String countryCode
{String customIconLocation} // XOR customIconId XOR stockIcon
{Integer customIconId} // XOR stockIcon XOR customIconLocation
String description1
String description2
String phoneNumber
String postalCode
String region
{String stockIcon} // XOR customIconId XOR customIconLocation
Integer targetRadiusInKm
String status
String displayUrl
String destinationUrl
{String exemptionRequest} // Required on policy violation.Response:
Ad adObjectSample:
$localBusinessAd = addLocalBusinessAd(
123456789,
'ABC Street 123',
'./TestSuite_LocalBusinessAd.gif',
'Some!Cryptic!Business!Key!Assigned!To!Your!Business',
'Your Business Name',
'Mountain View',
'US',
null,
null,
'Your Description 1',
'Your Description 2',
'123 456 789',
'12345',
'Bay Area',
'Standard_1',
16.09344,
'Enabled',
'www.google-apility.sourceforge.net',
'http://www.google-apility.sourceforge.net/'
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addLocalBusinessAdList($ads)
Adds a list of Local Business Ads to the given AdGroup. This will fail completely even if just one Ad fails, but the function causes no SOAP overhead.
Parameters:
ads = array(
array(
'belongsToAdGroupId',
'address',
'businessImageLocation',
'businessKey',
'businessName',
'city',
'countryCode',
'customIconLocation',
'customIconId',
'description1',
'description2',
'phoneNumber',
'postalCode',
'region',
'stockIcon',
'targetRadiusInKm',
'status',
'displayUrl',
'destinationUrl',
{'exemptionRequest'}
)
)Response:
[Ad] adObjectsSample:
$ad1 = array(
'belongsToAdGroupId' => 123456789,
'address' => 'ABC Street 123',
'businessImageLocation' => './TestSuite_LocalBusinessAd1.gif',
'businessKey' => 'Some!Cryptic!Business!Key!Assigned!To!Your!Business 1',
'businessName' => 'Your Business Name 1',
'city' => 'Mountain View',
'countryCode' => 'US',
'customIconLocation' => null,
'customIconId' => null,
'description1' => 'Your Description 1',
'description2' => 'Your Description 2',
'phoneNumber' => '123 456 789',
'postalCode' => '12345',
'region' => 'Bay Area',
'stockIcon' => 'Standard_1',
'targetRadiusInKm' => 16.09344,
'status' => 'Enabled',
'displayUrl' => 'www.google-apility.sourceforge.net',
'destinationUrl' => 'http://www.google-apility.sourceforge.net/'
);
$ad2 = array(
'belongsToAdGroupId' => 123456789,
'address' => 'XYZ Street 321',
'businessImageLocation' => './TestSuite_LocalBusinessAd2.gif',
'businessKey' => 'Some!Cryptic!Business!Key!Assigned!To!Your!Business 2',
'businessName' => 'Your Business Name 2',
'city' => 'Mountain View',
'countryCode' => 'US',
'customIconLocation' => null,
'customIconId' => null,
'description1' => 'Your Description 1',
'description2' => 'Your Description 2',
'phoneNumber' => '987 654 321',
'postalCode' => '54321',
'region' => 'Bay Area',
'stockIcon' => 'Standard_2',
'targetRadiusInKm' => 16.09344,
'status' => 'Enabled',
'displayUrl' => 'www.google-apility.sourceforge.net',
'destinationUrl' => 'http://www.google-apility.sourceforge.net/'
);
$localBusinessAds = addLocalBusinessAdList(array($ad1, $ad2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addLocalBusinessAdsOneByOne($ads)
Adds a list of Local Business Ads to the given AdGroup. This will not fail completely if just one Ad fails, but the function causes a lot of SOAP overhead.
Parameters:
ads = array(
array(
'belongsToAdGroupId',
'address',
'businessImageLocation',
'businessKey',
'businessName',
'city',
'countryCode',
'customIconLocation',
'customIconId',
'description1',
'description2',
'phoneNumber',
'postalCode',
'region',
'stockIcon',
'targetRadiusInKm',
'status',
'displayUrl',
'destinationUrl',
{'exemptionRequest'}
)
)Response:
[Ad] adObjectsSample:
$ad1 = array(
'belongsToAdGroupId' => 123456789,
'address' => 'ABC Street 123',
'businessImageLocation' => './TestSuite_LocalBusinessAd1.gif',
'businessKey' => 'Some!Cryptic!Business!Key!Assigned!To!Your!Business 1',
'businessName' => 'Your Business Name 1',
'city' => 'Mountain View',
'countryCode' => 'US',
'customIconLocation' => null,
'customIconId' => null,
'description1' => 'Your Description 1',
'description2' => 'Your Description 2',
'phoneNumber' => '123 456 789',
'postalCode' => '12345',
'region' => 'Bay Area',
'stockIcon' => 'Standard_1',
'targetRadiusInKm' => 16.09344,
'status' => 'Enabled',
'displayUrl' => 'www.google-apility.sourceforge.net',
'destinationUrl' => 'http://www.google-apility.sourceforge.net/'
);
$ad2 = array(
'belongsToAdGroupId' => 123456789,
'address' => 'XYZ Street 321',
'businessImageLocation' => './TestSuite_LocalBusinessAd2.gif',
'businessKey' => 'Some!Cryptic!Business!Key!Assigned!To!Your!Business 2',
'businessName' => 'Your Business Name 2',
'city' => 'Mountain View',
'countryCode' => 'US',
'customIconLocation' => null,
'customIconId' => null,
'description1' => 'Your Description 1',
'description2' => 'Your Description 2',
'phoneNumber' => '987 654 321',
'postalCode' => '54321',
'region' => 'Bay Area',
'stockIcon' => 'Standard_2',
'targetRadiusInKm' => 16.09344,
'status' => 'Enabled',
'displayUrl' => 'www.google-apility.sourceforge.net',
'destinationUrl' => 'http://www.google-apility.sourceforge.net/'
);
$localBusinessAds = addLocalBusinessAdsOneByOne(array($ad1, $ad2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addMobileAd(
$belongsToAdGroupId,
$businessName,
$countryCode,
$description,
$headline,
$markupLanguages,
$mobileCarriers,
$phoneNumber,
$status,
$displayUrl,
$destinationUrl,
$exemptionRequest = false
)
Adds a Mobile Ad to the given AdGroup.
Parameters:
Integer belongsToAdGroupId
String businessName
String countryCode
String description
String headline
[String] markupLanguages
[String] mobileCarriers
String phoneNumber
String status
String displayUrl
String destinationUrl
String {exemptionRequest} // Required on policy violation.Response:
Ad adObjectSample:
$mobileAd = addMobileAd(
123456789,
"Test Business Inc.",
"US",
"Test Business Description",
"Test Business Headline",
array("XHTML"),
array("Cingular@US"),
"800-123-4567",
"Enabled",
"http://groups.google.com/group/adwords-api-php",
"http://groups.google.com/group/adwords-api-php"
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addMobileAdList($ads)
Adds a list of Mobile Ads to the given AdGroup. This will fail completely even if just one Ad fails, but the function causes no SOAP overhead.
Parameters:
ads = array(
array(
'belongsToAdGroupId',
'businessName',
'countryCode',
'description',
'headline',
'markupLanguages',
'mobileCarriers',
'phoneNumber',
'status',
'displayUrl',
'destinationUrl',
'{exemptionRequest}' // Required on policy violation.
)
)Response:
[Ad] adObjectsSample:
$ad1 = array(
'belongsToAdGroupId' => 123456789,
'businessName' => "Test Business 1 Inc.",
'countryCode' => "US",
'description' => "Test Business 1 Description",
'headline' => "Test Business 1 Headline",
'markupLanguages' => array("XHTML"),
'mobileCarriers' => array("Cingular@US"),
'phoneNumber' => "800-123-4567",
'status' => "Enabled",
'displayUrl' => "http://groups.google.com/group/adwords-api-php",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$ad2 = array(
'belongsToAdGroupId' => 123456789,
'businessName' => "Test Business 2 Inc.",
'countryCode' => "US",
'description' => "Test Business 2 Description",
'headline' => "Test Business 2 Headline",
'markupLanguages' => array("XHTML"),
'mobileCarriers' => array("Cingular@US"),
'phoneNumber' => "800-123-5678",
'status' => "Enabled",
'displayUrl' => "http://groups.google.com/group/adwords-api-php",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$mobileAds = addMobileAdList(array($ad1, $ad2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addMobileAdsOneByOne($ads)
Adds a list of Mobile Ads to the given AdGroup. This will not fail completely if just one Ad fails, but the function causes a lot of SOAP overhead.
Parameters:
ads = array(
array(
'belongsToAdGroupId',
'businessName',
'countryCode',
'description',
'headline',
'markupLanguages',
'mobileCarriers',
'phoneNumber',
'status',
'displayUrl',
'destinationUrl',
'{exemptionRequest}' // Required on policy violation.
)
)Response:
[Ad] adObjectsSample:
$ad1 = array(
'belongsToAdGroupId' => 123456789,
'businessName' => "Test Business 1 Inc.",
'countryCode' => "US",
'description' => "Test Business 1 Description",
'headline' => "Test Business 1 Headline",
'markupLanguages' => array("XHTML"),
'mobileCarriers' => array("Cingular@US"),
'phoneNumber' => "800-123-4567",
'status' => "Enabled",
'displayUrl' => "http://groups.google.com/group/adwords-api-php",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$ad2 = array(
'belongsToAdGroupId' => 123456789,
'businessName' => "Test Business 2 Inc.",
'countryCode' => "US",
'description' => "Test Business 2 Description",
'headline' => "Test Business 2 Headline",
'markupLanguages' => array("XHTML"),
'mobileCarriers' => array("Cingular@US"),
'phoneNumber' => "800-123-5678",
'status' => "Enabled",
'displayUrl' => "http://groups.google.com/group/adwords-api-php",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$mobileAds = addMobileAdsOneByOne(array($ad1, $ad2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addMobileImageAd(
$belongsToAdGroupId,
$imageLocation,
$markupLanguages,
$mobileCarriers,
$status,
$displayUrl,
$destinationUrl,
$exemptionRequest = false
)
Adds a Mobile Image Ad to the given AdGroup.
Parameters:
Integer belongsToAdGroupId
String imageLocation
[String] markupLanguages
[String] mobileCarriers
String status
String displayUrl
String destinationUrl
String {exemptionRequest} // Required on policy violation.Response:
Ad adObjectSample:
$mobileImageAd = addMobileAd(
123456789,
"192x53.gif"
array("XHTML"),
array("Cingular@US"),
"Enabled",
"www.google.com",
"http://google.com/"
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addMobileImageAdList($ads)
Adds a list of Mobile Image Ads to the given AdGroup. This will fail completely even if just one Ad fails, but the function causes no SOAP overhead.
Parameters:
ads = array(
array(
'belongsToAdGroupId',
'imageLocation'
'markupLanguages',
'mobileCarriers',
'status',
'displayUrl',
'destinationUrl',
'{exemptionRequest}' // Required on policy violation.
)
)Response:
[Ad] adObjectsSample:
$ad1 = array(
'belongsToAdGroupId' => 123456789,
'imageLocation' => "192x53_1.gif",
'markupLanguages' => array("XHTML"),
'mobileCarriers' => array("Cingular@US"),
'status' => "Enabled",
'displayUrl' => "http://groups.google.com/group/adwords-api-php",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$ad2 = array(
'belongsToAdGroupId' => 123456789,
'imageLocation' => "192x53_1.gif",
'markupLanguages' => array("XHTML"),
'mobileCarriers' => array("Cingular@US"),
'status' => "Enabled",
'displayUrl' => "http://groups.google.com/group/adwords-api-php",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$mobileAds = addMobileImageAdList(array($ad1, $ad2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addMobileImageAdsOneByOne($ads)
Adds a list of Mobile Image Ads to the given AdGroup. This will not fail completely if just one Ad fails, but the function causes a lot of SOAP overhead.
Parameters:
ads = array(
array(
'belongsToAdGroupId',
'imageLocation',
'markupLanguages',
'mobileCarriers',
'status',
'displayUrl',
'destinationUrl',
'{exemptionRequest}' // Required on policy violation.
)
)Response:
[Ad] adObjectsSample:
$ad1 = array(
'belongsToAdGroupId' => 123456789,
'imageLocation' => "192x53_1.gif",
'markupLanguages' => array("XHTML"),
'mobileCarriers' => array("Cingular@US"),
'status' => "Enabled",
'displayUrl' => "http://groups.google.com/group/adwords-api-php",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$ad2 = array(
'belongsToAdGroupId' => 123456789,
'imageLocation' => "192x53_2.gif",
'markupLanguages' => array("XHTML"),
'mobileCarriers' => array("Cingular@US"),
'status' => "Enabled",
'displayUrl' => "http://groups.google.com/group/adwords-api-php",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$mobileAds = addMobileImageAdsOneByOne(array($ad1, $ad2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addTextAd(
$belongsToAdGroupId,
$headline,
$description1,
$description2,
$status,
$displayUrl,
$destinationUrl,
$exemptionRequest = false
)
Adds a Text Ad to the given AdGroup.
Parameters:
Integer belongsToAdGroupId
String headline
String description1
String description2
String status
String displayUrl
String destinationUrl
{exemptionRequest} // Required on policy violation.Response:
Ad adObjectSample:
$adObject = addTextAd(
123456789,
"The headline",
"The description1",
"The description2",
"Enabled",
"http://groups.google.com/group/adwords-api-php",
"http://groups.google.com/group/adwords-api-php"
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addTextAdList($ads)
Adds a list of Text Ads to the given AdGroup. This will fail completely even if just one Ad fails, but the function causes no SOAP overhead.
Parameters:
ads = array(
array(
'belongsToAdGroupId',
'headline',
'description1',
'description2',
'status',
'displayUrl',
'destinationUrl',
{'exemptionRequest'}
)
)Response:
[Ad] adObjectsSample:
$ad1 = array(
'belongsToAdGroupId' => 123456789,
'headline' => "The first headline",
'description1' => "The first description1",
'description2' => "The first description2",
'status' => "Enabled",
'displayUrl' => "http://groups.google.com/group/adwords-api-php",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$ad2 = array(
'belongsToAdGroupId' => 123456789,
'headline' => "The second headline",
'description1' => "The second description1",
'description2' => "The second description2",
'status' => "Enabled",
'displayUrl' => "http://groups.google.com/group/adwords-api-php",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$adObjects = addTextAdList(array($ad1, $ad2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addTextAdsOneByOne($ads)
Adds a list of TextAds to the given AdGroup. This will not fail completely if just one Ad fails, but the function causes a lot of SOAP overhead.
Parameters:
ads = array(
array(
'belongsToAdGroupId',
'headline',
'description1',
'description2',
'status',
'displayUrl',
'destinationUrl',
{'exemptionRequest'}
)
)Response:
[Ad] adObjectsSample:
$ad1 = array(
'belongsToAdGroupId' => 123456789,
'headline' => "The first headline",
'description1' => "The first description1",
'description2' => "The first description2",
'status' => "Enabled",
'displayUrl' => "http://groups.google.com/group/adwords-api-php",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$ad2 = array(
'belongsToAdGroupId' => 123456789,
'headline' => "The second headline",
'description1' => "The second description1",
'description2' => "The second description2",
'status' => "Enabled",
'displayUrl' => "http://groups.google.com/group/adwords-api-php",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$adObjects = addTextAdsOneByOne(array($ad1, $ad2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
addVideoAd(
$belongsToAdGroupId,
$imageLocation,
$name,
$video,
$displayUrl,
$destinationUrl,
$status,
$exemptionRequest = false,
)
Adds a Video Ad to the given AdGroup.
Parameters:
Integer belongsToAdGroupId
String imageLocation
String name
Video video
String displayUrl
String destinationUrl
String status
{exemptionRequest} // Required on policy violation.Response:
Ad adObjectSample:
$videos = getMyVideos();
$adObject = addVideoAd(
123456789,
"./image.jpg",
"The Name",
$video[0],
"http://groups.google.com/group/adwords-api-php",
"http://groups.google.com/group/adwords-api-php",
"Enabled"
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
checkAdList($adObjects, $languages, $geoTargets)
Checks a batch of Ads for policy errors. The number of Ads in the batch is limited to the maximum number of Ads per adgroup.
Parameters:
[Ad] ads
[String] languages
geoTargets = array(
'countryTargets' => array(
'countries' => array()
),
'regionTargets' => array(
'regions' => array()
),
'metroTargets' => array(
'metros' => array()
),
'cityTargets' => array(
'cities' => array()
),
'proximityTargets' => array(
'circles' => array(
'latitudeMicroDegrees',
'longitudeMicroDegrees',
'radiusMeters'
)
),
'targetAll' =>
)Response:
[ApiError] adsCheckSample:
$ad1 = array(
'headline' => "The first headline",
'description1' => "The first description1",
'description2' => "The first description2",
'status' => "Enabled",
'displayUrl' => "http://groups.google.com/group/adwords-api-php",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$ad2 = array(
'headline' => "The second headline",
'description1' => "The second description1",
'description2' => "The second description2",
'status' => "Enabled",
'displayUrl' => "http://groups.google.com/group/adwords-api-php",
'destinationUrl' => "http://groups.google.com/group/adwords-api-php"
);
$adObjects = array($ad1, $ad2);
$geoTargets = array(
'countryTargets' => array(
'countries' => array()
),
'regionTargets' => array(
'regions' => array()
),
'metroTargets' => array(
'metros' => array()
),
'cityTargets' => array(
'cities' => array("Grenoble, V FR")
),
'proximityTargets' => array(
'circles' => array()
)
);
$languages = array('de', 'fr', 'en');
print_r(checkAdList($adObjects, $languages, $geoTargets));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
createAdObject($givenAdGroupId, $givenAdId)
Creates a local Ad object based on the Ad's AdGroup ID and the Ad's ID.
Parameters:
Integer givenAdGroupId
Integer givenAdIdResponse:
Ad adObjectSample:
print_r(createAdObject(123456789, 987654321));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
findBusinesses($name, $address, $countryCode)
Searches for businesses with similar attributes. This call is similar to querying Google Local Search.
Parameters:
String name
String address
String countryCodeResponse:
[Business] businessesSample:
print_r(findBusinesses('Farmacia', 'Barcelona', 'ES'));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getActiveAds($adGroupIds)
Returns all active Ads of a given list of AdGroups.
Parameters:
[Integer] adGroupIdsResponse:
[Ad] adObjectsSample:
$allAds = getActiveAds(array(123456789));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAllAds($adGroupIds)
Returns all Ads of a given list of AdGroups.
Parameters:
[Integer] adGroupIdsResponse:
[Ad] adObjectsSample:
$allAds = getAllAds(array(123456789));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getMyBusinesses()
Returns the list of businesses registered to the user in the Local Business Center. The user is determined by the clientEmail header if it is specified. Otherwise, the email header is used instead.
Parameters:
NoneResponse:
[Business] myBusinessesSample:
print_r(getMyBusinesses());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getMyVideos()
Returns a list of all videos stored under the users account. The user is determined by the clientEmail if specified. Otherwise, the email header is used.
Parameters:
NoneResponse:
[Video] videosSample:
$myVideos = getMyVideos();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
removeAd($adObject)
Removes an Ad and unsets its local object variable.
Parameters:
Ad adObjectResponse:
noneSample:
$adObject = createAdObject(123456789, 987654321);
$adObject->removeAd($adObject);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
Report.php
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
deleteReport($reportJobId)
Deletes a previously scheduled report job with the given ID.
Parameters:
Integer reportJobIdResponse:
NoneSample:
$allReportJobs = getAllJobs();
foreach($allReportJobs as $reportJob) {
deleteReport($reportJob['Id']);
}
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
downloadTsvReport($reportId)
Returns a report in TSV format (Excel readable) for a given Report ID. Use this function when you already know the Report's ID, for example to download an already existing Report once more.
Parameters:
Integer reportIdResponse:
String tsvReport // Contains the report in TSV file formatSample:
$tsvReport = downloadTsvReport(12345);
echo $tsvReport;
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
downloadXmlReport($reportId)
Returns a report in XML format for a given Report ID. Use this function when you already know the Report's ID, for example to download an already existing Report once more.
Parameters:
Integer reportIdResponse:
String xmlReport // Contains the report in XML file formatSample:
$xmlReport = downloadXmlReport(12345);
echo $xmlReport;
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAccountStructureTsvReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst,
$onlyReturnDownloadUrl
)
An Account Structure report lets you view attribute data from your account. This report type provides a convenient way for you retrieve all data unrelated to performance in one report.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportTsvSample:
echo getAccountStructureTsvReport(
'Report Name',
'2006-09-01',
'2007-09-01',
array('AdGroup', 'AdGroupId'),
array('AdGroup'),
array(),
array(),
array(),
array(),
array(),
array(),
'',
'',
false,
array(),
false,
30,
false
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAccountStructureXmlReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst,
$onlyReturnDownloadUrl
)
An Account Structure report lets you view attribute data from your account. This report type provides a convenient way for you retrieve all data unrelated to performance in one report.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportXmlSample:
echo getAccountStructureXmlReport(
'Report Name',
'2006-09-01',
'2007-09-01',
array('AdGroup', 'AdGroupId'),
array('AdGroup'),
array(),
array(),
array(),
array(),
array(),
array(),
'',
'',
false,
array(),
false,
30,
false
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAccountTsvReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst
$onlyReturnDownloadUrl
)
Gets an Account performance report. An Account performance report lets you view data about how your account is performing.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportTsvSample:
echo getAccountTsvReport(
'Report Name',
'2006-09-01',
'2007-09-01',
array('CustomerName'),
array('Weekly'),
array(),
array(),
array(),
array(),
array(),
array(),
'',
'',
false,
array(),
false,
30,
false
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAccountXmlReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst
$onlyReturnDownloadUrl
)
Gets an Account performance report. An Account performance report lets you view data about how your account is performing.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportXmlSample:
echo getAccountXmlReport(
'Report Name',
'2006-09-01',
'2007-09-01',
array('CustomerName'),
array('Weekly'),
array(),
array(),
array(),
array(),
array(),
array(),
'',
'',
false,
array(),
false,
30,
false
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAdGroupTsvReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst,
$onlyReturnDownloadUrl
)
Gets an AdGroup performance report. An AdGroup performance report lets you view data about how your AdGroups are performing.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportTsvSample:
echo getAdGroupTsvReport(
'Report Name',
'2006-09-01',
'2007-09-01',
array('AdGroup', 'AdGroupId'),
array('Weekly'),
array(),
array(),
array(),
array(),
array(),
array(),
'',
'',
false,
array(),
false,
30,
false
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAdGroupXmlReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst,
$onlyReturnDownloadUrl
)
Gets an AdGroup performance report. An AdGroup performance report lets you view data about how your AdGroups are performing.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportXmlSample:
echo getAdGroupXmlReport(
'Report Name',
'2006-09-01',
'2007-09-01',
array('AdGroup', 'AdGroupId'),
array('Weekly'),
array(),
array(),
array(),
array(),
array(),
array(),
'',
'',
false,
array(),
false,
30,
false
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAllJobs()
Returns all report jobs scheduled by the current user.
Parameters:
NoneResponse:
[ReportJob] allReportJobsSample:
print_r(getAllJobs());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCampaignTsvReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst,
$onlyReturnDownloadUrl
)
Gets a Campaign performance report. A Campaign performance report lets you view data about how your campaigns are performing.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportTsvSample:
echo getCampaignTsvReport(
'Report Name',
'2006-09-01',
'2007-09-01',
array('Campaign', 'CampaignId'),
array('Weekly'),
array(),
array(),
array(),
array(),
array(),
array(),
'',
'',
false,
array(),
false,
30,
false
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCampaignXmlReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst,
$onlyReturnDownloadUrl
)
Gets a Campaign performance report. A Campaign performance report lets you view data about how your campaigns are performing.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportXmlSample:
echo getCampaignXmlReport(
'Report Name',
'2006-09-01',
'2007-09-01',
array('Campaign', 'CampaignId'),
array('Weekly'),
array(),
array(),
array(),
array(),
array(),
array(),
'',
'',
false,
array(),
false,
30,
false
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getContentPlacementTsvReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst,
$onlyReturnDownloadUrl
)
A Placement Performance report shows performance statistics for your ads on specific domains and URLs in the content network.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportTsvSample:
echo getContentPlacementTsvReport(
'Report Name',
'2006-09-01',
'2007-09-01',
array('AdGroup', 'PlacementUrl'),
array('AdGroup', 'Url', 'Weekly'),
array(),
array(),
array(),
array(),
array(),
array(),
'',
'',
false,
array(),
false,
30,
false
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getContentPlacementXmlReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst,
$onlyReturnDownloadUrl
)
A Placement Performance report shows performance statistics for your ads on specific domains and URLs in the content network.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportXmlSample:
echo getContentPlacementXmlReport(
'Report Name',
'2006-09-01',
'2007-09-01',
array('AdGroup', 'PlacementUrl'),
array('AdGroup', 'Url', 'Weekly'),
array(),
array(),
array(),
array(),
array(),
array(),
'',
'',
false,
array(),
false,
30,
false
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCreativeTsvReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst,
$onlyReturnDownloadUrl
)
Gets an Ad performance report. An Ad performance report lets you view statistics on how specific types of ad variations are performing. This report lets you see performance statistics on text ads, image ads and, where available, mobile ads and local business ads.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportTsvSample:
echo getCreativeTsvReport(
'Report Name',
'2006-09-01',
'2007-09-01',
array('CreativeId'),
array('Weekly'),
array(),
array(),
array(),
array(),
array(),
array(),
'',
'',
false,
array(),
false,
30,
false
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCreativeXmlReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst,
$onlyReturnDownloadUrl
)
Gets an Ad performance report. An Ad performance report lets you view statistics on how specific types of ad variations are performing. This report lets you see performance statistics on text ads, image ads and, where available, mobile ads and local business ads.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportXmlSample:
echo getCreativeXmlReport(
'Report Name',
'2006-09-01',
'2007-09-01',
array('CreativeId'),
array('Weekly'),
array(),
array(),
array(),
array(),
array(),
array(),
'',
'',
false,
array(),
false,
30,
false
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getGeographicTsvReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst,
$onlyReturnDownloadUrl
)
Gets a Geographic Performance report. A Geographic Performance report shows performance statistics for your ads by approximated geographic origin.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportTsvSample:
echo getGeographicTsvReport(
'Report Name',
'2008-09-01',
'2008-12-01',
array('Country', 'Account'),
array('Account'),
array(),
array(),
array(),
array(),
array(),
array(),
'',
'',
false,
array(),
false,
30,
true
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getGeographicXmlReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst,
$onlyReturnDownloadUrl
)
Gets a Geographic Performance report. A Geographic Performance report shows performance statistics for your ads by approximated geographic origin.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportXmlSample:
echo getGeographicXmlReport(
'Report Name',
'2008-09-01',
'2008-12-01',
array('Country', 'Account'),
array('Account'),
array(),
array(),
array(),
array(),
array(),
array(),
'',
'',
false,
array(),
false,
30,
true
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getKeywordTsvReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst,
$onlyReturnDownloadUrl
)
Gets a Site/Keyword performance report. A Site/Keyword performance report lets you view statistics on how your keywords are performing across selected campaigns.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportTsvSample:
echo getKeywordTsvReport(
'Report Name',
'2006-09-01',
'2007-09-01',
array('Keyword', 'KeywordId'),
array('Weekly'),
array(),
array(),
array(),
array(),
array(),
array(),
'SearchOnly',
'Broad',
false,
array(),
false,
30,
false
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getKeywordXmlReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst,
$onlyReturnDownloadUrl
)
Gets a Site/Keyword performance report. A Site/Keyword performance report lets you view statistics on how your keywords are performing across selected campaigns.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportXmlSample:
echo getKeywordXmlReport(
'Report Name',
'2006-09-01',
'2007-09-01',
array('Keyword', 'KeywordId'),
array('Weekly'),
array(),
array(),
array(),
array(),
array(),
array(),
'SearchOnly',
'Broad',
false,
array(),
false,
30,
false
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getReachAndFrequqencyTsvReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst,
$onlyReturnDownloadUrl
)
Gets a Reach and Frequency performance report. A Reach and Frequency performance report shows how many people saw your ads and how many times they saw them over a certain period of time. This report data is available at the site, ad group, and campaign levels for CPM site-targeted campaigns only.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportTsvSample:
echo getReachAndFrequencyTsvReport(
'Report Name',
'2006-09-01',
'2007-09-01',
array('Campaign'),
array('Weekly', 'Campaign'),
array(),
array(),
array(),
array(),
array(),
array(),
'',
'',
false,
array(),
false,
30,
false
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getReachAndFrequqencyXmlReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst
$onlyReturnDownloadUrl
)
Gets a Reach and Frequency performance report. A Reach and Frequency performance report shows how many people saw your ads and how many times they saw them over a certain period of time. This report data is available at the site, ad group, and campaign levels for CPM site-targeted campaigns only.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportXmlSample:
echo getReachAndFrequencyXmlReport(
'Report Name',
'2006-09-01',
'2007-09-01',
array('Campaign'),
array('Weekly', 'Campaign'),
array(),
array(),
array(),
array(),
array(),
array(),
'',
'',
false,
array(),
false,
30,
false
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getSearchQueryTsvReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst,
$onlyReturnDownloadUrl
)
Gets a Search Query Performance report. A Search Query Performance report shows performance data for the search queries that triggered the ads which appeared after receiving clicks. This report is only available for the search network.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportTsvSample:
echo getSearchQueryTsvReport(
'Report Name',
'2008-09-01',
'2008-11-01',
array('Account', 'Query'),
array('Account', 'Daily'),
array(),
array(),
array(),
array(),
array(),
array(),
'',
'',
false,
array(),
false,
30,
true
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getSearchQueryXmlReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst,
$onlyReturnDownloadUrl
)
Gets a Search Query Performance report. A Search Query Performance report shows performance data for the search queries that triggered the ads which appeared after receiving clicks. This report is only available for the search network.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportXmlSample:
echo getSearchQueryXmlReport(
'Report Name',
'2008-09-01',
'2008-11-01',
array('Account', 'Query'),
array('Account', 'Daily'),
array(),
array(),
array(),
array(),
array(),
array(),
'',
'',
false,
array(),
false,
30,
true
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getUrlTsvReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst,
$onlyReturnDownloadUrl
)
Gets a URL performance report. A URL performance report lets you view data related to your ads' destination URLs.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportTsvSample:
echo getUrlTsvReport(
'Report Name',
'2006-09-01',
'2007-09-01',
array('DestinationURL'),
array('Weekly'),
array(),
array(),
array(),
array(),
array(),
array(),
'',
'',
false,
array(),
false,
30,
false
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getUrlXmlReport(
$name,
$startDay,
$endDay,
$selectedColumns,
$aggregationTypes,
$campaigns,
$campaignStatuses,
$adGroups,
$adGroupStatuses,
$keywords,
$keywordStatuses,
$adWordsType,
$keywordType,
$isCrossClient,
$clientEmails,
$includeZeroImpression,
$sleepTime,
$validateFirst,
$onlyReturnDownloadUrl
)
Gets a URL performance report. A URL performance report lets you view data related to your ads' destination URLs.
Parameters:
String name,
String startDay,
String endDay,
[String] selectedColumns,
[String] aggregationTypes,
[Integer] campaigns,
[String] campaignStatuses,
[Integer] adGroups,
[String] adGroupStatuses,
[String] keywords,
[String] keywordStatuses,
String adWordsType,
String keywordType,
Boolean isCrossClient,
[String] clientEmails,
Boolean includeZeroImpression,
Integer sleepTime,
Boolean validateFirst
Boolean onlyReturnDownloadUrlResponse:
String reportXmlSample:
echo getUrlXmlReport(
'Report Name',
'2006-09-01',
'2007-09-01',
array('DestinationURL'),
array('Weekly'),
array(),
array(),
array(),
array(),
array(),
array(),
'',
'',
false,
array(),
false,
30,
false
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
KeywordTool.php
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
OperationsgetKeywordVariationsgetKeywordsFromSite |
| APIlity uses these native API KeywordTool functions. |
| These function are defined in the KeywordTool Service WSDL. |
getKeywordVariations($seedKeywords, $useSynonyms, $languages, $countries)
Given a list of SeedKeywords, returns their variations in multiple lists within KeywordVariations. Each list represents a different kind of variation.
Parameters:
[SeedKeyword] seedKeywords
Boolean useSynonyms
[String] languages // Pass array("all") to select all languages
[String] countries // Pass array("all") for all countriesResponse:
keywordVariations = array(
'moreSpecific' =>
array(
'text',
'language',
'advertiserCompetitionScale',
'avgSearchVolume',
'lastMonthSearchVolume'
),
'additionalToConsider' =>
array(
'text',
'language',
'advertiserCompetitionScale',
'avgSearchVolume',
'lastMonthSearchVolume'
)
)Sample:
$seedKeyword1 = array(
'text' => "some text",
'type' => "Broad",
'isNegative' => false
);
$seedKeyword2 = array(
'text' => "other text",
'type' => "Phrase",
'isNegative' => true
);
$seedKeywords = array($seedKeyword1, $seedKeyword2);
print_r(getKeywordVariations($seedKeywords, true, array("all"), array("all")));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getKeywordsFromSite($url, $includeLinkedPages, $languages, $countries)
Given a URL, returns Keywords based on words found on that web page or site, which can be used as keyword criteria for a Campaign.
Parameters:
String url
Boolean includeLinkedPages
[String] languages // Pass array("all") to select all languages
[String] countries // Pass array("all") for all countriesResponse:
keywordsFromSite = array(
'groups',
'keywords' =>
array(
'text',
'language',
'advertiserCompetitionScale',
'avgSearchVolume',
'lastMonthSearchVolume'
)
)Sample:
print_r(getKeywordsFromSite("spiegel.de", false, array("all"), array("all")));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
OperationsgetSitesByCategoryNamegetSitesByDemographics getSitesByTopics getSitesByUrls |
| APIlity uses these native API SiteSuggestion functions. |
| These function are defined in the SiteSuggestion Service WSDL. |
getSitesByCategoryName($categoryName, $targeting)
Returns site suggestions based on the specified category name. Each suggestion contains useful information such as the URL, accepted ad formats and page views.
Parameters:
String categoryName
targeting = array(
'countries' => array(),
'languages' => array(),
'metros' => array(),
'regions' => array()
)Response:
SiteSuggestion siteSuggestionSample:
$targeting = array(
'countries' => array('ES'),
'languages' => array('es'),
'metros' => array(),
'regions' => array()
);
print_r(getSitesByCategoryName("MP3 Players", $targeting));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getSitesByDemographics($demographics, $targeting)
Returns site suggestions based on the specified demographics criteria, including gender, age, income, ethnicity and whether there are children in the household. Each suggestion contains useful information such as the URL, accepted ad formats and page views.
Parameters:
targeting = array(
'countries' => array(),
'languages' => array(),
'metros' => array(),
'regions' => array()
)
array(
'childrenTarget',
'ethnicityTarget',
'genderTarget',
'minAgeRange',
'maxAgeRange',
'minHouseholdIncomeRange',
'maxHouseholdIncomeRange'
);Response:
SiteSuggestion siteSuggestionSample:
$targeting = array(
'countries' => array('ES'),
'languages' => array('es'),
'metros' => array(),
'regions' => array()
);
$demographics = array(
'childrenTarget' => 'HouseholdsWithChildrenOnly',
'ethnicityTarget' => 'NoPreference',
'genderTarget' => 'NoPreference',
'minAgeRange' => 'Range25To34',
'maxAgeRange' => 'Range25To34',
'minHouseholdIncomeRange' => 'Range75000To99999',
'maxHouseholdIncomeRange' => 'Range100000PLUS'
);
print_r(getSitesByDemographics($demographics, $targeting));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getSitesByTopics($topics, $targeting)
Returns site suggestions based on the specified topics. Each suggestion contains useful information such as the URL, accepted ad formats and page views.
Parameters:
targeting = array(
'countries' => array(),
'languages' => array(),
'metros' => array(),
'regions' => array()
)
[String] topicsResponse:
SiteSuggestion siteSuggestionSample:
$targeting = array(
'countries' => array('ES'),
'languages' => array('es'),
'metros' => array(),
'regions' => array()
);
$topics = array('search engines', 'web services');
print_r(getSitesByTopics($topics, $targeting));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getSitesByUrls($urls, $targeting)
Returns site suggestions based on the specified URLs. Each suggestion contains useful information such as the URL, accepted ad formats and page views.
Parameters:
targeting = array(
'countries' => array(),
'languages' => array(),
'metros' => array(),
'regions' => array()
)
[String] urlsResponse:
SiteSuggestion siteSuggestionSample:
$targeting = array(
'countries' => array('ES'),
'languages' => array('es'),
'metros' => array(),
'regions' => array()
);
$urls = array('google.com', 'yahoo.com');
print_r(getSitesByUrls($urls, $targeting));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
TrafficEstimate.php
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
OperationscheckKeywordListTrafficgetAdGroupEstimate getCampaignEstimate getCustomizedKeywordListEstimate getKeywordEstimate getNewKeywordEstimate getNewKeywordListEstimate |
| APIlity uses these native API TrafficEstimator functions. |
| These function are defined in the TrafficEstimator Service WSDL. |
checkKeywordListTraffic($keywords)
Checks a batch of Keywords to see whether they will get any traffic. If a Keyword is not expected to get any traffic, you more than likely do not want to bother adding it.
Parameters:
Keyword keywordObject // simplified Keyword objectResponse:
[KeywordTraffic]Sample:
$keyword1 = array('text' => "test1", 'type' => "Broad");
$keyword2 = array('text' => "test2", 'type' => "Broad");
print_r(checkKeywordListTraffic(array($keyword1, $keyword2)));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAdGroupEstimate($adGroupObject)
Returns a performance estimate for each Keyword of an AdGroup.
Parameters:
AdGroup adGroupObjectResponse:
adGroupEstimate = array(
array(
'text',
'lowerAveragePosition',
'upperAveragePosition',
'lowerCostPerClick',
'upperCostPerClick',
'lowerClicksPerDay',
'upperClicksPerDay'
),
'adGroupName',
'adGroupId'
)Sample:
$adGroupObject = createAdGroupObject(123456789);
$adGroupEstimate = getAdGroupEstimate($adGroupObject);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCampaignEstimate($campaignObject)
Returns a performance estimate for each Keyword of all AdGroups of a Campaign.
Parameters:
Campaign campaignObjectResponse:
campaignEstimate = array(
array(
array(
'text',
'lowerAveragePosition',
'upperAveragePosition',
'lowerCostPerClick',
'upperCostPerClick',
'lowerClicksPerDay',
'upperClicksPerDay'
),
'adGroupName',
'adGroupId'
),
'campaignName',
'campaignId'
)Sample:
$campaignObject = createCampaignObject(123456789);
$campaignEstimate = getCampaignEstimate($campaignObject);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getCustomizedKeywordListEstimate(
$keywords,
$maxCpc,
$geoTargets,
$languages,
$networkTargeting
)
Returns a customizable performance estimate for a list of Keywords.
Parameters:
[Keyword] keywordObjects
Integer maxCpc
[String] geoTargets
[String] languages
[String] networkTargeting
Response:
keywordEstimate = array(
'text',
'lowerAveragePosition',
'upperAveragePosition',
'lowerCostPerClick',
'upperCostPerClick',
'lowerClicksPerDay',
'upperClicksPerDay'
)Sample:
$keywordObjects = array(createKeywordObject(123456789, 987654321));
$maxCpc = 0.1;
$newGeoTargets = array(
'countryTargets' => array(
'countries' => array()
),
'regionTargets' => array(
'regions' => array()
),
'metroTargets' => array(
'metros' => array()
),
'cityTargets' => array(
'cities' => array(
"Reutlingen, BW DE",
"Karlsruhe, BW DE"
)
),
'proximityTargets' => array(
'circles' => array()
)
);
$languages = array('de');
$networkTargeting = array("GoogleSearch", "SearchNetwork");
$keywordEstimate = getCustomizedKeywordListEstimate(
$keywordObjects,
$maxCpc,
$newGeoTargets,
$languages,
$networkTargeting
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getKeywordEstimate($keywordObject)
Returns a performance estimate for a Keyword.
Parameters:
Keyword keywordObjectResponse:
keywordEstimate = array(
'text',
'lowerAveragePosition',
'upperAveragePosition',
'lowerCostPerClick',
'upperCostPerClick',
'lowerClicksPerDay',
'upperClicksPerDay'
)Sample:
$keywordObject = createKeywordObject(123456789, 987654321);
$keywordEstimate = getKeywordEstimate($keywordObject);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getNewKeywordEstimate($text, $type, $maxCpc, $isNegative)
Returns a performance estimate for a new (i.e. not yet existing) Keyword.
Parameters:
String text
String type
Integer maxCpc
Boolean isNegativeResponse:
newKeywordEstimate = array(
'text',
'lowerAveragePosition',
'upperAveragePosition',
'lowerCostPerClick',
'upperCostPerClick',
'lowerClicksPerDay',
'upperClicksPerDay'
)Sample:
$newKeywordEstimate = getNewKeywordEstimate("test", "Exact", 0.65, false);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getNewKeywordListEstimate($newKeywords)
Returns a performance estimate for each new (i.e. not yet existing) Keyword of a given Keyword list.
Parameters:
newKeywords = array(
array(
'text',
'type',
'maxCpc'
'isNegative'
)
)Response:
newKeywordListEstimates = array(
array(
'text',
'lowerAveragePosition',
'upperAveragePosition',
'lowerCostPerClick',
'upperCostPerClick',
'lowerClicksPerDay',
'upperClicksPerDay'
)
)Sample:
$keyword1 = array(
'text' => "test1",
'type' => "Broad",
'maxCpc' => 0.10,
'isNegative' => false
);
$keyword2 = array(
'text' => "test2",
'type' => "Broad",
'maxCpc' => 0.20,
'isNegative' => false
);
$newKeywordEstimates = getNewKeywordListEstimate(array($keyword1, $keyword2));
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
Account.php
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
OperationscreateDefaultNetworkTargetingXmlcreateEmailPreferencesXml getAccountInfo getClientsClientAccountInfos getClientsClientAccounts getManagersClientAccountInfos getManagersClientAccounts getMccAlerts updateAccountInfo |
| APIlity uses these native API Account functions. |
| These function are defined in the Account Service WSDL. |
createDefaultNetworkTargetingXml($networkTargets)
Helper function for updateAccountInfo() to create valid XML for the Default Network Targets.
Parameters:
NetworkTargets networkTargetsResponse:
String defaultNetworkTargetingXml // contains XML encoded Default Network TargetsSample:
$networkTargets = array('GoogleSearch', 'ContentNetwork');
$defaultNetworkTargetingXml = createDefaultNetworkTargetingXml($networkTargets);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
createEmailPreferencesXml(
$marketResearchEnabled,
$newsletterEnabled,
$promotionsEnabled,
$accountPerformanceEnabled,
$disapprovedAdsEnabled
)
Helper function for updateAccountInfo() to create valid XML for the Email Preferences.
Parameters:
Boolean marketResearchEnabled
Boolean newsletterEnabled
Boolean promotionsEnabled
Boolean accountPerformanceEnabled
Boolean disapprovedAdsEnabledResponse:
String emailPreferencesXml // contains XML encoded Email PreferencesSample:
$emailPreferencesXml = createEmailPreferencesXml(true, false, true, true, true);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getAccountInfo()
Returns the AdWords account specified by the client account header.
Parameters:
NoneResponse:
accountInfo =
array(
'currencyCode',
'customerId',
'defaultNetworkTargeting' => array(),
'descriptiveName',
'emailPromotionsPreferences' array(
'marketResearchEnabled',
'newsletterEnabled',
'promotionsEnabled',
),
'languagePreference',
'primaryAddress' => array(
'addressLine1',
'addressLine2',
'city',
'companyName',
'countryCode',
'emailAddress',
'faxNumber',
'name',
'phoneNumber',
'postalCode',
'state'
),
'primaryBusinessCategory',
'termsAndConditions',
'timeZoneEffectiveDate'
)Sample:
print_r(getAccountInfo());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getClientsClientAccountInfos()
Returns the current Client's client account infos (i.e. all client account infos that are managed by the current value of 'clientEmail' in the present authentication context).
Parameters:
NoneResponse:
[String] clientAccountInfosSample:
print_r(getClientsClientAccountInfos());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getClientsClientAccounts()
Returns the current Client's client account e-mail addresses (i.e. all client account e-mail addresses that are managed by the current value of 'clientEmail' in the present authentication context).
Parameters:
NoneResponse:
[String] clientAccountsSample:
print_r(getClientsClientAccounts());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getManagersClientAccountInfos()
Returns the current Manager's client account infos (i.e. all client account infos that are managed by the current value of 'email' in the present authentication context).
Parameters:
NoneResponse:
[String] clientAccountInfosSample:
print_r(getManagersClientAccountInfos());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getManagersClientAccounts()
Returns the current Manager's client account e-mail addresses (i.e. all client account e-mail addresses that are managed by the current value of 'email' in the present authentication context).
Parameters:
NoneResponse:
[String] clientAccountsSample:
print_r(getManagersClientAccounts());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getMccAlerts()
Returns the MCC alerts associated with any of the accounts beneath the current account.
Parameters:
NoneResponse:
[MccAlert] mccAlertsSample:
print_r(getMccAlerts());
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
updateAccountInfo(
$defaultNetworkTargeting,
$descriptiveName,
$emailPromotionsPreferences,
$languagePreference,
$primaryBusinessCategory
)
Updates the AdWords account specified by the client account header.
Parameters:
String defaultAdsNetworkTargeting // hint: use the function createDefaultNetworkTargetingXml()
String descriptiveName
String emailPreferencesXml // hint: use the function createEmailPreferencesXml()
String languagePreference
String primaryBusinessCategoryResponse:
NoneSample:
// use the helper functions to make sure the XML is valid
$defaultNetworkTargeting = array('GoogleSearch', 'SearchNetwork');
$defaultNetworkTargetingXml = createDefaultNetworkTargetingXml($defaultNetworkTargeting);
$emailPromotionsPreferences = createEmailPreferencesXml(true, true, false, true, true);
// finally update the account
updateAccountInfo($defaultNetworkTargetingXml, 'My favorite customer', $emailPromotionsPreferences, 'fr', 'Manufacturing');
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
Info.php
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
OperationsgetMethodCostgetOperationCount getOperationsQuotaThisMonth getUnitCount getUnitCountForClients getUnitCountForMethod getUsageQuotaThisMonth |
| APIlity uses these native API Info functions. |
| These function are defined in the Info Service WSDL. |
getMethodCost($service, $method, $date)
Returns the cost, in quota units per operation, of the given method on a specific date. Methods default to a cost of 1.
Parameters:
String service
String method
String dateResponse:
Integer methodCostSample:
$yesterday = gmdate(
"Y-m-d",
mktime(
date("H"),
date("i"),
date("s"),
date("m"),
date("d") - 1,
date("Y")
)
);
echo getMethodCost("AdService","updateAds", $yesterday);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getOperationCount($startDate, $endDate)
Returns the number of operations executed during a given period of time.
Parameters:
String startDate
String endDateResponse:
Integer operationCountSample:
$yesterday = gmdate(
"Y-m-d",
mktime(
date("H"),
date("i"),
date("s"),
date("m"),
date("d") - 1,
date("Y")
)
);
$dayBeforeYesterday = gmdate(
"Y-m-d",
mktime(
date("H"),
date("i"),
date("s"),
date("m"),
date("d") - 2,
date("Y")
)
);
echo getOperationCount($dayBeforeYesterday, $yesterday);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getOperationsQuotaThisMonth()
Returns the operations quota for the current month.
Parameters:
NoneResponse:
Integer operationsQuotaThisMonthSample:
echo getOperationsQuotaThisMonth();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getUnitCount($startDate, $endDate)
Returns the number of quota units recorded for the developer token being used to make this call over the given date range.
Parameters:
String startDate
String endDateResponse:
Integer operationCountSample:
$yesterday = gmdate(
"Y-m-d",
mktime(
date("H"),
date("i"),
date("s"),
date("m"),
date("d") - 1,
date("Y")
)
);
$dayBeforeYesterday = gmdate(
"Y-m-d",
mktime(
date("H"),
date("i"),
date("s"),
date("m"),
date("d") - 2,
date("Y")
)
);
echo getUnitCount($dayBeforeYesterday, $yesterday);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getUnitCountForClients($startDate, $endDate, $clientEmails)
Returns the number of operations executed during a given period of time.
Parameters:
String startDate
String endDate
[String] clientEmailsResponse:
unitCountForClients = array(
array(
'clientEmail'
'quotaUnits'
)
)Sample:
print_r(
getUnitCountForClients(
'2005-01-01', '2006-08-01',
array(
'myCustomEmail@someWhere.tld',
'myOtherCustomEmail@anyWhere.tld'
)
)
);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getUnitCountForMethod($service, $method, $startDate, $endDate)
Returns the number of quota units recorded for the developer token being used to make this call over the given date range for a specific method.
Parameters:
String service
String method
String startDate
String endDateResponse:
Integer unitCountForMethodSample:
$yesterday = gmdate(
"Y-m-d",
mktime(
date("H"),
date("i"),
date("s"),
date("m"),
date("d") - 1,
date("Y")
)
);
$dayBeforeYesterday = gmdate(
"Y-m-d",
mktime(
date("H"),
date("i"),
date("s"),
date("m"),
date("d") - 2,
date("Y")
)
);
echo getUnitCountForMethod("AdService", "updateAds", $dayBeforeYesterday, $yesterday);
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info
getUsageQuotaThisMonth()
Returns this month's total usage quota, including free quota usage, for the developer token being used to make this call.
Parameters:
NoneResponse:
Integer usageQuotaThisMonthSample:
echo getUsageQuotaThisMonth();
Quicknavigatior
• Back To Top
• APIlity Home
• APIlity Forum
» Campaign |
» AdGroup |
» Criterion |
» Ad |
» Report |
» KeywordTool |
» SiteSuggestion |
» TrafficEstimate |
» Account |
» Info

