foreach ($bidLandscape->landscapePoints as $bidLandscapePoint) { printf(" bid: %.0f => clicks: %d, cost: %.0f, marginalCpc: %.0f, " . "impressions: %d\n", $bidLandscapePoint->bid->microAmount, $bidLandscapePoint->clicks, $bidLandscapePoint->cost->microAmount, $bidLandscapePoint->marginalCpc->microAmount, $bidLandscapePoint->impressions); } print "\n"; } } else { print "No criterion bid landscapes were found.\n"; } // Advance the paging index. $selector->paging->startIndex += AdWordsConstants::RECOMMENDED_PAGE_SIZE; } while ($page->totalNumEntries > $selector->paging->startIndex); } // Don't run the example if the file is being included. if (__FILE__ != realpath($_SERVER['PHP_SELF'])) { return; } try { // Get AdWordsUser from credentials in "../auth.ini" // relative to the AdWordsUser.php file's directory. $user = new AdWordsUser(); // Log every SOAP XML request and response. $user->LogAll(); // Run the example. GetKeywordBidSimulationsExample($user, $adGroupId); } catch (OAuth2Exception $e) { ExampleUtils::CheckForOAuth2Errors($e); } catch (ValidationException $e) { ExampleUtils::CheckForOAuth2Errors($e); } catch (Exception $e) { printf("An error has occurred: %s\n", $e->getMessage()); }
public function testGetKeywordBidSimulationsExample() { $campaignId = $this->testUtils->CreateCampaign(); $adGroupId = $this->testUtils->CreateAdGroup($campaignId); GetKeywordBidSimulationsExample($this->user, $adGroupId); }