承接 joelbutcher/googleads 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

joelbutcher/googleads

Composer 安装命令:

composer require joelbutcher/googleads

包简介

A lightweight and easy-to-configure extension for the Google Ads PHP Client, with OAuth2 support.

README 文档

README

Build Status Total Downloads Latest Stable Version License

A lightweight and easy-to-configure extension for the Google Ads PHP Client, with OAuth2 support.

Installation

Install the package using composer

`composer require joelbutcher/googleads

Configuration

To configure the service, provide an array with your client_id, client_secret, developer_token and Google Ads Account ID:

  $config = [
      'client_id' => '<your-app-client-id>',
      'client_secret' => '<your-app-client-secret>',
      'developer_token' => '<your-developer-token>',
      'login_customer_id' => '<your-app-client-id>',
  ];

  $googleAds = new GoogleAds($config);

Note, if you're using an MCC (Manager account), login_customer_id will need to be your MCC account ID.

Usage

Once you've configured the client, you are then ready to start using the client to interact with Google Ads. First, we need to authorize the user with a refresh token. This can be obtained from a simple OAuth flow with Google.

Make sure to request the adwords scope in your OAuth2.0 authorization request.

  // ...
  $googleAds->authorize($refreshToken);

If you're using an MCC and have configured your login_customer_id to use the MCC account ID, you will need to pass the ID of the account you are acting on behalf of, as the second parameter to the authorize method:

  // ...
  $googleAds->authorize($refreshToken, '<child-account-id>');

Interacting with Google Ads PHP SDK

Now that you're all configured and authenticated, you can now begin interacting with the underlying GoogleAdsClient class. You can call any of the services found here directly from the your $googleAds instance from the snippets above. For example, to retrieve the Campaign Service Client, simply call the following:

  // ...
  $googleAds->getCampaignServiceClient();

Versioning

Currently, we only support V9 of the Google Ads SDK.

Changelog

Check out the CHANGELOG in this repository for all the recent changes.

Maintainers

Developed and maintained by Joel Butcher

Credits

You can view all contributers here

License

This pacakge is open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 641
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-04-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固