최대한 빨리 Google Ads 트래픽 소스 데이터를 백필합니다 (GA 360).
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
BigQuery 일일 업데이트 내보내기를 사용하는 경우 일부 traffic_source
필드에 Data Not Available
가 표시될 수 있습니다. 이 가이드를 따르면 누락된 트래픽 소스 데이터의 대부분을 기존 내보내기에서 사용 가능해지는 즉시(일반적으로 매일 오전 5시) 자동으로 백필할 수 있습니다.
백필을 자동화하는 단계는 다음과 같습니다.
- BigQuery에서 일일 완성도 신호를 리슨합니다.
- BigQuery 내보내기에서 트래픽 소스 데이터가 누락된 이벤트를 식별합니다.
- Google Ads에서 이러한 이벤트의 전체 데이터를 쿼리합니다.
- 전체 이벤트 데이터를 BigQuery 내보내기와 조인합니다.
Pub/Sub 주제 만들기
- Google Cloud 콘솔의 왼쪽 탐색 메뉴에서 Pub/Sub을 엽니다. Pub/Sub이 표시되지 않으면 Google Cloud 콘솔 검색창에서 검색합니다.

- 주제 탭에서 + 주제 만들기를 클릭합니다.

- 주제 ID 필드에 이름을 입력합니다.
- 기본 구독 추가를 선택하고 다른 옵션은 비워 둡니다.

- 만들기를 클릭합니다.
로그 라우터 싱크 만들기
- Google Cloud 콘솔에서 로그 라우터를 엽니다.

- 싱크 만들기를 클릭합니다.

- 싱크의 이름과 설명을 입력한 후 다음을 클릭합니다.
- 싱크 서비스로 Cloud Pub/Sub 주제를 선택합니다.
- 만든 주제를 선택한 다음 다음을 클릭합니다.
포함 필터 만들기에 다음 코드를 입력합니다.
logName="projects/YOUR-PROJECT-ID/logs/analyticsdata.googleapis.com%2Ffresh_bigquery_export_status"
YOUR-PROJECT-ID를 Google Cloud 콘솔 프로젝트의 ID로 바꿉니다.
다음을 클릭한 후 싱크 만들기를 클릭합니다. 로그를 필터링할 필요는 없습니다.
이제 싱크가 로그 라우터 싱크에 표시되는지 확인합니다.
누락된 데이터 조인
Cloud Run 함수를 사용하여 Pub/Sub에서 완료 신호를 감지하면 코드를 자동으로 실행하여 트래픽 소스 데이터를 백필합니다.
- Cloud Run 함수를 엽니다.

- 함수 만들기를 클릭합니다.

- 환경에 Cloud Run 함수를 선택합니다.
- 함수의 이름을 입력합니다.
- 트리거 유형으로 Cloud Pub/Sub를 선택하고 만든 주제를 Cloud Pub/Sub 주제로 선택합니다.
- 다음을 클릭한 후 코드를 입력하여 Google Ads 기여 분석 데이터를 BigQuery 내보내기와 결합합니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-12-19(UTC)
[null,null,["최종 업데이트: 2024-12-19(UTC)"],[],["The core process addresses missing traffic source data in BigQuery Fresh Daily exports. It involves listening for a daily completeness signal via Pub/Sub, identifying incomplete events, and then querying Google Ads for the complete data. This complete data is then joined with the existing BigQuery export. To achieve this, a Pub/Sub topic and a Log Router sink are created to monitor the completeness signal. Finally, a Cloud Run function is employed to execute the data backfill using a custom code when triggered by the completeness signal.\n"],null,["# Backfill Google Ads traffic source data as soon as possible (GA 360)\n\nIf you use BigQuery Fresh Daily exports, you might see `Data Not Available` for\nsome `traffic_source` fields. This guide helps you automatically backfill most\nof the missing traffic source data in existing exports as soon as it's\navailable, typically by 5 AM each day.\n\nHere are the steps to automate the backfill:\n\n1. Listen for the daily completeness signal from BigQuery.\n2. Identify the events with missing traffic source data in your BigQuery export.\n3. Query the complete data for those events from Google Ads.\n4. Join the complete event data with your BigQuery export.\n\nCreate a Pub/Sub topic\n----------------------\n\n1. Open **Pub/Sub** in the left navigation menu of the [Google Cloud console](https://console.cloud.google.com/). If you don't see **Pub/Sub** , search for it in the Google Cloud console search bar:\n2. Click **+ CREATE TOPIC** in the **Topics** tab:\n3. Enter a name in the **Topic ID** field.\n4. Select **Add a default subscription** , leave the other options blank:\n5. Click **Create**.\n\nCreate a Log Router sink\n------------------------\n\n1. Open **Log router** in the Google Cloud console:\n2. Click **Create sink** :\n3. Enter a name and description for your sink, then click **Next**.\n4. Choose **Cloud Pub/Sub topic** as the sink service.\n5. Choose the topic you created, then click **Next.**\n6. Enter the following code in **Build inclusion filter**:\n\n logName=\"projects/\u003cvar translate=\"no\"\u003eYOUR-PROJECT-ID\u003c/var\u003e/logs/analyticsdata.googleapis.com%2Ffresh_bigquery_export_status\"\n\n Replace \u003cvar translate=\"no\"\u003eYOUR-PROJECT-ID\u003c/var\u003e with the ID for your Google Cloud console\n project.\n7. Click **Next** , then click **Create sink**. You don't need to filter out any\n logs.\n\n8. Verify the sink is now listed under **Log Router Sinks**.\n\nJoin the missing data\n---------------------\n\nUse a Cloud Run function to automatically execute the code to backfill traffic\nsource data when Pub/Sub detects the completeness signal:\n\n1. Open **Cloud Run functions** :\n2. Click **CREATE FUNCTION** :\n3. Choose **Cloud Run function** for the **Environment**.\n4. Enter a name for your function.\n5. Choose **Cloud Pub/Sub** as the **Trigger type** , and the topic you created as the **Cloud Pub/Sub topic**.\n6. Click **Next**, then enter your code to join the Google Ads attribution data with your BigQuery export in the box."]]