The StarThinker project will no longer receive new solution contributions from the Google team.
Please read the full StarThinker Open Source Support Ends At Google article for more details.



All

people

DV360 Audience Analysis

The Audience Wizard Dashboard helps you to track the audience performance across all audiences on Display.

DV360 Audience Analysis Sample Screenshot


lock_openGet Access directions_bikeSample listGit Hub sourcePython menu_bookColab airAirflow thumb_upTest



Impact Level

Spend Optimization
Spend Growth
Time Savings
Account Health
Csat Improvement

Value Proposition

Historical audience performance insights.
Performance by audience type + audience category.
Headroom impressions and CPA by audience list.

Instructions

Wait for BigQuery->->->DV360_Audience_Analysis to be created.
Join the StarThinker Assets Group to access the following assets
Copy Sample DV360 Audience Analysis Dataset.
Click Edit Connection, and change to BigQuery->->->DV360_Audience_Analysis.
Copy Sample DV360 Audience Analysis Report.
When prompted choose the new data source you just created.
Or give these intructions to the client.

Details

Open Source YES
Age Feb. 18, 2020 (2 years, 10 months)
Authors kenjora@google.com
Shedule Days Configured by user.
Shedule Hours 2, 4, 6
[
    {
        "dataset": {
            "hour": [
                1
            ],
            "auth": "service",
            "description": "Create a dataset for bigquery tables.",
            "dataset": {
                "field": {
                    "name": "recipe_slug",
                    "kind": "string",
                    "description": "Place where tables will be created in BigQuery."
                }
            }
        }
    },
    {
        "dbm": {
            "hour": [
                2
            ],
            "auth": "user",
            "report": {
                "filters": {
                    "FILTER_PARTNER": {
                        "values": {
                            "field": {
                                "name": "partners",
                                "kind": "integer_list",
                                "order": 5,
                                "default": [],
                                "description": "DV360 partner id."
                            }
                        }
                    },
                    "FILTER_ADVERTISER": {
                        "values": {
                            "field": {
                                "name": "advertisers",
                                "kind": "integer_list",
                                "order": 6,
                                "default": [],
                                "description": "Comma delimited list of DV360 advertiser ids."
                            }
                        }
                    }
                },
                "body": {
                    "timezoneCode": {
                        "field": {
                            "name": "recipe_timezone",
                            "kind": "timezone",
                            "description": "Timezone for report dates.",
                            "default": "America/Los_Angeles"
                        }
                    },
                    "metadata": {
                        "dataRange": "LAST_7_DAYS",
                        "format": "CSV",
                        "title": {
                            "field": {
                                "name": "recipe_name",
                                "kind": "string",
                                "prefix": "Audience Analysis Performance ",
                                "description": "Name of report in DV360, should be unique."
                            }
                        }
                    },
                    "params": {
                        "type": "TYPE_GENERAL",
                        "groupBys": [
                            "FILTER_ADVERTISER_NAME",
                            "FILTER_ADVERTISER",
                            "FILTER_AUDIENCE_LIST",
                            "FILTER_USER_LIST",
                            "FILTER_AUDIENCE_LIST_TYPE",
                            "FILTER_AUDIENCE_LIST_COST",
                            "FILTER_PARTNER_CURRENCY"
                        ],
                        "metrics": [
                            "METRIC_IMPRESSIONS",
                            "METRIC_CLICKS",
                            "METRIC_TOTAL_CONVERSIONS",
                            "METRIC_LAST_CLICKS",
                            "METRIC_LAST_IMPRESSIONS",
                            "METRIC_TOTAL_MEDIA_COST_PARTNER"
                        ]
                    }
                }
            }
        }
    },
    {
        "dbm": {
            "hour": [
                2
            ],
            "auth": "user",
            "report": {
                "filters": {
                    "FILTER_PARTNER": {
                        "values": {
                            "field": {
                                "name": "partners",
                                "kind": "integer_list",
                                "order": 5,
                                "default": [],
                                "description": "DV360 partner id."
                            }
                        }
                    },
                    "FILTER_ADVERTISER": {
                        "values": {
                            "field": {
                                "name": "advertisers",
                                "kind": "integer_list",
                                "order": 6,
                                "default": [],
                                "description": "Comma delimited list of DV360 advertiser ids."
                            }
                        }
                    }
                },
                "body": {
                    "timezoneCode": {
                        "field": {
                            "name": "recipe_timezone",
                            "kind": "timezone",
                            "description": "Timezone for report dates.",
                            "default": "America/Los_Angeles"
                        }
                    },
                    "metadata": {
                        "dataRange": "LAST_7_DAYS",
                        "format": "CSV",
                        "title": {
                            "field": {
                                "name": "recipe_name",
                                "kind": "string",
                                "prefix": "Audience Analysis First Party",
                                "description": "Name of report in DV360, should be unique."
                            }
                        }
                    },
                    "params": {
                        "type": "TYPE_INVENTORY_AVAILABILITY",
                        "groupBys": [
                            "FILTER_ADVERTISER_NAME",
                            "FILTER_ADVERTISER",
                            "FILTER_USER_LIST_FIRST_PARTY_NAME",
                            "FILTER_USER_LIST_FIRST_PARTY",
                            "FILTER_FIRST_PARTY_AUDIENCE_LIST_TYPE",
                            "FILTER_FIRST_PARTY_AUDIENCE_LIST_COST"
                        ],
                        "metrics": [
                            "METRIC_BID_REQUESTS",
                            "METRIC_UNIQUE_VISITORS_COOKIES"
                        ]
                    }
                }
            }
        }
    },
    {
        "dbm": {
            "hour": [
                2
            ],
            "auth": "user",
            "report": {
                "filters": {
                    "FILTER_PARTNER": {
                        "values": {
                            "field": {
                                "name": "partners",
                                "kind": "integer_list",
                                "order": 5,
                                "default": [],
                                "description": "DV360 partner id."
                            }
                        }
                    },
                    "FILTER_ADVERTISER": {
                        "values": {
                            "field": {
                                "name": "advertisers",
                                "kind": "integer_list",
                                "order": 6,
                                "default": [],
                                "description": "Comma delimited list of DV360 advertiser ids."
                            }
                        }
                    }
                },
                "body": {
                    "timezoneCode": {
                        "field": {
                            "name": "recipe_timezone",
                            "kind": "timezone",
                            "description": "Timezone for report dates.",
                            "default": "America/Los_Angeles"
                        }
                    },
                    "metadata": {
                        "dataRange": "LAST_7_DAYS",
                        "format": "CSV",
                        "title": {
                            "field": {
                                "name": "recipe_name",
                                "kind": "string",
                                "prefix": "Audience Analysis Google",
                                "description": "Name of report in DV360, should be unique."
                            }
                        }
                    },
                    "params": {
                        "type": "TYPE_INVENTORY_AVAILABILITY",
                        "groupBys": [
                            "FILTER_ADVERTISER_NAME",
                            "FILTER_ADVERTISER",
                            "FILTER_AUDIENCE_LIST",
                            "FILTER_USER_LIST",
                            "FILTER_AUDIENCE_LIST_TYPE",
                            "FILTER_AUDIENCE_LIST_COST"
                        ],
                        "metrics": [
                            "METRIC_BID_REQUESTS",
                            "METRIC_UNIQUE_VISITORS_COOKIES"
                        ]
                    }
                }
            }
        }
    },
    {
        "dbm": {
            "hour": [
                2
            ],
            "auth": "user",
            "report": {
                "filters": {
                    "FILTER_PARTNER": {
                        "values": {
                            "field": {
                                "name": "partners",
                                "kind": "integer_list",
                                "order": 5,
                                "default": [],
                                "description": "DV360 partner id."
                            }
                        }
                    },
                    "FILTER_ADVERTISER": {
                        "values": {
                            "field": {
                                "name": "advertisers",
                                "kind": "integer_list",
                                "order": 6,
                                "default": [],
                                "description": "Comma delimited list of DV360 advertiser ids."
                            }
                        }
                    }
                },
                "body": {
                    "timezoneCode": {
                        "field": {
                            "name": "recipe_timezone",
                            "kind": "timezone",
                            "description": "Timezone for report dates.",
                            "default": "America/Los_Angeles"
                        }
                    },
                    "metadata": {
                        "dataRange": "LAST_7_DAYS",
                        "format": "CSV",
                        "title": {
                            "field": {
                                "name": "recipe_name",
                                "kind": "string",
                                "prefix": "Audience Analysis Third Party",
                                "description": "Name of report in DV360, should be unique."
                            }
                        }
                    },
                    "params": {
                        "type": "TYPE_INVENTORY_AVAILABILITY",
                        "groupBys": [
                            "FILTER_ADVERTISER_NAME",
                            "FILTER_ADVERTISER",
                            "FILTER_USER_LIST_THIRD_PARTY_NAME",
                            "FILTER_USER_LIST_THIRD_PARTY",
                            "FILTER_THIRD_PARTY_AUDIENCE_LIST_TYPE",
                            "FILTER_THIRD_PARTY_AUDIENCE_LIST_COST"
                        ],
                        "metrics": [
                            "METRIC_BID_REQUESTS",
                            "METRIC_UNIQUE_VISITORS_COOKIES"
                        ]
                    }
                }
            }
        }
    },
    {
        "dbm": {
            "hour": [
                6
            ],
            "auth": "user",
            "report": {
                "name": {
                    "field": {
                        "name": "recipe_name",
                        "kind": "string",
                        "prefix": "Audience Analysis Performance ",
                        "description": "Name of report in DV360, should be unique."
                    }
                }
            },
            "out": {
                "bigquery": {
                    "dataset": {
                        "field": {
                            "name": "recipe_slug",
                            "kind": "string",
                            "description": "Place where tables will be created in BigQuery."
                        }
                    },
                    "table": "DV360_Audience_Performance",
                    "header": true,
                    "schema": [
                        {
                            "mode": "REQUIRED",
                            "name": "advertiser",
                            "type": "STRING"
                        },
                        {
                            "mode": "REQUIRED",
                            "name": "advertiser_id",
                            "type": "INT64"
                        },
                        {
                            "mode": "REQUIRED",
                            "name": "audience_list",
                            "type": "STRING"
                        },
                        {
                            "mode": "REQUIRED",
                            "name": "audience_list_id",
                            "type": "INT64"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "audience_list_type",
                            "type": "STRING"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "audience_list_cost_usd",
                            "type": "STRING"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "partner_currency",
                            "type": "STRING"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "impressions",
                            "type": "INT64"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "clicks",
                            "type": "INT64"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "total_conversions",
                            "type": "FLOAT"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "post_click_conversions",
                            "type": "FLOAT"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "post_view_conversions",
                            "type": "FLOAT"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "total_media_cost_partner_currency",
                            "type": "FLOAT"
                        }
                    ]
                }
            }
        }
    },
    {
        "dbm": {
            "hour": [
                6
            ],
            "auth": "user",
            "report": {
                "name": {
                    "field": {
                        "name": "recipe_name",
                        "kind": "string",
                        "prefix": "Audience Analysis First Party",
                        "description": "Name of report in DV360, should be unique."
                    }
                }
            },
            "out": {
                "bigquery": {
                    "dataset": {
                        "field": {
                            "name": "recipe_slug",
                            "kind": "string",
                            "description": "Place where tables will be created in BigQuery."
                        }
                    },
                    "table": "DV360_First_Party_Audience",
                    "header": true,
                    "schema": [
                        {
                            "mode": "REQUIRED",
                            "name": "advertiser",
                            "type": "STRING"
                        },
                        {
                            "mode": "REQUIRED",
                            "name": "advertiser_id",
                            "type": "INT64"
                        },
                        {
                            "mode": "REQUIRED",
                            "name": "audience_list",
                            "type": "STRING"
                        },
                        {
                            "mode": "REQUIRED",
                            "name": "audience_list_id",
                            "type": "INT64"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "audience_list_type",
                            "type": "STRING"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "audience_list_cost_usd",
                            "type": "FLOAT"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "potential_impressions",
                            "type": "INT64"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "unique_cookies_with_impressions",
                            "type": "INT64"
                        }
                    ]
                }
            }
        }
    },
    {
        "dbm": {
            "hour": [
                6
            ],
            "auth": "user",
            "report": {
                "name": {
                    "field": {
                        "name": "recipe_name",
                        "kind": "string",
                        "prefix": "Audience Analysis Google",
                        "description": "Name of report in DV360, should be unique."
                    }
                }
            },
            "out": {
                "bigquery": {
                    "dataset": {
                        "field": {
                            "name": "recipe_slug",
                            "kind": "string",
                            "description": "Place where tables will be created in BigQuery."
                        }
                    },
                    "table": "DV360_Google_Audience",
                    "header": true,
                    "schema": [
                        {
                            "mode": "REQUIRED",
                            "name": "advertiser",
                            "type": "STRING"
                        },
                        {
                            "mode": "REQUIRED",
                            "name": "advertiser_id",
                            "type": "INT64"
                        },
                        {
                            "mode": "REQUIRED",
                            "name": "audience_list",
                            "type": "STRING"
                        },
                        {
                            "mode": "REQUIRED",
                            "name": "audience_list_id",
                            "type": "INT64"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "audience_list_type",
                            "type": "STRING"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "audience_list_cost_usd",
                            "type": "FLOAT"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "potential_impressions",
                            "type": "INT64"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "unique_cookies_with_impressions",
                            "type": "INT64"
                        }
                    ]
                }
            }
        }
    },
    {
        "dbm": {
            "hour": [
                6
            ],
            "auth": "user",
            "report": {
                "name": {
                    "field": {
                        "name": "recipe_name",
                        "kind": "string",
                        "prefix": "Audience Analysis Third Party",
                        "description": "Name of report in DV360, should be unique."
                    }
                }
            },
            "out": {
                "bigquery": {
                    "dataset": {
                        "field": {
                            "name": "recipe_slug",
                            "kind": "string",
                            "description": "Place where tables will be created in BigQuery."
                        }
                    },
                    "table": "DV360_Third_Party_Audience",
                    "header": true,
                    "schema": [
                        {
                            "mode": "REQUIRED",
                            "name": "advertiser",
                            "type": "STRING"
                        },
                        {
                            "mode": "REQUIRED",
                            "name": "advertiser_id",
                            "type": "INT64"
                        },
                        {
                            "mode": "REQUIRED",
                            "name": "audience_list",
                            "type": "STRING"
                        },
                        {
                            "mode": "REQUIRED",
                            "name": "audience_list_id",
                            "type": "INT64"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "audience_list_type",
                            "type": "STRING"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "audience_list_cost_usd",
                            "type": "FLOAT"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "potential_impressions",
                            "type": "INT64"
                        },
                        {
                            "mode": "NULLABLE",
                            "name": "unique_cookies_with_impressions",
                            "type": "INT64"
                        }
                    ]
                }
            }
        }
    },
    {
        "bigquery": {
            "hour": [
                6
            ],
            "auth": "service",
            "from": {
                "query": "           SELECT             p.advertiser_id,             p.advertiser,             p.audience_list_id,             IF (p.audience_list_type = 'Bid Manager Audiences', 'Google', p.audience_list_type) AS audience_list_type,             CASE               WHEN REGEXP_CONTAINS(p.audience_list, 'Affinity') THEN 'Affinity'               WHEN REGEXP_CONTAINS(p.audience_list, 'Demographics') THEN 'Demographics'               WHEN REGEXP_CONTAINS(p.audience_list, 'In-Market') THEN 'In-Market'               WHEN REGEXP_CONTAINS(p.audience_list, 'Similar') THEN 'Similar'               ELSE 'Custom'             END AS audience_list_category,             p.audience_list,             IF(p.audience_list_cost_usd = 'Unknown', 0.0, CAST(p.audience_list_cost_usd AS FLOAT64)) AS audience_list_cost,             p.total_media_cost_partner_currency AS total_media_cost,             p.impressions,             p.clicks,             p.total_conversions,             COALESCE(ggl.potential_impressions, fst.potential_impressions, trd.potential_impressions) AS potential_impressions,             COALESCE(ggl.unique_cookies_with_impressions, fst.unique_cookies_with_impressions, trd.unique_cookies_with_impressions) AS potential_reach           FROM             `{dataset}.DV360_Audience_Performance` p           LEFT JOIN             `{dataset}.DV360_Google_Audience` ggl             USING (advertiser_id, audience_list_id)           LEFT JOIN             `{dataset}.DV360_First_Party_Audience` fst             USING (advertiser_id, audience_list_id)           LEFT JOIN             `{dataset}.DV360_Third_Party_Audience` trd             USING (advertiser_id, audience_list_id)           ",
                "parameters": {
                    "dataset": {
                        "field": {
                            "name": "recipe_slug",
                            "kind": "string",
                            "description": "Place where tables will be created in BigQuery."
                        }
                    }
                },
                "legacy": false
            },
            "to": {
                "dataset": {
                    "field": {
                        "name": "recipe_slug",
                        "kind": "string",
                        "description": "Place where tables will be created in BigQuery."
                    }
                },
                "view": "DV360_Audience_Analysis"
            }
        }
    }
]


Run This Workflow In Minutes On Google Cloud

Everything from a quick Google Cloud UI to reference developer code for your team in one GitHub repository.

Deployment Stepslaunch Developer Guidebuild UI How Tolaptop