background preloader

Google Adwords

Facebook Twitter

The AdWords Query Language (AWQL) - AdWords API. Performing Bulk Mutate Jobs - AdWords API. NoClientLibrary - google-api-adwords-php - Instructions on how to use the AdWords API in PHP if you don't want to use the client library. - AdWords and DoubleClick Ad Exchange Buyer API PHP Client Library. If you plan to make requests to the AdWords API calls with PHP we recommend you to use the AdWords API PHP client library. If you don't wish to use the client library and would rather implement your own solution this document explains how to get started.

The example below use a Google Account, AdWords API v201109, and PHP 5.2.11 with the extensions SoapClient, OpenSSL and cURL. The API requests are made to the AdWords API Sandbox. Authentication is handled using the ClientLogin API. It is a simple HTTP API that takes the email and password of a Google account and returns an authentication token that must be included with all requests to the AdWords API.

A successful response will include a series of tokens, one per line. SID=DQAAAGgA...7Zg8CTN LSID=DQAAAGsA...lk8BBbG Auth=DQAAAGgA...dk3fA5N The example below demonstrates how to generate an auth token for a given email address and password. <? Making Your First Request - AdWords API. This tutorial demonstrates how to connect to CampaignService and add a new campaign in different languages.

Making Your First Request - AdWords API

Client libraries for other popular programming languages are also available, each bundled with installation instructions and a variety of code examples. Here is a basic example showing how to add a campaign in Java. AdWords API Blog. AdWords API Blog: Discover v201109 - AdHoc Reports. AdHoc reports is one of the new features we introduced in v201109 of the AdWords API.

AdWords API Blog: Discover v201109 - AdHoc Reports

AdHoc reports are free, synchronous and don’t require a stored report definition. This blog post explains this new feature and covers the best practices. Downloading the report AdHoc reports utilizes plain HTTP POST requests to generate reports synchronously from the AdWords API server. A raw HTTP request to download the reports is shown below: Report Types - AdWords API. This page lists and describes the fields in available reports.

Report Types - AdWords API

See the Reporting Concepts guide for an explanation of attribution types. Single attribution Multiple attribution Although you can use most reports to gather information about the structure and content of your account, the reports in this list are unique because they do not include any performance stats. The reports below include Google Analytics metrics such as AveragePageviews, BounceRate, AverageTimeOnSite, and PercentNewVisitors. Field attributes The first column in the tables below contains the field names to use when constructing a report request.

NoClientLibrary - google-api-adwords-php - Instructions on how to use the AdWords API in PHP if you don't want to use the client library. - AdWords and DoubleClick Ad Exchange Buyer API PHP Client Library. Enum ReportDefinition.ReportType (v201206) - AdWords API. NoClientLibrary - google-api-adwords-dotnet - This article explains how to use AdWords API v201109 with C# without using the AdWords API dotnet client library. - AdWords API DotNet Client Library.

