spotonlive/laravel-google-ads
A Laravel wrapper for the Google Ads API that simplifies authentication and lets you manage campaigns, ad groups, ads, and reporting from your PHP application. Includes configuration, service provider, and facade integration for quick setup.
Architecture fit. The package is a thin Laravel adapter, not an API client in its own right: a ServiceProvider for container bindings, a Facade for static access, a publishable config file, and a wrapper class delegating to Google's official googleads/google-ads-php SDK. That is the correct shape for a Laravel integration, and it matches the idiomatic pattern teams already expect from packages like laravel/socialite or spatie/*. There is no unusual runtime footprint: no queues, no middleware, no migrations, no persisted state. From a pure architecture standpoint it slots in cleanly next to any existing Laravel service layer.
Integration feasibility. Installation is the easy part — composer require, publish config, populate env vars (developer token, client ID/secret, refresh token, login-customer-id for MCC access), then call the facade. Real feasibility hinges on three constraints that must be verified before committing:
illuminate/support at ^8.0|^9.0 and pin googleads/google-ads-php to a major version from that era. On Laravel 10 or 11, Composer will refuse to resolve without a fork or an inline constraint override.Technical risk. High, and concentrated rather than diffuse. The Laravel-side code is low-risk and small enough to audit in an afternoon. The risk is that the package sits between you and a fast-moving external API with a rigid deprecation calendar, and its release cadence (single release, 2022, 63 stars, MIT, effectively one maintainer) does not match that calendar. An opportunity score of 1.14 reinforces this: there is little community momentum to absorb the upgrade work. Additional risks: no visible CI/test suite to confirm behavior against a live or mocked API, ambiguous handling of login-customer-id (the most common cause of USER_PERMISSION_DENIED in multi-account setups), and no evidence of retry/backoff semantics around Google's per-developer-token rate limits.
Key questions to answer in a one-day spike.
googleads/google-ads-php version, and which hardcoded API version string, does the wrapper target? Is the version configurable or baked in?login-customer-id for MCC hierarchies, and how does it select the operating customer ID per call?Stack fit. Good for a Laravel 8/9 application that needs read-mostly reporting (campaign, ad group, and performance metrics) and is comfortable treating the package as a starting point rather than a supported dependency. Poor fit for a Laravel 11 codebase, for anything needing campaign management writes at scale, or for a team that expects upstream fixes.
Migration / adoption path. Three options, in ascending order of effort:
googleads/google-ads-php constraint and the API version constant, widen Laravel constraints, add a GAQL passthrough method if absent, and add a small integration test against a sandbox account. The codebase is small enough that this is measured in days, not weeks — but it makes you the maintainer.Compatibility work. Whichever path is chosen, pin the API version explicitly in config rather than relying on an SDK default, and add a calendar reminder tied to Google's deprecation schedule (sunset dates are published roughly a year ahead). Verify Octane safety: if the underlying client stores customer ID as instance state, bind it as a scoped (not singleton) service.
Sequencing.
AdMetricsRepository or similar) so the facade never appears in domain code. Store credentials in a secrets manager, not .env. Implement caching (reporting data is rarely real-time; a 15–60 minute TTL dramatically reduces quota consumption) and explicit backoff.Maintenance. Effectively you own it. No release since April 2022 means no dependency bumps, no security patches, and no response to Google's API deprecations. Budget recurring effort for the annual (or faster) API version migration, whether you fork or rebuild — the difference is only whether you also inherit someone else's abstractions.
Support. No vendor. Escalation path is reading the official SDK's source and Google's release notes. Acceptable for a small internal tool; a poor story if ad spend attribution is on a revenue-critical dashboard.
Scaling. The wrapper itself scales trivially — it is stateless PHP. The real ceilings are external: developer-token access tier (basic vs. standard, differing by orders of magnitude in daily operation quota), per-customer rate limits, and OAuth token management. The package provides no batching, caching, or throttling layer, so all of that is yours to build. For multi-account MCC reporting, expect to add a job fan-out with rate limiting rather than looping synchronously.
Failure modes to instrument explicitly.
USER_PERMISSION_DENIED — almost always a missing or wrong login-customer-id in MCC setups.config:cache in deploy pipelines means credential changes require a redeploy; document this.composer update resolving to an incompatible SDK major, breaking the facade's assumptions.Ramp-up. Low to install, moderate to operate, high to trust. A Laravel developer can wire the facade in under an hour; the actual learning curve is Google Ads domain knowledge — GAQL syntax, customer ID versus MCC ID, developer-token approval tiers, and the OAuth consent-screen states — none of which the package abstracts away. Plan for one engineer to own that domain rather than distributing it.
How can I help you explore Laravel packages today?