이 페이지에서는 Google 애널리틱스 4 (GA4)의 데이터를 Cortex Framework Data Foundation의 마케팅 워크로드 데이터 소스로 가져오기 위해 필요한 구성을 설명합니다.
GA4는 Google 애널리틱스의 최신 버전입니다. 이벤트 기반 추적 및 머신러닝에 중점을 두어 사용자 행동을 종합적으로 파악하고 더 깊은 통계를 제공합니다. Cortex Framework를 사용하면 GA4에서 데이터를 추출하여 BigQuery에 통합하여 추가 분석 및 보고를 수행할 수 있습니다. 가치 있는 정보를 얻고 비즈니스 성과를 개선할 수 있습니다.
다음 다이어그램은 Cortex Framework Data Foundation의 마케팅 워크로드를 통해 GA4 데이터를 사용하는 방법을 설명합니다.
그림 1 GA4 데이터 소스
구성 파일
config.json 파일은 다양한 워크로드에서 데이터를 전송하기 위해 데이터 소스에 연결하는 데 필요한 설정을 구성합니다. 이 파일에는 GA4의 다음 매개변수가 포함되어 있습니다.
Cortex Framework 데이터 기반은 GA4의 BigQuery Export 데이터 세트 (Cortex Framework 아키텍처에서 CDC 데이터 세트로 취급됨) 위에 보고서 레이어를 만들어 GA4와 통합됩니다. 이는 보고서 설정 구성에 따라 CDC 테이블 위에 런타임 뷰를 만들거나 BigQuery 테이블의 구체화된 데이터에 대해 Cloud Composer DAG를 실행하여 실행됩니다.
GA4 BigQuery Export 설정
Cortex Framework는 GA4의 BigQuery Export 기능을 사용하여 소스 시스템에서 BigQuery로 데이터를 로드합니다. 이 GA4 도움말 GA4 - BigQuery Export 설정에서 BigQuery Export 또는 각 GA4 속성을 설정하는 방법을 따르세요.
알려진 문제, 제한사항, 기타 고려사항
GA4 BigQuery Export를 설정할 때는 다음 사항을 고려하세요.
백필: GA4 BigQuery Export는 설정된 날짜부터 시작되며 백필은 없습니다.
GA4 UI와 Cortex Framework의 보고된 수치 차이: 샘플링, 데이터 수집 지연, 카디널리티가 높은 보고서 등 여러 요인으로 인해 Google 애널리틱스 UI와 Cortex Framework 간에 약간의 불일치가 발생할 수 있습니다. 이는 Google 애널리틱스의 알려진 기본 제한사항입니다. 자세한 내용은 Google 애널리틱스 UI와 BigQuery 내보내기 간의 격차 줄이기 를 참고하세요.
이벤트 내보내기 양 제한: Google 애널리틱스 버전에 따라 BigQuery 내보내기 양 제한이 일별로 다를 수 있습니다. 자세한 내용은 GA4 - BigQuery Export 설정하기를 참고하세요.
시간대: BigQuery 내보내기에서 event_date는 속성의 보고 시간대에 설정되고 event_timestamp는 마이크로초 단위의 UTC 타임스탬프입니다. 따라서 event_timestamp를 사용하는 경우 UI 번호와 비교할 때 올바른 보고 시간대로 조정해야 합니다.
일일 이벤트 내보내기와 스트리밍 (실시간) 이벤트 내보내기 비교: 이벤트 내보내기의 경우 Cortex Framework는 전체 일일 내보내기로 생성된 events_YYYYMMDD 테이블만 지원합니다. 자세한 내용은 GA4 - BigQuery 내보내기를 참고하세요.
BigQuery Export용 GA4 360 서비스수준계약 (SLA):
Cortex Framework는 일일 업데이트 내보내기로 생성된 events_fresh_ 테이블을 별도의 소스 테이블로 지원하지 않지만, Events 보고 뷰의 ##CORTEX-CUSTOMER 맞춤설정 주석에 따라 소스 테이블을 events_fresh_ 테이블로 대체하여 이 기능에서 제공하는 SLA를 활용할 수 있습니다. 이 대체 후에도 모든 보고 보기는 계속 작동합니다.
데이터 최신 상태 및 지연
일반적으로 Cortex Framework 데이터 소스의 데이터 최신성은 업스트림 연결에서 허용하는 사항과 DAG 실행 빈도에 따라 제한됩니다. 업스트림 빈도, 리소스 제약조건, 비즈니스 요구사항에 맞게 DAG 실행 빈도를 조정합니다.
보고 설정 파일 src/GA4/config/reporting_settings.yaml를 사용하여 Cortex Framework가 GA4 최종 보고 영역의 데이터를 생성하는 방식을 구성하고 제어할 수 있습니다. 이 파일은 보고 레이어 BigQuery 객체(테이블, 뷰,함수 또는 저장 프로시저)가 생성되는 방식을 제어합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eCortex Framework integrates with Google Analytics 4 (GA4) to extract data for analysis and reporting in BigQuery, providing a comprehensive view of user behavior.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003econfig.json\u003c/code\u003e file allows configuration of the connection to GA4 data sources, including settings for deploying GA4 and specifying BigQuery Export datasets.\u003c/p\u003e\n"],["\u003cp\u003eCortex Framework uses GA4's BigQuery Export feature to load data into BigQuery, requiring setup of the export for each GA4 property, and data is available through reporting views.\u003c/p\u003e\n"],["\u003cp\u003eThere are limitations and considerations to be aware of when using GA4 BigQuery Export, such as no data backfilling, potential discrepancies between the GA4 UI and Cortex Framework reported numbers, event export volume restrictions, and time zone differences.\u003c/p\u003e\n"],["\u003cp\u003eData freshness in Cortex Framework is limited by upstream connections and DAG execution frequency, with GA4 BigQuery export data potentially delayed up to a day, unless Fresh Daily Export is utilized.\u003c/p\u003e\n"]]],[],null,["# Integration with Google Analytics 4\n===================================\n\nThis page describes the required configurations to bring data from\nGoogle Analytics 4 (GA4) as a data source of the marketing workload of\nCortex Framework Data Foundation.\n\n**GA4** is the latest version of Google Analytics. It provides a holistic\nview of user behavior, focusing on event-based tracking and machine learning to\noffer deeper insights. Cortex Framework lets you extract data from\nGA4 and integrate it into BigQuery for further analysis and\nreporting. You can gain valuable insights and drive better business outcomes.\n\nThe following diagram describes how GA4 data is\navailable through the marketing workload of Cortex Framework Data Foundation:\n\n**Figure 1**. GA4 data source. **Note:** For accessing configuration files, analytical views and models for the GA4 data source, see the [data source directory](https://github.com/GoogleCloudPlatform/cortex-data-foundation/tree/main/src/marketing/src/GA4).\n\nConfiguration file\n------------------\n\nThe [`config.json`](https://github.com/GoogleCloudPlatform/cortex-data-foundation/blob/main/config/config.json)\nfile configures the settings required to connect to data sources for transferring\ndata from various workloads. This file contains the following parameters for GA4: \n\n \"marketing\": {\n \"deployGA4\": true,\n \"GA4\": {\n \"datasets\": {\n \"cdc\": [\n {\"property_id\": 0, \"name\": \"\"}\n ],\n \"reporting\": \"REPORTING_GA4\"\n }\n }\n }\n\nThe following table describes the value for each marketing parameter:\n\nData Model\n----------\n\nThis section describes the GA4 Data Model using the Entity\nRelationship Diagram (ERD).\n\n[](/static/cortex/docs/images/erd_ga4.png)\n**Figure 2**. GA4: Entity Relationship Diagram.\n\n### Base views\n\nThese are the blue objects in the ERD and are views on CDC tables with\nminimal transformations to unpack complex data structures. See scripts in\n[`src/marketing/src/GA4/src/reporting/ddls`](https://github.com/GoogleCloudPlatform/cortex-data-foundation/tree/main/src/marketing/src/GA4/src/reporting/ddls).\n\n### Reporting views\n\nThese are the green objects in the ERD and are reporting views that contain\naggregate metrics. See scripts in\n[`src/marketing/src/GA4/src/reporting/ddls`](https://github.com/GoogleCloudPlatform/cortex-data-foundation/tree/main/src/marketing/src/GA4/src/reporting/ddls).\n\nConfigure integration for GA4\n-----------------------------\n\nCortex Framework Data Foundation integrates with\n[GA4](https://support.google.com/analytics/answer/10089681?hl) by creating\na **Reporting layer** on top of GA4's\n[BigQuery Export](https://support.google.com/analytics/answer/9823238?hl#zippy=%2Cin-this-article) datasets (treated as [CDC datasets](/cortex/docs/cdc) in\nCortex Framework architecture). This is\naccomplished by creating runtime views on top of CDC tables or running\nCloud Composer DAGs for materialized data in BigQuery\ntables, depending on the [reporting settings configuration](/cortex/docs/deployment-step-five#customizing_reporting_settings_file).\n\n### Set up GA4 BigQuery Export\n\nCortex Framework uses GA4's BigQuery Export feature to\nload data from the source system into BigQuery. Follow the\ninstructions for setting up BigQuery Export or each GA4 property\nin this GA4 Help article: [GA4 - Set up BigQuery Export](https://support.google.com/analytics/answer/9823238?hl#zippy=%2Cin-this-article).\n| **Note:** If you are setting up export for multiple GA4 properties, ensure they all export to the same Google Cloud project. Export both **Event** and **User** data, for all properties.\n\n### Known issues, limitations, and other considerations\n\nConsider the following when setting up GA4 BigQuery Export:\n\n- **Backfilling**: GA4 BigQuery Export starts from the day it is set up and there is no backfilling.\n- **Difference between GA4 UI and Cortex Framework reported numbers** : Multiple factors, including but not limited to sampling, data collection delay, and high-cardinality reports, may cause minor discrepancy between Google Analytics UI and Cortex Framework. This is a known and innate limitation of Google Analytics. For more information, see [Bridge the gap between the Google Analytics UI and BigQuery export](https://developers.google.com/analytics/blog/2023/bigquery-vs-ui).\n- **Event export volume restrictions** : Depending on your Google Analytics edition, you may face varying degree of BigQuery export volume restriction per day. For more information, see [GA4 - Set up BigQuery Export](https://support.google.com/analytics/answer/9823238?hl#limits).\n- **Time zone** : In BigQuery Export, `event_date` is set **in the property's reporting time zone** while `event_timestamp` is the **UTC** timestamp in microseconds. As a result, if `event_timestamp` is used, make sure to adjust for the correct reporting time zone when comparing with UI numbers.\n- **Daily versus Streaming (real-time) Event exports** : For *Event* exports, Cortex Framework only supports the `events_YYYYMMDD` tables created by full daily export. For more information, see [GA4 - BigQuery Export](https://support.google.com/analytics/answer/9358801?hl#streaming).\n- **GA4 360 Service Level Agreement (SLA) for BigQuery Export** : While Cortex Framework doesn't support the `events_fresh_` tables created by [Fresh Daily exports](https://support.google.com/analytics/answer/14117050?hl) as separate source tables, you can follow the `##CORTEX-CUSTOMER` customization comments in the `Events` Reporting view to replace the source tables with these, to take advantage of the SLA provided by this feature. All Reporting views will continue to work after this substitution.\n\nData Freshness and Delay\n------------------------\n\nAs a general rule, data freshness for Cortex Framework data\nsources is limited by what upstream connection allows for, as well as the\nfrequency of your DAG execution. Adjust your DAG execution frequency to\nalign with upstream frequency, resource constraints, and your business\nneeds.\n\nWith Google Analytics 4,\n[BigQuery export](#set-up-ga4-BigQuery-export)\ndata may be delayed up to a day depending on your time zone, unless you are\nusing [Fresh Daily Export](https://support.google.com/analytics/answer/15604391?sjid=7512611260796146949-NC).\n\nConfigurations\n--------------\n\nThis section describes the configurations for the data process.\n\n### Cloud Composer connections\n\nCreate the following connections in Cloud Composer. See more details in the\n[Manage Airflow connections documentation](/composer/docs/how-to/managing/connections).\n\n### Reporting settings\n\nYou can configure and control how Cortex Framework generates\ndata for the GA4 final reporting layer using the reporting\nsettings file [src/GA4/config/reporting_settings.yaml](https://github.com/GoogleCloudPlatform/cortex-data-foundation/tree/main/src/marketing/src/GA4/config/reporting_settings.yaml). This file controls how reporting layer BigQuery objects\n(tables, views,functions or stored procedures) are generated.\n\nFor more information, see [Customizing reporting settings file](/cortex/docs/deployment-step-five#customizing_reporting_settings_file).\n\nWhat's next?\n------------\n\n- For more information about other data sources and workloads, see [Data sources and workloads](/cortex/docs/data-sources-and-workloads).\n- For more information about the steps for deployment in production environments, see [Cortex Framework Data Foundation deployment prerequisites](/cortex/docs/deployment-prerequisites)."]]