GoogleCloudPlatform / marketing-analytics-jumpstart

Marketing Analytics Jumpstart consists of an easy, extensible and automated implementation of an end-to-end solution that enables Marketing Technology teams to store, transform, enrich with 1PD and analyze marketing data, and programmatically send predictive events to Google Analytics 4 to support conversion optimization and remarketing campaigns.
Apache License 2.0
102 stars 35 forks source link

Marketing Analytics Jumpstart

Marketing Analytics Jumpstart is a terraform automated, quick-to-deploy, customizable end-to-end marketing solution on Google Cloud Platform (GCP). This solution aims at helping customer better understand and better use their digital advertising budget.

Customers are looking to drive revenue and increase media efficiency be identifying, predicting and targeting valuable users through the use of machine learning. However, marketers first have to solve the challenge of having a number of disparate data sources that prevent them from having a holistic view of customers. Marketers also often don't have the expertise and/or resources in their marketing departments to train, run, and activate ML models on paid channels. Without this solution that enables innovation through predictive analytics, marketers are missing opportunities to advance their marketing program and accelerate key goals and objectives (e.g. acquire new customers, improve customer retention, etc).

Benefits

After installing the solution users will get:

Who can benefit from this solution?

This solution is intended for Marketing Technologist teams using GA4 and GAds products. It facilitates efforts to store, transform, analyze marketing data, and programmatically creates audiences segments in Google Ads to support conversion optimization and remarketing campaigns.

Role User Journeys Skillset Can Deploy?
Marketing Scientist Using an isolated and secure sandbox infrastructure to perform and monitor explorations with sensitive data. Using automated machine learning to accelerate time-to-value on building use cases solutions. Faster learning curve to quickly and easily access and analyze data from the marketing data store. Ability to collaborate with other teams by reusing similar components. Vertex AI, Python, SQL, Data Science No
Marketing Analyst Simplifying the operation of the marketing data store (data assertions), machine learning pipelines (model training, prediction, explanation) and the activation application. Monitoring Ads Campaigns Performance, Web Traffic and Predictive Insights Reports. Interpreting the insights provided to plan and activate Ads campaigns. Defining audience segments using predictive metrics. BigQuery, Looker Studio, Google Analytics 4, Google Ads Yes
Digital Marketing Manager Gaining insights into customer behavior to improve marketing campaigns. Identifying and targeting new customers. Measuring the effectiveness of marketing campaigns. Looker Studio, Google Analytics 4, Google Ads No
IT/Data Engineer Building and maintaining marketing data store transformation jobs. Developing and deploying custom marketing use cases reusing a consistent infrastructure. Integrating 1st party data and Google 3rd party data by extending the marketing data store. Python, SQL, Google Cloud Platform, Data Engineering Yes

Use Cases

This solution enables customer to plan and take action on their marketing campaigns by interpreting the insights provided by four common predictive use cases (purchase propensity, customer lifetime value, audience segmentation and aggregated value based bidding) and an operation dashboard that monitors Campaigns, Traffic, User Behavior and Models Performance, using the best of Google Cloud Data and AI products and practices.

These insights are used to serve as a basis to optimize paid media efforts and investments by:

Repository Structure

The solution's source code is written in Terraform, Python, SQL, YAML and JSON; and it is organized into five main folders:

In addition to that, there is a tasks.py file which implements python invoke tests who hydrate values to the JINJA template files with the .sqlx extension located in the sql/ folder that defines the DDL and DML statements for the BigQuery datasets, tables, procedures and queries.

High Level Architecture

High Level Architecture

