The first step in implementing Things to do ads is creating a Things to do
campaign. When creating the campaign, you configure its budget, bidding
strategy, network settings, and Things to do Center account ID.

## Campaign setup steps

Follow these steps to configure a Things to do campaign:

1. Create a [`CampaignBudget`](https://developers.google.com/google-ads/api/reference/rpc/v26/CampaignBudget.md.txt) (shared or non-shared) with a `STANDARD` `delivery_method` (`ACCELERATED` delivery isn't supported) and assign its resource name to [`campaign_budget`](https://developers.google.com/google-ads/api/reference/rpc/v26/Campaign.md.txt#campaign_budget) (see `add_campaign_budget` in the [complete code sample](https://developers.google.com/google-ads/api/samples/add-things-to-do-ad.md.txt)).
2. Set the campaign's [`advertising_channel_type`](https://developers.google.com/google-ads/api/reference/rpc/v26/Campaign.md.txt#advertising_channel_type) to [`TRAVEL`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdvertisingChannelTypeEnum.AdvertisingChannelType.md.txt#travel) and [`advertising_channel_sub_type`](https://developers.google.com/google-ads/api/reference/rpc/v26/Campaign.md.txt#advertising_channel_sub_type) to [`TRAVEL_ACTIVITIES`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdvertisingChannelSubTypeEnum.AdvertisingChannelSubType.md.txt#travel_activities).
3. Create a [`TravelCampaignSettings`](https://developers.google.com/google-ads/api/reference/rpc/v26/Campaign.TravelCampaignSettings.md.txt) object, set its [`travel_account_id`](https://developers.google.com/google-ads/api/reference/rpc/v26/Campaign.TravelCampaignSettings.md.txt#travel_account_id) to your Things to do Center account ID (see [Prerequisites](https://developers.google.com/google-ads/api/docs/things-to-do-ads/overview.md.txt#prerequisites)), and assign it to the campaign.
4. Configure a standard (campaign-level) [`MaximizeConversionValue`](https://developers.google.com/google-ads/api/reference/rpc/v26/MaximizeConversionValue.md.txt) bidding strategy on the campaign with a [`target_roas`](https://developers.google.com/google-ads/api/reference/rpc/v26/MaximizeConversionValue.md.txt#target_roas) value (required; portfolio bidding strategies aren't supported), enable Google Search targeting (`network_settings.target_google_search = true`), and declare the campaign's [`contains_eu_political_advertising`](https://developers.google.com/google-ads/api/reference/rpc/v26/Campaign.md.txt#contains_eu_political_advertising) status.

## Code example

The following code example demonstrates how to create a Things to do campaign
(see the [complete code sample](https://developers.google.com/google-ads/api/samples/add-things-to-do-ad.md.txt) for budget creation):

> [!NOTE]
> **Note:** The `travel/add_things_to_do_ad` sample initializes `MaximizeConversionValue` without setting `target_roas`. When creating a Things to do campaign, you must also populate [`target_roas`](https://developers.google.com/google-ads/api/reference/rpc/v26/MaximizeConversionValue.md.txt#target_roas) (for example, `campaign.maximize_conversion_value.target_roas = 1.5` in Python).


### Java

```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#

```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

```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();
    }
      
```

### Python

```python
def add_things_to_do_campaign(
    client: GoogleAdsClient,
    customer_id: str,
    budget_resource_name: str,
    things_to_do_center_account_id: int,
) -> str:
    """Creates a new Things to do campaign in the specified customer account.

    Args:
        client: an initialized GoogleAdsClient instance.
        customer_id: a client customer ID.
        budget_resource_name: the resource name of a budget for a new campaign.
        things_to_do_center_account_id: the Things to Do Center account ID.

    Returns:
        The resource name of the newly created campaign.
    """
    # Creates a campaign operation.
    operation: CampaignOperation = client.get_type("CampaignOperation")
    # Creates a campaign.
    campaign: Campaign = operation.create
    campaign.name = (
        f"Interplanetary Cruise Campaign #{get_printable_datetime()}"
    )
    # Configures settings related to Things to do campaigns including
    # advertising channel type, advertising channel sub type and travel
    # campaign settings.
    campaign.advertising_channel_type = (
        client.enums.AdvertisingChannelTypeEnum.TRAVEL
    )
    campaign.advertising_channel_sub_type = (
        client.enums.AdvertisingChannelSubTypeEnum.TRAVEL_ACTIVITIES
    )
    campaign.travel_campaign_settings.travel_account_id = (
        things_to_do_center_account_id
    )
    # 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.
    campaign.status = client.enums.CampaignStatusEnum.PAUSED
    # Sets the bidding strategy to MaximizeConversionValue. Only this type can
    # be used for Things to do campaigns.
    campaign.maximize_conversion_value = client.get_type(
        "MaximizeConversionValue"
    )
    # Sets the budget.
    campaign.campaign_budget = budget_resource_name
    # Configures the campaign network options. Only Google Search is allowed for
    # Things to do campaigns.
    campaign.network_settings.target_google_search = True
    # Declare whether or not this campaign serves political ads targeting the
    # EU. Valid values are:
    #   CONTAINS_EU_POLITICAL_ADVERTISING
    #   DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING
    campaign.contains_eu_political_advertising = (
        client.enums.EuPoliticalAdvertisingStatusEnum.DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING
    )

    # Issues a mutate request to add campaigns.
    campaign_service: CampaignServiceClient = client.get_service(
        "CampaignService"
    )
    response: MutateCampaignsResponse = campaign_service.mutate_campaigns(
        customer_id=customer_id, operations=[operation]
    )

    resource_name: str = response.results[0].resource_name
    print(
        f"Added a Things to do campaign with resource name: '{resource_name}'."
    )
    return resource_name
      
```

### Ruby

```ruby
def add_things_to_do_campaign(client, customer_id, budget_resource,
  things_to_do_center_account_id)

  # Create a campaign.
  campaign_operation = client.operation.create_resource.campaign do |c|
    c.name = generate_random_name_field("Interplanetary Cruise Campaign")

    #  Configures settings related to Things to Do campaigns including
    # advertising channel type, advertising channel sub type and
    # travel campaign settings.
    c.advertising_channel_type = :TRAVEL
    c.advertising_channel_sub_type = :TRAVEL_ACTIVITIES

    c.travel_campaign_settings = client.resource.travel_campaign_settings do |tcs|
      tcs.travel_account_id = things_to_do_center_account_id
    end

    # 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.
    c.status = :PAUSED

    # Sets the bidding strategy to MaximizeConversionValue. Only this type can
    # be used for Things to Do campaigns.
    c.maximize_conversion_value = client.resource.maximize_conversion_value

    # Set the budget.
    c.campaign_budget = budget_resource

    # Configures the campaign network options. Only Google Search is allowed for
    # Things to Do campaigns.
    c.network_settings = client.resource.network_settings do |ns|
      ns.target_google_search = true
    end

    # Declare whether or not this campaign serves political ads targeting the EU.
    # Valid values are CONTAINS_EU_POLITICAL_ADVERTISING and
    # DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING.
    c.contains_eu_political_advertising = :DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING
  end

  # Issue a mutate request to add the campaign.
  campaign_service = client.service.campaign
  response = campaign_service.mutate_campaigns(
    customer_id: customer_id,
    operations: [campaign_operation],
  )

  # Fetch the new campaign's resource name.
  campaign_resource = response.results.first.resource_name

  puts "Added Things To Do campaign with resource name '#{campaign_resource}'."

  campaign_resource
end
      
```

### Perl

```perl
sub add_things_to_do_campaign {
  my ($api_client, $customer_id, $budget_resource_name,
    $things_to_do_center_account_id)
    = @_;

  # Create a campaign.
  my $campaign = Google::Ads::GoogleAds::V26::Resources::Campaign->new({
      name => "Interplanetary Cruise Campaign #" . uniqid(),
      # Configure settings related to Things to do campaigns including
      # advertising channel type, advertising channel sub type and travel
      # campaign settings.
      advertisingChannelType    => TRAVEL,
      advertisingChannelSubType => TRAVEL_ACTIVITIES,
      travelCampaignSettings    =>
        Google::Ads::GoogleAds::V26::Resources::TravelCampaignSettings->new({
          travelAccountId => $things_to_do_center_account_id
        }
        ),
      # 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 => Google::Ads::GoogleAds::V26::Enums::CampaignStatusEnum::PAUSED,
      # Set the bidding strategy to MaximizeConversionValue. Only this type can be
      # used for Things to do campaigns.
      maximizeConversionValue =>
        Google::Ads::GoogleAds::V26::Common::MaximizeConversionValue->new(),
      # Set the budget.
      campaignBudget => $budget_resource_name,
      # Declare whether or not this campaign serves political ads targeting the EU.
      # Valid values are CONTAINS_EU_POLITICAL_ADVERTISING and
      # DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING.
      containsEuPoliticalAdvertising =>
        DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING,
      # Configure the campaign network options. Only Google Search is allowed for
      # Things to do campaigns.
      networkSettings =>
        Google::Ads::GoogleAds::V26::Resources::NetworkSettings->new({
          targetGoogleSearch => "true"
        })});

  # Create a campaign operation.
  my $campaign_operation =
    Google::Ads::GoogleAds::V26::Services::CampaignService::CampaignOperation->
    new({create => $campaign});

  # Add the campaign.
  my $campaign_resource_name = $api_client->CampaignService()->mutate({
      customerId => $customer_id,
      operations => [$campaign_operation]})->{results}[0]{resourceName};

  printf "Added a Things to do campaign with resource name: '%s'.\n",
    $campaign_resource_name;

  return $campaign_resource_name;
}
      
```

### curl

> [!NOTE]
> **Note:** While a direct REST code sample for this step isn't provided here, you can achieve this using a manual REST request.   
>
> Refer to the Google Ads API REST interface documentation and the method-specific reference pages. You will need to construct the JSON payload based on the proto definitions.   
>
> Key Resources:
>
> - [Using REST](https://developers.google.com/google-ads/api/rest/overview.md.txt)
> - [REST Interface Structure](https://developers.google.com/google-ads/api/rest/design/overview.md.txt)
> - [JSON Field Mappings](https://developers.google.com/google-ads/api/rest/design/json-mappings.md.txt)
> - Consult the [REST API Reference](https://developers.google.com/google-ads/api/reference/rpc/latest/overview) for the specific service and method.

<br />

## What's next

After creating a campaign, create at least one ad group and ad:

- [Create a Things to do ad group](https://developers.google.com/google-ads/api/docs/things-to-do-ads/create-ad-group.md.txt)
- [Create a Things to do ad group ad](https://developers.google.com/google-ads/api/docs/things-to-do-ads/create-ad-group-ad.md.txt)