Hi,
I need to estimate search traffic for keyword. The results for the
search with same keyword, for same match type under the same client,
campaign, adgroup differs when I use Google Adwords UI tool and API
traffic estimator.
For example,
Results from Google Adwords UI tool
-----------------------------------------------------
Keyword: freedom, match type: broad
Avg. CPC: $0.53 - $1.30
Clicks/day: 74 - 95
Cost/day: $50.75 - $96.00
Results from API Traffic estimator:
-------------------------------------------------
Keyword: freedom, match type: broad
Estimated min CPC: 0.69
Estimated max CPC: 1.04
Estimated min daily clicks: 1084
Estimated max daily clicks: 1369
Estimated min daily cost: 751.08
Estimated max daily cost: 1422.12
Code:
--------
$user = new AdWordsUser();
$user->SetClientId($client_id);
$user->LogDefaults();
// Get the TrafficEstimatorService.
$trafficEstimatorService = $user-
>GetTrafficEstimatorService('v201008');
// Create keywords. Up to 2000 keywords can be passed in a single
request.
$keywords = array();
$keywords[] = new Keyword('freedom', 'BROAD');
// Create a keyword estimate request for each keyword.
$keywordEstimateRequests = array();
foreach ($keywords as $keyword) {
$keywordEstimateRequest = new KeywordEstimateRequest();
$keywordEstimateRequest->keyword = $keyword;
$keywordEstimateRequests[] = $keywordEstimateRequest;
}
// Create ad group estimate requests.
$adGroupEstimateRequest = new AdGroupEstimateRequest();
$adGroupEstimateRequest->keywordEstimateRequests =
$keywordEstimateRequests;
$adGroupEstimateRequest->adGroupId = '1953088403';
$adGroupEstimateRequests = array($adGroupEstimateRequest);
// Create campaign estimate requests.
$campaignEstimateRequest = new CampaignEstimateRequest();
$campaignEstimateRequest->adGroupEstimateRequests =
$adGroupEstimateRequests;
$campaignEstimateRequest->campaignId = '62228723';
$campaignEstimateRequests = array($campaignEstimateRequest);
// Create selector.
$selector = new TrafficEstimatorSelector();
$selector->campaignEstimateRequests = $campaignEstimateRequests;
// Get traffic estimates.
$result = $trafficEstimatorService->get($selector);
// Display traffic estimates.
if (isset($result)) {
$keywordEstimates =
$result->campaignEstimates[0]->adGroupEstimates[0]-
>keywordEstimates;
for ($i = 0; $i < sizeof($keywordEstimates); $i++) {
$keyword = $keywordEstimateRequests[$i]->keyword;
$keywordEstimate = $keywordEstimates[$i];
// Find the mean of the min and max values.
$meanAverageCpc = ($keywordEstimate->min->averageCpc-
>microAmount
+ $keywordEstimate->max->averageCpc->microAmount) / 2;
$meanAveragePosition = ($keywordEstimate->min->averagePosition
+ $keywordEstimate->max->averagePosition) / 2;
$meanClicks = ($keywordEstimate->min->clicks
+ $keywordEstimate->max->clicks) / 2;
$meanTotalCost = ($keywordEstimate->min->totalCost->microAmount
+ $keywordEstimate->max->totalCost->microAmount) / 2;
printf("Results for the keyword with text '%s' and match type
'%s':\n",
$keyword->text, $keyword->matchType);
printf(" Estimated min CPC: %.2f\n", $keywordEstimate->min-
>averageCpc->microAmount/1000000);
printf(" Estimated max CPC: %.2f\n", $keywordEstimate->max-
>averageCpc->microAmount/1000000);
printf(" Estimated min ad position: %.2f\n", $keywordEstimate-
>min->averagePosition);
printf(" Estimated max ad position: %.2f\n", $keywordEstimate-
>max->averagePosition);
printf(" Estimated min daily clicks: %d\n", $keywordEstimate-
>min->clicks);
printf(" Estimated max daily clicks: %d\n", $keywordEstimate-
>max->clicks);
printf(" Estimated min daily cost: %.2f\n", $keywordEstimate-
>min->totalCost->microAmount/1000000);
printf(" Estimated max daily cost: %.2f\n", $keywordEstimate-
>max->totalCost->microAmount/1000000);
}
Request to help on this
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en