The provided architecture diagram depicts the high-level architecture of the Marketing Analytics Jumpstart solution. Let's break down the components:

  1. Data Sources:

    • Google Analytics 4 Export: This provides daily data exports from your Google Analytics 4 property to BigQuery.
    • Google Ads Export: This provides daily data exports from your Google Ads account to BigQuery.
  2. Marketing Data Store:

    • Dataform: This tool manages the data transformation and enrichment process. It uses SQL-like code to define data pipelines that transform the raw data from Google Analytics 4 and Google Ads into a unified and enriched format.
  3. Feature Store:

    • BigQuery: This serves as the central repository for storing the features extracted from the marketing data.
    • Vertex AI Pipelines: These pipelines automate the feature engineering process, generating features based on user behavior, traffic sources, devices, and other relevant factors.
  4. Machine Learning Pipelines:

    • Vertex AI Pipelines: These pipelines handle the training, prediction, and explanation of various machine learning models.
    • Tabular Workflow End-to-End AutoML: This approach automates the model training process for tasks like purchase propensity and customer lifetime value prediction.
    • Custom Training and Prediction Pipelines: These pipelines are used for the auto audience segmentation training and prediction; and for the aggregated value based bidding model explanation.
    • Gemini Insights: This leverages the Gemini 1.5 Vertex AI LLM API to provide insights on user behaviour and revenue. Gemini is connected directly to BigQuery and the insights are provided via a Looker Studio report.
  5. Activation Application:

    • Dataflow: This tool processes the model predictions and sends them to Google Analytics 4 via the Measurement Protocol API.
    • User-level Predictions: These predictions are used to enhance your Google Analytics 4 data with insights about user behavior and purchase likelihood.
  6. Dashboards:

    • Looker Studio: This tool provides interactive dashboards for visualizing the performance of your Google Ads campaigns, user behavior in Google Analytics 4, LLM inisghts and the results of the machine learning models.
  7. Monitoring:

    • Dataform Jobs: These jobs are monitored for errors to ensure the data transformation process runs smoothly.
    • Vertex AI Pipelines Runs: These runs are monitored to track the performance and success of the machine learning pipelines.

This high-level architecture demonstrates how Marketing Analytics Jumpstart integrates various Google Cloud services to provide a comprehensive solution for analyzing and activating your marketing data.

Advantages

  1. Easy to deploy: Deploy the resources and use cases that you need.
  2. Cost Effective: Pay only for the cost of infrastructure in order to maintain the Data Store, Feature Store and ML Models.
  3. Keep control of your data: This solution runs entirely in your environment and doesn’t transfer data out of your ownership or organization.
  4. Fondation for 1st Party Data Strategy: The data store can serves as a basis for your team to customize or implement your own use cases and enable in house expertise to thrive.
  5. Enable team collaboration: Use Terraform to maintain dependency graph between the resources and to manage resources lifecycle.

Installation Pre-Requisites

Note: Google Ads Customer Matching currently only works with Google Analytics 4 Properties linked to Google Ads Accounts, it won't work for subproperties or Rollup properties.

Installation Permissions and Privileges

Installation

Please follow the step by step installation guide with Google Cloud Shell.

Open in Cloud Shell

Note: If you are working from a forked repository, be sure to update the cloudshell_git_repo parameter to the URL of your forked repository for the button link above.

The detailed installation instructions can be found at the Installation Guide.

Contributing

We welcome all feedback and contributions! Please read CONTRIBUTING.md for more information on how to publish your contributions.

License

This project is licensed under the Apache License, Version 2.0.

Resources

This a list of public websites you can use to learn more about the Google Analytics 4, Google Ads, Google Cloud Products we used to build this solution.

Websites Description
support.google.com/google-ads/* support.google.com/analytics/* Google Ads and Google Analytics Support
support.google.com/looker-studio/* Looker Studio Support
developers.google.com/analytics/* developers.google.com/google-ads/* Google Ads and Google Analytics Developers Guides
cloud.google.com/developers/* developers.google.com/looker-studio/* Google Cloud & Looker Studio Developers Guides
cloud.google.com/bigquery/docs/* cloud.google.com/vertex-ai/docs/* cloud.google.com/looker/docs/* cloud.google.com/dataform/docs/* Google Cloud Product Documentation
cloud.google.com/python/docs/reference/aiplatform/latest/* cloud.google.com/python/docs/reference/automl/latest/* cloud.google.com/python/docs/reference/bigquery/latest/* Google Cloud API References Documentation

Disclaimer

This is not an officially supported Google product. This solution in a work in progress and currently in the preview stage.