Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Creatine is an open-source and scalable solution that runs on Google Cloud Platform, that can be used to store daily snapshots of a Google Ads account hierarchy and eventually monitor Ads disapproval over time.

License

google/creatine-ads-inspector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

⚡ Creatine - Ads Inspector

This is not an officially supported Google product.

Creatine is a scalable solution that runs on Google Cloud Platform, uses Google Ads API to take snapshots of Google Ads account hierarchy, stores them on BigQuery and creates a report to monitor Ads disapprovals over time.

Intended audience

Java Developer and Google Cloud administrator

It is assumed that the user is familiar with Google Ads API and Google Cloud platform

Prerequisites

  1. Your Google Ads API Client ID, Client Secret, Developer Token, Refresh Token and Main MCC ID (No test account, only Basic or Standard access) are required.

For more information on how to get those credentials, please see the Ads Dev Guide : https://developers.google.com/adwords/api/docs/guides/first-api-call

For more information on Access levels, please see the documentation available : https://developers.google.com/adwords/api/docs/access-levels

This solution leverages:

Quick start

Deploy the solution:

  1. Create a Google Cloud project via the Cloud console or with the following script

     export PROJECT_ID="ads-creatine-${RANDOM:0:4}"
     gcloud projects create $PROJECT_ID --enable-cloud-apis --set-as-default

    Take note of the PROJECT_ID value, as we it will be used in next steps.

  2. Enable Google, Google Ads, Datastore, BigQuery, Compute Engine and Google Cloud Storage APIs via the cloud console or using a script

       gcloud services enable googleads.googleapis.com \
       datastore.googleapis.com \
       bigquery-json.googleapis.com \
       compute.googleapis.com \
       storage-api.googleapis.com \
       --async
  3. Download source code on your worksation (not a cloud VM), you can get the code from github

       git clone https://github.com/google/creatine-google-ads-inspector
  4. cd creatine/

  5. run gcloud init to ensure that your are on the right Cloud project

  6. Open pom.xml and update the GCP_PROJECT_ID placeholder with the ID of the project you created (under element project > build > plugins > plugin)

  7. Create a new datastore entity via the Cloud Console.

    (If requested, select "Cloud Datastore" for data storage, and a convenient location.)

    Select the "query by kind" tab :

    • namespace: [default]
    • kind: googleadsconfig
    • key identifier: Numeric ID (auto-generated)
  8. Edit googleadsconfig entity and create a new property

    • Name: creds
    • Type: text
    • Value:
    { 
      "api.googleads.clientId":"YOUR_CLIENT_ID",
      "api.googleads.clientSecret":"YOUR_CLIENT_SECRET",
      "api.googleads.refreshToken":"YOUR_REFRESH_CONTENT",
      "api.googleads.loginCustomerId":"YOUR_LOGIN_CUSTOMER_ID",
      "api.googleads.developerToken":"YOUR_DEVELOPER_CONTENT" 
    }
  9. Create a BigQuery Dataset

    or using the following command line

    bq --location=EU mk --dataset "$PROJECT_ID":name_of_your_dataset
  10. Open application.properties file under src/main/resources

  11. Update the properties surrounded with <>

      bqDataSet=<BIGQUERY_DATASET_NAME>
      cloudProject=<PROJECT_ID>
      entityId=<DATASTORE_ENTITY_ID>
      gcsBucket=<GOOGLE_CLOUD_STORAGE_BUCKET_NAME>
      googleAdsMccId=<MAIN_MCC_ID> (same as the one from DataStore)

    eg:

      bqDataSet=creatine
      cloudProject=ads-creatine-2162
      entityId=5629499534213120
      gcsBucket=creatine
      googleAdsMccId=8053850078
  12. run mvn package appengine:deploy to deploy the app

  13. run gcloud app deploy cron.yaml to schedule the cron job

  14. Verify that the configuration is up and running:

    • Go to the cron job console
    • Click Run Now
    • Wait a few minutes for the completion of the task and check that your BigQuery dataset was updated.

Licensing

Terms of the release - Copyright 2018 Google LLC. Licensed under the Apache License, Version 2.0.

About

Creatine is an open-source and scalable solution that runs on Google Cloud Platform, that can be used to store daily snapshots of a Google Ads account hierarchy and eventually monitor Ads disapproval over time.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages