Page Summary
-
Implementing Things to do ads begins by creating a Things to do campaign within Google Ads, setting its budget, bidding strategy, and linking your Things to do Center account.
-
Key steps in campaign setup include setting the advertising channel type to
TRAVELand subtype toTRAVEL_ACTIVITIES. -
You must create
TravelCampaignSettings, specify thetravel_account_idfrom your Things to do Center account, and add it to the campaign. -
For Things to do campaigns, the bidding strategy must be set to
MaximizeConversionValue.
The first step in implementing Things to do ads is creating a Things to do campaign. In creating the campaign, you set its budget, bidding strategy, and Things to do Center account ID.
Here are the steps in setting up a campaign:
- Setting the campaign's
advertising_channel_typetoTRAVELandadvertising_channel_sub_typetoTRAVEL_ACTIVITIES. - Creating a
TravelCampaignSettings, setting itstravel_account_id, and then adding it to the campaign. - Creating a
MaximizeConversionValuebidding strategy for the campaign.
The following code demonstrates these steps.
Java
private String addThingsToDoCampaign( GoogleAdsClient googleAdsClient, long customerId, String budgetResourceName, long thingsToDoCenterAccountId) { // Creates the campaign. Campaign campaign = Campaign.newBuilder() .setName("Interplanetary Cruise #" + getPrintableDateTime()) // Configures settings related to Things to do campaigns including advertising channel // type, advertising channel sub type and travel campaign settings. .setAdvertisingChannelType(AdvertisingChannelType.TRAVEL) .setAdvertisingChannelSubType(AdvertisingChannelSubType.TRAVEL_ACTIVITIES) .setTravelCampaignSettings( TravelCampaignSettings.newBuilder().setTravelAccountId(thingsToDoCenterAccountId)) // Recommendation: Sets the campaign to PAUSED when creating it to prevent // the ads from immediately serving. Set to ENABLED once you've added // targeting and the ads are ready to serve .setStatus(CampaignStatus.PAUSED) // Sets the bidding strategy to MaximizeConversionValue. Only this type can be used // for Things to do campaigns. .setMaximizeConversionValue(MaximizeConversionValue.newBuilder()) // Sets the budget. .setCampaignBudget(budgetResourceName) // Configures the campaign network options. Only Google Search is allowed for // Things to do campaigns. .setNetworkSettings(NetworkSettings.newBuilder().setTargetGoogleSearch(true)) // Declares whether this campaign serves political ads targeting the EU. .setContainsEuPoliticalAdvertising(DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING) .build(); // Creates a campaign operation. CampaignOperation operation = CampaignOperation.newBuilder().setCreate(campaign).build(); // Issues a mutate request to add the campaign. try (CampaignServiceClient campaignServiceClient = googleAdsClient.getLatestVersion().createCampaignServiceClient()) { MutateCampaignsResponse response = campaignServiceClient.mutateCampaigns( Long.toString(customerId), Collections.singletonList(operation)); MutateCampaignResult result = response.getResults(0); System.out.printf( "Added a Things to do campaign with resource name: '%s'%n", result.getResourceName()); return result.getResourceName(); } }
C#
// Creates a campaign. Campaign campaign = new Campaign() { Name = "Interplanetary Cruise #" + ExampleUtilities.GetRandomString(), AdvertisingChannelType = AdvertisingChannelType.Travel, AdvertisingChannelSubType = AdvertisingChannelSubType.TravelActivities, TravelCampaignSettings = new TravelCampaignSettings() { TravelAccountId = thingsToDoCenterAccountId }, // Recommendation: Set the campaign to PAUSED when creating it to prevent // the ads from immediately serving. Set to ENABLED once you've added // targeting and the ads are ready to serve Status = CampaignStatus.Paused, // Set the bidding strategy and budget. MaximizeConversionValue = new MaximizeConversionValue(), CampaignBudget = budget, // Set the campaign network options. NetworkSettings = new NetworkSettings { TargetGoogleSearch = true }, // Declare whether or not this campaign contains political ads targeting the EU. ContainsEuPoliticalAdvertising = EuPoliticalAdvertisingStatus.DoesNotContainEuPoliticalAdvertising, };
PHP
private static function addThingsToDoCampaign( GoogleAdsClient $googleAdsClient, int $customerId, string $budgetResourceName, int $thingsToDoCenterAccountId ) { // Creates a campaign. $campaign = new Campaign([ 'name' => 'Interplanetary Cruise Campaign #' . Helper::getPrintableDatetime(), // Configures settings related to Things to do campaigns including advertising channel // type, advertising channel sub type and travel campaign settings. 'advertising_channel_type' => AdvertisingChannelType::TRAVEL, 'advertising_channel_sub_type' => AdvertisingChannelSubType::TRAVEL_ACTIVITIES, 'travel_campaign_settings' => new TravelCampaignSettings(['travel_account_id' => $thingsToDoCenterAccountId]), // Recommendation: Set the campaign to PAUSED when creating it to prevent // the ads from immediately serving. Set to ENABLED once you've added // targeting and the ads are ready to serve. 'status' => CampaignStatus::PAUSED, // Sets the bidding strategy to MaximizeConversionValue. Only this type can be used // for Things to do campaigns. 'maximize_conversion_value' => new MaximizeConversionValue(), // Sets the budget. 'campaign_budget' => $budgetResourceName, // Configures the campaign network options. Only Google Search is allowed for // Things to do campaigns. 'network_settings' => new NetworkSettings(['target_google_search' => true]), // Declare whether or not this campaign serves political ads targeting the EU. 'contains_eu_political_advertising' => EuPoliticalAdvertisingStatus::DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING ]); // Creates a campaign operation. $campaignOperation = new CampaignOperation(); $campaignOperation->setCreate($campaign); // Issues a mutate request to add campaigns. $campaignServiceClient = $googleAdsClient->getCampaignServiceClient(); $response = $campaignServiceClient->mutateCampaigns( MutateCampaignsRequest::build($customerId, [$campaignOperation]) ); /** @var Campaign $addedCampaign */ $addedCampaign = $response->getResults()[0]; printf( "Added a Things to do campaign with resource name '%s'.%s", $addedCampaign->getResourceName(), PHP_EOL ); return $addedCampaign->getResourceName(); }