create DSA error

12 views
Skip to first unread message

Юрий Ильченко

unread,
Oct 1, 2015, 9:06:39 AM10/1/15
to AdWords API Forum
Hi.
I try to create DSA:

$cond1 = new WebpageCondition();

$cond1->operand = 'site.com';
$cond1->argument = "/marscruise/children";

$param = new WebpageParameter();
$param->criterionName = "Special offers for children";
$param->conditions = $cond1;

$webpage = new Webpage();
$webpage->parameter = $param;

$adGroupCriterion = new BiddableAdGroupCriterion();
$adGroupCriterion->adGroupId = 1234567890;
$adGroupCriterion->criterion = $webpage;

$bid = new CpcBid();
$bid->bid = new Money(CPC_BID);
$biddingStrategyConfiguration = new BiddingStrategyConfiguration();
$biddingStrategyConfiguration->bids[] = $bid;
$adGroupCriterion->biddingStrategyConfiguration =
$biddingStrategyConfiguration;

$adGroupCriteria[] = $adGroupCriterion;

$operation = new AdGroupCriterionOperation();
$operation->operand = $adGroupCriterion;
$operation->operator = 'ADD';
$operations[] = $operation;

$result = $adGroupCriterionService->mutate($operations);

Result:
Fatal error: Uncaught SoapFault exception: [soap:Server] [InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.<init>(InternalApiErro]

What am i doing wrong?

Umesh Dengale

unread,
Oct 1, 2015, 3:58:05 PM10/1/15
to AdWords API Forum
Hello,

When constructing the WebPageCondition, the operand-property needs to set the value from WebpageConditionOperand.  Please check out the dynamic search ads document for more details.

Cheers,
Umesh, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages