-
Notifications
You must be signed in to change notification settings - Fork 509
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
Conversation
that shows how to include geo targeting and image extensions.
""" | ||
This example shows how to create a complete Responsive Search ad. |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
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. |
...that shows how to include geo targeting and image extensions. These changes are simply:
basic_operations/add_responsive_search_ad.py
example.advanced_operations/add_responsive_search_ad_full.py
example so that it's now the mainadd_responsive_search_ad.py
example.