INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE

875 views
Skip to first unread message

Ralf Kraus

unread,
Jul 30, 2014, 2:53:33 PM7/30/14
to adwor...@googlegroups.com

Hello,

 

I am running into problem while setting a BiddingStrategyConfiguration in my campaign:

 

here a example of my php code:

 

$biddingScheme = new TargetSpendBiddingScheme();
$biddingScheme->bidCeiling = new Money(1 * 1000000);

$biddingStrategyConfiguration = new BiddingStrategyConfiguration();
$biddingStrategyConfiguration->biddingStrategyType = "TARGET_SPEND";
$biddingStrategyConfiguration->biddingStrategySource = 'CAMPAIGN';
$biddingStrategyConfiguration->biddingScheme = $biddingScheme;

$campaign->biddingStrategyConfiguration = $biddingStrategyConfiguration;

 

Everytime I am running this error:

 

INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE

 

[BiddingErrors.INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE @ operations[0].operand.biddingStrategyConfiguration.biddingStrategyType; trigger:'TARGET_SPEND']

 

Any hints?

 

Greetings,

 

Ralf Kraus

Josh Radcliff (AdWords API Team)

unread,
Aug 1, 2014, 3:34:33 PM8/1/14
to adwor...@googlegroups.com
Hi Ralf,

Each type of bidding strategy is only valid as a shared strategy or as a non-shared strategy. The TARGET_SPEND type is only valid as a shared strategy, so you'll have to create the bidding strategy via BiddingStrategyService, and then use the returned SharedBiddingStrategy.id to set up your Campaign's biddingStrategyConfiguration.

I recommend taking a look at our Bidding guide, which covers this in detail.

Thanks,
Josh, AdWords API Team

Sylvain Beauregard

unread,
Aug 19, 2016, 9:06:21 AM8/19/16
to AdWords API Forum
Hi Josh!

I basically have the same problem.  I use v201607 of the PHP library.

I begin by defining a SharedBiddingStrategy, and based on the returned object, it's successful:

BiddingStrategyReturnValue Object
(
    [value] => Array
        (
            [0] => SharedBiddingStrategy Object
                (
                    [biddingScheme] => PageOnePromotedBiddingScheme Object
                        (
                            [strategyGoal] => PAGE_ONE_PROMOTED
                            [bidCeiling] => Money Object
                                (
                                    [microAmount] => 4000000
                                    [ComparableValueType] => Money
                                    [_parameterMap:ComparableValue:private] => Array
                                        (
                                            [ComparableValue.Type] => ComparableValueType
                                        )

                                )

                            [bidModifier] => 
                            [bidChangesForRaisesOnly] => 
                            [raiseBidWhenBudgetConstrained] => 
                            [raiseBidWhenLowQualityScore] => 
                            [BiddingSchemeType] => PageOnePromotedBiddingScheme
                            [_parameterMap:BiddingScheme:private] => Array
                                (
                                    [BiddingScheme.Type] => BiddingSchemeType
                                )

                        )

                    [id] => 1419094668
                    [name] => _PO_Used_1298089587
                    [status] => ENABLED
                    [type] => PAGE_ONE_PROMOTED
                    [systemStatus] => 
                )

        )

    [ListReturnValueType] => BiddingStrategyReturnValue
    [_parameterMap:ListReturnValue:private] => Array
        (
            [ListReturnValue.Type] => ListReturnValueType
        )

)

Then I use it in the parameters for my campaign, here's my Campaign object:

Campaign Object ( [id] => [name] => ___POP_GMC Sierra 2500HD 2013| XM351 - EN [status] => ENABLED [servingStatus] => SERVING [startDate] => 20160819 [endDate] => [budget] => Budget Object ( [budgetId] => 246661707 [name] => [amount] => [deliveryMethod] => [referenceCount] => [isExplicitlyShared] => [status] => ) [conversionOptimizerEligibility] => [adServingOptimizationStatus] => [frequencyCap] => [settings] => [advertisingChannelType] => SEARCH [advertisingChannelSubType] => [networkSetting] => NetworkSetting Object ( [targetGoogleSearch] => 1 [targetSearchNetwork] => 1 [targetContentNetwork] => [targetPartnerSearchNetwork] => ) [labels] => [biddingStrategyConfiguration] => SharedBiddingStrategy Object ( [biddingScheme] => [id] => 1419094668 [name] => [status] => [type] => [systemStatus] => [biddingStrategyType] => PAGE_ONE_PROMOTED ) [campaignTrialType] => [baseCampaignId] => [forwardCompatibilityMap] => [trackingUrlTemplate] => [urlCustomParameters] => [vanityPharma] => )
And I get the errors:

[RequiredError.REQUIRED @ operations[0].operand.advertisingChannelType, BiddingErrors.INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE @ operations[1].operand.biddingStrategyConfiguration.biddingStrategyType; trigger:'PAGE_ONE_PROMOTED']

The advertisngChannelType error just popped up, didn't have it in my previous tests. I'll try to fix that, but that's a different issue.

As you can see, it generates the same INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE error. It seems to say the trigger is the fact I re-assign the biddingStrategyType to 'PAGE_ONE_PROMOTED', but if I don't, I get another error saying that parameter is required.

It's not anonymous, the bidding strategy exists, it's a SHARED one,

What do I miss?


Josh Radcliff (AdWords API Team)

unread,
Aug 19, 2016, 4:51:35 PM8/19/16
to AdWords API Forum
Hi,

It looks like you are setting the id attribute of your BiddingStrategyConfiguration, but the field name for the ID is actually biddingStrategyId. Please try changing the field name and let me know if you still run into errors.

Thanks,
Josh, AdWords API Team

Sylvain Beauregard

unread,
Sep 1, 2016, 2:12:52 PM9/1/16
to AdWords API Forum
Hi Josh!

Sorry for the delay, I just saw your response.  and I tried it... and it worked!  Thanks,
Reply all
Reply to author
Forward
0 new messages