Hi everyone,

I'm trying to use the GenerateKeywordForecastMetrics method from the 
KeywordPlanIdeaService in the Google Ads API (v20).

I’m currently testing two different bidding strategies (manual_cpc and 
maximize_conversions) within a CampaignToForecast object. However, when I 
use the *maximize_conversions* strategy, I receive the following error:




*Host: googleads.googleapis.comMethod: 
/google.ads.googleads.v20.services.KeywordPlanIdeaService/GenerateKeywordForecastMetricsRequestId:
 
WsA6v2K6NxA3uCehlA3VzgIsFault: TrueFaultMessage: The input has an invalid 
value.*

Here's a simplified version of the relevant code using the 
*maximize_conversions* strategy:
*campaign_to_forecast.bidding_strategy.maximize_conversions_bidding_strategy.daily_target_spend_micros
 
= 50000000*

When I switch back to manual_cpc_bidding_strategy, everything works fine 
and I get expected results like:



*Estimated daily clicks: 6381.6Estimated daily impressions: 
43575.5Estimated daily cost: 3612.25Estimated daily conversions: 1557.14*

According to the documentation here:
https://developers.google.com/google-ads/api/reference/rpc/v20/CampaignToForecast.CampaignBiddingStrategy
...this should be a valid setup.

I’m wondering:

   - 
   
   Is maximize_conversions_bidding_strategy not supported by 
   GenerateKeywordForecastMetrics?
   - 
   
   Is there a specific combination of fields or requirements that I may 
   have missed?
   - 
   
   Or does this method only support manual_cpc?
   
Any insight or clarification would be greatly appreciated. Thanks in 
advance!

Best regards,

PS : This is how I create my campaign_to_forecast :

def create_campaign_to_forecast(client):
    """Creates the campaign to forecast.

    A campaign to forecast lets you try out various configurations and 
keywords
    to find the best optimization for your future campaigns. Once you've 
found
    the best campaign configuration, create a serving campaign in your 
Google
    Ads account with similar values and keywords. For more details, see:
    https://support.google.com/google-ads/answer/3022575

    Args:
        client: an initialized GoogleAdsClient instance.

    Returns:
        An CampaignToForecast instance.
    """
    googleads_service = client.get_service("GoogleAdsService")
    # Create a campaign to forecast.
    campaign_to_forecast = client.get_type("CampaignToForecast")
    campaign_to_forecast.keyword_plan_network = (
        client.enums.KeywordPlanNetworkEnum.GOOGLE_SEARCH
    )

    # Set the bidding strategy.
    # 
campaign_to_forecast.bidding_strategy.manual_cpc_bidding_strategy.max_cpc_bid_micros
 
= 1500000

    
campaign_to_forecast.bidding_strategy.maximize_conversions_bidding_strategy.daily_target_spend_micros
 
 = 50000000

    # For the list of geo target IDs, see:
    # https://developers.google.com/google-ads/api/reference/data/geotargets
    criterion_bid_modifier = client.get_type("CriterionBidModifier")
    # Geo target constant 2840 is for USA. 2250 for France.
    criterion_bid_modifier.geo_target_constant = (
        googleads_service.geo_target_constant_path("2250")
    )
    campaign_to_forecast.geo_modifiers.append(criterion_bid_modifier)

    # For the list of language criteria IDs, see:
    # 
https://developers.google.com/google-ads/api/reference/data/codes-formats#languages
    # Language criteria 1000 is for English. 1002 for French.
    campaign_to_forecast.language_constants.append(
        googleads_service.language_constant_path("1002")
    )

    # Create forecast ad groups based on themes such as creative relevance,
    # product category, or cost per click.
    forecast_ad_group = client.get_type("ForecastAdGroup")

    # Create and configure three BiddableKeyword instances.
    biddable_keyword_1 = client.get_type("BiddableKeyword")
    biddable_keyword_1.max_cpc_bid_micros = 2500000
    biddable_keyword_1.keyword.text = "casserole"
    biddable_keyword_1.keyword.match_type = (
        client.enums.KeywordMatchTypeEnum.BROAD
    )

    biddable_keyword_2 = client.get_type("BiddableKeyword")
    biddable_keyword_2.max_cpc_bid_micros = 1500000
    biddable_keyword_2.keyword.text = "poele"
    biddable_keyword_2.keyword.match_type = (
        client.enums.KeywordMatchTypeEnum.PHRASE
    )

    biddable_keyword_3 = client.get_type("BiddableKeyword")
    biddable_keyword_3.max_cpc_bid_micros = 1990000
    biddable_keyword_3.keyword.text = "sauteuse"
    biddable_keyword_3.keyword.match_type = (
        client.enums.KeywordMatchTypeEnum.EXACT
    )

    # Add the biddable keywords to the forecast ad group.
    forecast_ad_group.biddable_keywords.extend(
        [biddable_keyword_1, biddable_keyword_2, biddable_keyword_3]
    )

    # Create and configure a negative keyword, then add it to the forecast 
ad
    # group.
    negative_keyword = client.get_type("KeywordInfo")
    negative_keyword.text = "bourgignon"
    negative_keyword.match_type = client.enums.KeywordMatchTypeEnum.BROAD
    forecast_ad_group.negative_keywords.append(negative_keyword)

    campaign_to_forecast.ad_groups.append(forecast_ad_group)

    print(campaign_to_forecast)

    return campaign_to_forecast

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/adwords-api/74eacb2f-8249-491f-b687-66305750d95dn%40googlegroups.com.

Reply via email to