Hi
I got an error when i am trying to update criteria final url using PHP api.
these are my data Array ( [keyword_id] => 11285220 [Ad_group_id] =>
41568659428 [maxCPC] => 0.02 [Final_URL] =>
http://cas.info/utm_term=adwords-keyword
<http://www.google.com/url?q=http%3A%2F%2Fcas.info%2Futm_term%3Dadwords-keyword&sa=D&sntz=1&usg=AFQjCNHI_0Sf1gBSWJThcXJi0gP6gX0j9Q>
)
. I got error when try with these data. The error returned is { Âûáðîøåíî
èñêëþ÷åíèå: [UrlError.DESTINATION_URL_DEPRECATED @
operations[0].operand.destinationUrl] }. Can anyone help me.
This is my code
$adGroupCriterionService =
$user->GetService('AdGroupCriterionService', ADWORDS_VERSION);
// Create ad group criterion.
$adGroupCriterion = new BiddableAdGroupCriterion();
$adGroupCriterion->adGroupId = $adGroupId;
// Create criterion using an existing ID. Use the base class Criterion
// instead of Keyword to avoid having to set keyword-specific fields.
$adGroupCriterion->criterion = new Criterion($criterionId);
echo 'Criterion selected<br />';
// Update destination URL.
$adGroupCriterion->destinationUrl = $final_url;
/*
// Set bids (optional).
$bid = new CpcBid();
$bid->bid = new Money(500000);
$biddingStrategyConfiguration = new BiddingStrategyConfiguration();
$biddingStrategyConfiguration->bids[] = $bid;
$adGroupCriterion->biddingStrategyConfiguration =
$biddingStrategyConfiguration; */
// Create operation.
$operation = new AdGroupCriterionOperation();
$operation->operand = $adGroupCriterion;
$operation->operator = 'SET';
$operations = array($operation);
// Make the mutate request.
$result = $adGroupCriterionService->mutate($operations);
// Display result.
$adGroupCriterion = $result->value[0];
echo 'Result after updation';
print_r($adGroupCriterion);
printf("Keyword with ID '%s' has updated destination URL '%s'.\n",
$adGroupCriterion->criterion->id, $adGroupCriterion->destinationUrl);
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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
---
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/dc296897-f200-4784-8cd2-ea77ea038ccc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.