hi team
I have now successfully linked custom_conversion_goal to a specific campaign by modifying conversion_goal_campaign_config.
Sample Code
```python
conversion_goal_campaign_config_service = client.get_service("ConversionGoalCampaignConfigService")
conversion_goal_campaign_config_operation = client.get_type("ConversionGoalCampaignConfigOperation")
conversion_goal_campaign_config.resource_name = "customers/xxxxxxx/conversionGoalCampaignConfigs/xxxxxxx"
conversion_goal_campaign_config.custom_conversion_goal = "customers/xxxxx/customConversionGoals/xxxxx"
client.copy_from(
conversion_goal_campaign_config_operation.update_mask,
protobuf_helpers.field_mask(None, conversion_goal_campaign_config._pb)
)
conversion_goal_campaign_config_service.mutate_conversion_goal_campaign_configs(
customer_id=customer_id, operations=[conversion_goal_campaign_config_operation]
)
```
However, the custom_conversoin_goal added by modifying conversion_goal_campaign_config will display an unnecessary default custom conversion goal in the UI interface.
I don't need goals other than custom, so I need to delete them. And I have successfully deleted them by comparing the campaign_conversion_goal of two campaigns with the same custom_conversion_goal and modifying the biddable. The sample code is as follows
```python
campaign_conversion_goal_service = client.get_service("CampaignConversionGoalService")
campaign_conversion_goal_operation = client.get_type("CampaignConversionGoalOperation")
campaign_conversion_goal = campaign_conversion_goal_operation.update
campaign_conversion_goal.resource_name = f"customers/{customer_id}/campaignConversionGoals/xxxxx~{category}~{origin}"
campaign_conversion_goal.biddable = biddable
client.copy_from(
campaign_conversion_goal_operation.update_mask,
protobuf_helpers.field_mask(None, campaign_conversion_goal._pb)
)
campaign_conversion_goal_response = campaign_conversion_goal_service.mutate_campaign_conversion_goals(
customer_id=customer_id, operations=[campaign_conversion_goal_operation]
)
```
However, this will bring a problem, that is, I must know in advance which campaign uses the custom_conversion_goal I need, so that when I use this custom_conversion_goal, I can query the biddable in the campaign_conversion_goal and delete the default custom_conversion_goal. So, if I want to directly obtain the campaign_conversion_goal information through the condition of
custom_conversion_goal.name = xxx, how should I do it?