While using AdWords API v201309 with .NET languages (C#, VB.NET, etc.), we recommend you to use the AdWords API .NET client library. But in case you don't want to use the client library, but rather want to write your own custom solution, this document explains how you can get that done. All the code samples are written in C#, but can be easily translated to VB.NET or Managed C++. AdWords API uses OAuth2 as its primary authentication mechanism. You can learn more about Google's support of OAuth2 at AdWords API supports web flow, installed application flow and service account flows for OAuth2. The OAuth2 scope for AdWords API is There are several open source libraries that provide OAuth2 implementation, DotNet OpenAuth is a typical example. Option 1: Make a raw API call The benefit of this approach is that you have finer control over items like SOAP request or response xmls, the underlying HTTP connection and its settings, etc.

A. This throws the following exception: NoClientLibrary - google-api-adwords-python-lib - Guide for making the AdWords API calls in Python without the client library. - AdWords API Python Client Library. An Example of calling the AdHoc reporting of the Google Adwords API v201109. ReportDefinitionService (v201206) - AdWords API. AdWords API Blog: Downloading reports for lots of client accounts. Reporting has changed significantly with v201109.

AdWords API Blog: Downloading reports for lots of client accounts

We’d like to take this opportunity to discuss how to download reports for lots of clients simultaneously. To download reports for a large number of client accounts, we recommend requesting the download of these reports simultaneously. We recommend requesting no more than 10 reports concurrently and to use one thread for each concurrent download. If for some reason the report download fails, we recommend you retry after a short wait. The length of the wait should increase with the number of times the request has been tried (known as Exponential Backoff). You should check the specific reason the download failed and only retry if it was a transient error (such as exceeding the rate limit) instead of retrying if the report definition XML was invalid.

HTTP Status 500 indicates there is a transient server side issue and the request can be retried after a delay. Seo - How To Get Started Working with the Google AdWords API. Sign in to mobile or desktop apps - Google Apps Help. Users enrolled in 2-Step Verification need to periodically enter a special verification code, in addition to their username and password, to sign in to Google Apps.

Sign in to mobile or desktop apps - Google Apps Help

When signing in from a web browser, they're prompted to enter this code after entering their password. However, desktop and mobile applications aren't configured to accept a verification code—there's no field for entering it. In these cases, they need to sign in by entering another type of code—called an application-specific password—in place of their Google Account password. How do my users generate and use application-specific passwords? Have your users follow the instructions in Sign in using application-specific passwords. If this link doesn't work, follow these steps: Sign in to your Google Apps Gmail Account and click Account Settings (at the top right corner of the window). 2-Step Verification in a browser vs. a desktop or mobile app Deployment tips for Google Apps administrators.

Video Guides - AdWords API. Google Data API - Sample Usage: ClientLogin with PHP CURL. I find it quite hard having a comprehensive sample or documentation on using Google data services with bare PHP code.

Google Data API - Sample Usage: ClientLogin with PHP CURL

Finally - with some trials and errors - can get things done and now fully understand how to interact with GData Protocol. One of the basic ways to interact with Google data services is to use ClientLogin, in which your web application or desktop application can authenticate into Google services using raw http and xml protocol. So, based on Google documentation at how to use curl, I have written some PHP codes to test against each service. One that had been fully tested is Picasa. There are several issues when I try to use ClientLogin mechanism in PHP : The application doesn't know the SSL key and if we can add it dynamically, it will be limited if you are using shared host environment.You have to construct your own HTTP header as authentication process part.

Thanks to curl library function that can overcome all the issues. Obtaining Login Token <? <? Using the service. AdWords API Blog: adhoc reports. AdHoc reports is one of the new features we introduced in v201109 of the AdWords API.

AdWords API Blog: adhoc reports

AdHoc reports are free, synchronous and don’t require a stored report definition. This blog post explains this new feature and covers the best practices. Downloading the report. SOAP Headers - AdWords API. Using the Sandbox - AdWords API. ClientLogin for Installed Applications - Google Accounts Authentication and Authorization. Important: ClientLogin has been officially deprecated as of April 20, 2012.

ClientLogin for Installed Applications - Google Accounts Authentication and Authorization

It will continue to work as per our deprecation policy, but we encourage you to migrate to OAuth 2.0 as soon as possible. Important: If any of your customers are having trouble with ClientLogin, their account may not be compatible with it for a variety of possible reasons. For example, accounts that use 2-step verification, SAML, or Open ID are not compatible with ClientLogin. One workaround is to tell users to generate a single-use password, provided by access codes, which allows them to log in to their account in a web browser and generate a long password that they can type into the password field of any application using ClientLogin. OAuth 1.0 for Web Applications - Google Accounts Authentication and Authorization. Important: OAuth 1.0 has been officially deprecated as of April 20, 2012.

OAuth 1.0 for Web Applications - Google Accounts Authentication and Authorization

It will continue to work as per our deprecation policy, but we encourage you to migrate to OAuth 2.0 as soon as possible. This document describes how to get started using Google's implementation of the OAuth protocol to authorize a web application's requests for access to a user's data. If instead your application is installed on a computer or a mobile device, you should read the documentation on OAuth for Installed Apps. If you want to allow users to sign in to your application using OpenID, you can find more information about implementing the Hybrid Protocol (OAuth+OpenID) in the OpenID documentation. Prerequisites This document is written for web application developers using the Google Data APIs to access a user's data. Contents The OAuth authorization process The OAuth authorization process involves a series of interactions between your web application, Google's authorization servers, and the end user.

AdWords API. Adwords adgroup mutate service. AdWords API Blog: January 2011. AdWords supports several campaign targeting options to ensure that your ads are shown only to the target audience you choose. As a developer, you can use the CampaignTargetService of AdWords API to set your campaign targets programmatically. This blog summarizes the various targeting options available through CampaignTargetService and how you can use them in your application. Ad Schedule Target AdScheduleTarget allows you to specify the dates and times at which your ads will be displayed.

For example, the following C# code snippet targets your ads to run only on Mondays to Fridays, 9 AM to 5 PM. List If you create an empty AdScheduleTargetList, then your ads are served all the time. Demographic Targeting DemographicTarget allows you to specify the gender and age group of your ad’s audience. If you create an empty DemographicTargetList, then your ads are served to audience of all demographics.

Geographic Targeting Language targeting Mobile Targeting Network Targets Platform Targets. Zero-impression data in AdWords API reports. PHP v201109 ReportDefinitionService->mutate() Overview of the AdWords API - AdWords API.