Due to low activity in the Alerting Framework for AdWords project, we've decided to deprecate it on September 28, 2018. There will not be any updates for AdWords API version migrations or issue tracking after this date. Please clone or fork this repository and migrate to the latest AdWords API version if you intend to continue using the code. This repository will be removed on or after 12th January 2019.
We encourage you to own and maintain this project. Please fork or clone the repository and follow the Google Ads Developer Blog for notifications of upcoming API migrations.
Your feedback is valuable to us in shaping our products. If you have comments or suggestions, please raise these on the project’s issue page.
All the best for your future ads integrations.
Google Ads team
Alerting Framework for AdWords is an open source Java framework for large scale AdWords API alerting. It's based on the [Java AdWords API client library] (https://github.com/googleads/googleads-java-lib). This framework is capable of downloading AdWords report data and combining with other data feeds, and processing them according to specified alert rules and alert actions in the configuration. You can use our sample alerts to explore how it works or set up your own fully customized logic. The alerts available through this tool cater to both new and experienced users. Users can set up simple alerts with sample alert entities, or implement custom alert entities through the interfaces and plug into the system.
You will need Java, Maven and MySQL installed before configuring the project.
You can clone the git repository into a local folder by executing the following command:
$ git clone https://github.com/googleads/adwords-alerting
And compile the Alerting Framework for AdWords using Maven by executing the following command:
$ mvn compile dependency:copy-dependencies package
vi java/resources/aw-alerting-sample.properties
vi java/resources/aw-alerting-alerts-sample.json
java -Xmx4G -jar aw-alerting.jar -file <file>
Arguments:
-accountIdsFile <file> ONLY run the alerting logic for client customer IDs
specified in the file
-debug Display all the debug information. If option 'verbose'
is present, all the information will be displayed on
the console as well
-file <file> The properties file (please refer to the file
./aw-alerting-sample.properties as an example)
-help Display full help information
Alert report downloader is responsible for downloading report data for further processing (e.g. apply rules and actions). We provide an implementation AwqlReportDownloader that downloads report data using AWQL. Custom alert report downloader:
com.google.api.ads.adwords.awalerting.downloader.AlertReportDownloader
,
andAlert rules are responsible for:
Custom alert rules:
com.google.api.ads.adwords.awalerting.rule.AlertRule
, andAlert actions are responsible for processing each report entry, and:
Custom alert actions:
com.google.api.ads.adwords.awalerting.action.AlertAction
, andJust edit the JSON configuration file:
Under ReportDownloader
, put class name of the custom alert
report downloader in ClassName
field, along with any other
parameters that will be passed to the custom alert report downloader's
constructor. For example:
"ReportDownloader": {
"ClassName": "AwqlReportDownloader",
"ReportQuery": {
"ReportType": "KEYWORDS_PERFORMANCE_REPORT",
"Fields": "ExternalCustomerId,Id,Criteria,Impressions,Ctr",
"Conditions": "Impressions > 100 AND Ctr < 0.05",
"DateRange": "YESTERDAY"
}
}
Under Rules
, put class name of the custom alert rule in
ClassName
field, along with other parameters that will be
passed to the custom alert rule's constructor. For example:
"Rules": [
{
"ClassName": "AddAccountManager"
},
{
"ClassName": "AddAccountMonthlyBudget"
}
]
Under Actions
, put class name of the custom alert rule in
ClassName
field, along with other parameters that will be
passed to the custom alert rule's constructor. For example:
"Actions": [
{
"ClassName": "SimpleConsoleWriter"
},
{
"ClassName": "PerAccountManagerEmailSender",
"Subject": "Low impression accounts",
"CC": "[email protected],[email protected]"
}
]
Pull requests are very much appreciated. Please sign the [Google Code contributor license agreement] (https://cla.developers.google.com/about/google-individual) (There is a convenient online form) before submitting.