Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Replace main add_responsive_search_ad example with newer version... #753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

BenRKarl
Copy link
Contributor

@BenRKarl BenRKarl commented Mar 3, 2023

...that shows how to include geo targeting and image extensions. These changes are simply:

  1. Deletes the existing basic_operations/add_responsive_search_ad.py example.
  2. Moves the advanced_operations/add_responsive_search_ad_full.py example so that it's now the main add_responsive_search_ad.py example.

that shows how to include geo targeting and image extensions.
@BenRKarl BenRKarl requested a review from a team as a code owner March 3, 2023 14:01
@BenRKarl BenRKarl requested review from wihl, laurachevalier4, AnashOommen and bobhancock and removed request for wihl and laurachevalier4 March 3, 2023 14:01
"""
This example shows how to create a complete Responsive Search ad.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do we mean by complete?

"""
This example shows how to create a complete Responsive Search ad.

Includes creation of: budget, campaign, ad group, ad group ad,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is what we mean by complete, consider changing the previous sentence to be

... to create a Responsive Search Ad with ....

def main(client, customer_id, ad_group_id):
ad_group_ad_service = client.get_service("AdGroupAdService")
# Keywords from user.
_KEYWORD_TEXT_EXACT_1 = "example of exact match"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of an initial underbar is very confusing since variable that begin this way are handled in a specific way by the Python import system. Capital letters are sufficient to indicate global variables.

ad_group.campaign = campaign_resource_name
ad_group.type_ = client.enums.AdGroupTypeEnum.SEARCH_STANDARD

# If you want to set up a max CPC bid uncomment line below.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the line below


image_asset_resource_name = mutate_asset_response.results[0].resource_name

# Step 6.2 - Create Image Extension
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we including this example of extensions? As of 3 April 2023 we want people to stop doing this. Some users, if they are early in the migration process will no longer be able to do this.

I recommend not including any code that deals with extensions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recall we discussed offline that these changes are just a renaming existing example that we recently approved (#715).

We'll update this example (along with others) so that it uses assets around when the April 3 migration happens, for now this does illustrate the correct workflow for this type of functionality, right?

@BenRKarl
Copy link
Contributor Author

Closing this PR for now so that we can update the example to use image assets before making it the default example for adding RSAs.

@BenRKarl BenRKarl closed this Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants