Skip to content
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

Update Google Ads API to v18 #2740

Merged
merged 13 commits into from
Dec 20, 2024
Merged

Update Google Ads API to v18 #2740

merged 13 commits into from
Dec 20, 2024

Conversation

mikkamp
Copy link
Contributor

@mikkamp mikkamp commented Dec 19, 2024

Changes proposed in this Pull Request:

This PR update the Ads API to use V18. The composer packages were already updated in a previous PR.

Required changes:

V16 > V17
GoogleAdsService Search requests: Passing a page_size to GoogleAdsService.Search will result in a RequestError.PAGE_SIZE_NOT_SUPPORTED error.

V17 > V18
GoogleAdsService: The summary_row_setting and return_total_results_count fields in SearchGoogleAdsRequest are now part of the new SearchSettings object.

The original pagination support for campaigns was reverted from this PR, as the Google Ads API has removed the pageSize parameter and sets it to a fixed value of 10000 rows. For general use cases that's ok because of the associated costs most merchants won't be managing 1000's of campaigns.
The initial reason why we did add pagination to the campaigns endpoint is to support the use case where the mobile app only wanted to fetch a single campaign. For this purpose I've left the per_page parameter in place to limit the API response. We still get the full set from the Ads API but we limit the results sent to the API. Because of this limitation it's not possible to fetch subsequent pages. We have a feature request open if we want to implement a full pagination support in the future.

As a temporary measure the headers returning totals and pagination parameters was removed in this PR until we are ready to fully support pagination. I also added some CSS to remove the pagination from the list of campaigns in the dashboard, since this doesn't work.

image

Detailed test instructions:

  1. Check out this PR
  2. Reinstall composer packages: rm -rf vendor && composer install
  3. Rebuild JS: nvm use && npm start
  4. Do a full smoke tests with all requests to the Ads API
  5. Test creation of campaigns (with/without assets), as well as edit and delete of campaigns

Additional details:

pcTzPl-2zd-p2

Changelog entry

  • Update - Google Ads API to v18.

@mikkamp mikkamp self-assigned this Dec 19, 2024
@github-actions github-actions bot added the changelog: update Big changes to something that wasn't broken. label Dec 19, 2024
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 96.15385% with 1 line in your changes missing coverage. Please review.

Project coverage is 67.0%. Comparing base (d9c3385) to head (59a6222).
Report is 18 commits behind head on develop.

Files with missing lines Patch % Lines
src/API/Google/Query/AdsQuery.php 88.9% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             develop   #2740     +/-   ##
===========================================
+ Coverage       67.0%   67.0%   +0.1%     
+ Complexity      4692    4690      -2     
===========================================
  Files            479     479             
  Lines          19612   19601     -11     
===========================================
+ Hits           13136   13141      +5     
+ Misses          6476    6460     -16     
Flag Coverage Δ
php-unit-tests 67.0% <96.2%> (+0.1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/API/Google/Ads.php 100.0% <ø> (+11.3%) ⬆️
src/API/Google/AdsAsset.php 95.2% <ø> (ø)
src/API/Google/AdsAssetGroup.php 83.3% <100.0%> (+0.1%) ⬆️
src/API/Google/AdsAssetGroupAsset.php 84.8% <ø> (ø)
src/API/Google/AdsCampaign.php 97.4% <100.0%> (-0.1%) ⬇️
src/API/Google/AdsCampaignBudget.php 92.7% <ø> (ø)
src/API/Google/AdsCampaignCriterion.php 100.0% <ø> (ø)
src/API/Google/AdsCampaignLabel.php 100.0% <ø> (ø)
src/API/Google/AdsConversionAction.php 97.6% <ø> (ø)
src/API/Google/AdsReport.php 100.0% <ø> (ø)
... and 11 more

... and 1 file with indirect coverage changes

@mikkamp mikkamp requested a review from a team December 19, 2024 17:37
Copy link
Member

@ianlin ianlin left a comment

Choose a reason for hiding this comment

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

Thanks for updating the Google Ads API. I ran the full smoke tests, created campaigns with/without assets, everything worked as expected.

@mikkamp mikkamp merged commit a6db2da into develop Dec 20, 2024
14 checks passed
@mikkamp mikkamp deleted the update/google-ads-api-v18 branch December 20, 2024 16:55
@tomalec tomalec mentioned this pull request Dec 25, 2024
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: update Big changes to something that wasn't broken.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants