Unable to add platform targets when creating a new campaign

236 views
Skip to first unread message

robert.j...@adwire.se

unread,
Feb 2, 2012, 6:19:12 AM2/2/12
to adwor...@googlegroups.com
Hi,

I'm unable to add platform targets when creating a campaign. All other targets are accepted by the API, but not platform targets. I don't receive any error message and when printing the result set I can see that I'm sending in the right values (in this case I don't want to show ads on mobile carriers):

CampaignCriterionReturnValue Object ( [value] => Array ( [0] => CampaignCriterion Object ( [campaignId] => 77XXXX55 [criterion] => Platform Object ( [platformName] => Desktop [id] => 30000 [type] => PLATFORM [CriterionType] => Platform [_parameterMap:private] => Array ( [Criterion.Type] => CriterionType ) ) [CampaignCriterionType] => CampaignCriterion [_parameterMap:private] => Array ( [CampaignCriterion.Type] => CampaignCriterionType ) ) [1] => CampaignCriterion Object ( [campaignId] => 77XXXX55 [criterion] => Platform Object ( [platformName] => Tablet [id] => 30002 [type] => PLATFORM [CriterionType] => Platform [_parameterMap:private] => Array ( [Criterion.Type] => CriterionType ) ) [CampaignCriterionType] => CampaignCriterion [_parameterMap:private] => Array ( [CampaignCriterion.Type] => CampaignCriterionType ) ) ) [ListReturnValueType] => CampaignCriterionReturnValue [_parameterMap:private] => Array ( [ListReturnValue.Type] => ListReturnValueType ) )

When looking in the AdWords interface I can see that the campaign was created targeting "all available devices".

Thank you in advance!

mm

unread,
Feb 2, 2012, 9:43:05 AM2/2/12
to AdWords API Forum
Hey Robert -
It is not very intuitive, but as you have already discovered, when a
campaign is created it has all 3 platform targets associated with it.
This means that after creating a campaign what you have to do is
remove the targets that you don't want rather than add the targets
that you do.

This one stumped me for a while, too.

HTH -
Margaret

On Feb 2, 5:19 am, "robert.johans...@adwire.se"

robert.j...@adwire.se

unread,
Feb 2, 2012, 10:17:05 AM2/2/12
to adwor...@googlegroups.com
Thank you so much, Margaret! I totally agree with you, it's not very intuitive :-)

Best Regards,

Robert

Amit Badkas

unread,
Aug 27, 2012, 12:36:59 AM8/27/12
to adwor...@googlegroups.com
I tried to add particular platform after adding a campaign using following code

$platform = new Platform();
$platform->id = 30001;
$operation = new CampaignCriterionOperation(new CampaignCriterion($campaign->id, $platform), 'ADD');
$campaignCriterionService = $user->GetService('CampaignCriterionService');
$result = $campaignCriterionService->mutate(array($operation));

but it gives following error

Unmarshalling Error: cvc-elt.4.3: Type 'ns1:Platform' is not validly derived from the type definition, 'boolean', of element 'ns1:isNegative'.

I don't know how to fix it as this was working a while ago

FYI, I am using sandbox mode

Please help, thanks in advance

Kevin Winter

unread,
Sep 4, 2012, 3:04:33 PM9/4/12
to adwor...@googlegroups.com
Hi,
  It's a problem with using the 2-arg constructor for CampaignCriterion, see here for details: https://groups.google.com/d/msg/adwords-api/A9m4SB-Jmtc/DhyILEXnqv4J

- Kevin Winter
AdWords API Team
Reply all
Reply to author
Forward
Message has been deleted
0 new messages