GithubHelp home page GithubHelp logo

block-google-ads-transfer's Introduction

Google Ads Block

What does this Block do for me?

(1) Combine Multiple Data Sources - Combine your Google Ads data with data from GA, DoubleClick, Facebook Ads, Salesforce, and more to get a holistic view of all your customer data in one central view (see bottom of this page for instructions).

(2) Work with Complex Account Hierarchies - Provides possibilities for custom permissions structures and singular views when you have MCC codes with thousands of accounts or perhaps multiple Data Transfer Service accounts going into multiple BigQuery projects.

(3) Unbounded Custom Metrics - With Looker's modeling language (LookML) there are no limitations to the kinds of complex custom metrics that can be created including filtered measures, measures that require advanced mathematical functions, custom groupings. Anything is possible.

(4) Utilize Machine Learning (ML) - Through the power of BQML, unleash advanced use cases like click fraud prevention.

(5) Take Advantage of Blocks Ecosystem - Want to add powerful machine learning with BQML? Add the BQML block, there are 100s of blocks in the blocks directory.

(6) Enterprise Data Platform - Take advantage of Looker's data platform functionality, including data actions, scheduling, permissions, alerting, parameterization (each user can only see their own data), and more. Get immediate alerts when budgets are exceeded, ads are underperforming, or any other business criteria.

(7) Usable / Shareable Dashboards - create centralized dashboards for the entire team, and departmental or individual dashboards for each user, and rest easy knowing everyone is looking at the same information at all times. Then schedule the dashboard for emails or alerts, period-end reporting, anomaly detection, or whatever else serves your use-case.

Block Info and Requirements

This Block is modeled on the schema brought in by Google BigQuery Transfer Service for Google Ads. This block does not cover every table in the Google Ads schema, it’s designed to help you begin modeling the complex structure of the BigQuery data transfer for Google Ads.

The schema documentation for Google Ads can be found in Google's docs. This block was developed with Google Ads API v201809

Google Ads Raw Data Structure

  • Entity Tables and Stats Tables - There are several primary entities included in the Google Ads data set, such as ad, ad group, campaign, customer, keyword, etc.. Each of these tables has a corresponding Stats table, which includes all the various metrics for that entity. For example, the campaign entity table contains attributes for each campaign, such as the campaign name and campaign status. The corresponding stats table - Campaign Basic Stats contains metrics such as impressions, clicks, and conversions. This blog post does a good job of explaining some of the main concepts.

  • Snapshots - Google Ads dimension tables keep records over time by snapshotting all data at the end of each day. The following day, a new snapshot is taken, and appended to the table. There are two columns on each table: '_DATA_DATE' and '_LATEST_DATE'. '_DATA_DATE' tells you the day the data was recorded, while '_LATEST_DATE' is a mutable field that tells you the most recent date a snapshot was taken. Querying the table using '_DATA_DATE' = '_LATEST_DATE' in the 'WHERE' clause would give you only the data for the latest day. Note dimension tables like campaign, ad_group are currently joined with the latest data, if you prefer slowly changing dimension join them to the fact tables by date instead.

  • About Partitioning Currently the block uses Views (i.e. AdBasicStats) not tables (i.e. p_AdBasicStats) - if you are using partitioning then consider changing to use the tables and add partitioning logic.

Block Structure

  • upstream_views - these are views coming directly from BigQuery (with minor modifications). Generate more files as needed and store them in this folder.
  • shared_views - These are common throughout the model
    • date_base & period_base - These are used to provide period over period comparisons
    • ads_common - This file contains common metrics in Ads fact tables
  • lookml_dashboards - Dashboards included with the block
  • pdts - Transformation tables and BQML demo
  • bqml - BigQuery Machine Learning Example

Implementation Instructions / Required Customizations

  • Manifest file - The manifest file contains constants that should be adapted to your BigQuery project and account numbers.

  • Multiple Accounts - Union fact and dimension tables if you have multiple accounts. Use a persisted derived table to store the result of the union.

  • Add Stats and Entity tables - ad_basic_stats is added as an example stats table, along with ad, campaign, keyword, other tables should be imported and joined as needed.

Ad Traffic Fraud Detection Example

Utilizing BigQuery Machine Learning (BQML) and Autoregressive integrated moving average (ARIMA) analysis, the last year's click data is analyzed and patterns are predicted for the following 30 days, allowing you to see irregularities in traffic patterns. The click_fraud_analysis.view file contains embedded documentation about the use case as well as the Click Analysis Dashboard

Note, this functionality is for demo purposes only Read more about Ad Traffic Quality here

What if I find an error? Suggestions for improvements?

Great! Blocks were designed for continuous improvement through the help of the entire Looker community, and we'd love your input. To log an error or improvement recommendation, simply create a "New Issue" in the corresponding Github repo for this Block. Please be as detailed as possible in your explanation, and we'll address it as quick as we can.

block-google-ads-transfer's People

Contributors

annaserova avatar ernestoongaro avatar jeffrey-martinez avatar lookering avatar noahamac avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.