Google スプレッドシートを使用して複数のアカウントの GA4 トラッキングの問題を監視する方法
Google スプレッドシートを使用して複数のアカウントの GA4 トラッキングの問題を監視する方法

Google スプレッドシートを使用して複数のアカウントの GA4 トラッキングの問題を監視する方法

この記事をお楽しみいただけましたか?
Share it on social media!
コンテンツ

複数のウェブサイトを管理している場合、そのうちの1つのウェブサイトで何日も訪問者のトラッキングが行われていないことに気づくのは、最悪の事態です。GA4プロパティを一つ一つ手動で確認するのは非効率的で、人為的なミスが発生しやすくなります。

全体のセットアップには 1 時間もかからず、延々と続く面倒を見る手間が省けます。

同期

This guide will walk you through a step-by-step setup using Google Sheets and the 同期 add-on to automatically detect and flag any tracking issues (like zero traffic) across multiple GA4 properties.

  • SyncWith交通データをGoogleスプレッドシートに取り込む
  • Google Apps Script問題を検出する
  • Automated email alertsチームに通知する

ステップ1:GA4トラフィックデータをGoogleスプレッドシートに取り込む

Use 同期 to pull your traffic data into a Google Sheet. It connects directly to GA4 and updates automatically.

GA4 トラフィックデータ

How to set it up:

  1. Google Analytics アカウントを SyncWith に接続します。
  2. 次の基準でグループ化されたレポートを作成します。
    • 日付
    • 物件名
  3. Add the metric: Total Users
  4. レポートを過去 3 日間にフィルタリングします。
  5. 結果を次のような名前のシートに出力します。3 Day Report.

次のような表が表示されます。

総ユーザー数 物件表示名 日付
52 ウェブサイトプロパティ 1 G4 2025-06-02
0 ウェブサイトプロパティ 2 G4 2025-06-05
218 ウェブサイトプロパティ3 G4 2025-06-05

各行は、GA4 プロパティの 1 日のトラフィックを表します。

ステップ2: Google Apps Scriptを使用してゼロトラフィックを確認する

Now that your sheet is automatically updated, we’ll write a script to scan for any property with zero users in the past 3 days. If any are found, it sends an email alert.

Status Email - All Good

G4ヘルスチェック

Status Email - Oh no, but check some accounts.

GA4 トラッキングの問題

Here’s the script:

function sendG4HealthCheckAlert() {
  const SPREADSHEET_URL = 'https://docs.google.com/spreadsheets/d/Make_Sure_You_Use_Your_Sheets_ID/edit#gid=0';
  const SHEET_NAME = '3 Day Report';
  const EMAIL_TO = '[email protected], [email protected]';
  const EMAIL_FROM = '[email protected]';
  const EMAIL_SUBJECT = '⚠️ G4 Health Check';

  const ss = SpreadsheetApp.openByUrl(SPREADSHEET_URL);
  const sheet = ss.getSheetByName(SHEET_NAME);
  const data = sheet.getRange(3, 1, sheet.getLastRow() - 2, 3).getValues();

  const zeroAccounts = data
    .filter(row => row[0] === 0)
    .map(row => `• ${row[1]} - GA4 on ${row[2]}`);

  let messageBody;

  if (zeroAccounts.length > 0) {
    messageBody = `
⚠️ G4 Health Check

One or more accounts have not recorded visits in the last 3 days:

${zeroAccounts.join('
')}

ダッシュボードを開く
    `;
  } else {
    messageBody = `
✅ G4 Health Check

All accounts are reporting data in the last 3 days.

ダッシュボードを開く
    `;
  }

  GmailApp.sendEmail(EMAIL_TO, EMAIL_SUBJECT, '', {
    htmlBody: messageBody,
    name: 'Bright Vessel Reports',
    from: EMAIL_FROM
  });
}

You can add or remove emails in EMAIL_TO. The script pulls data from the sheet, filters for rows where the user count is zero, and sends a clean alert listing the offending properties.

ステップ3:時間ベースのトリガーで自動化する

このチェックを毎日実行するには:

  1. シートで、Extensions > Apps Script
  2. 上記のスクリプトを貼り付けます
  3. 左側の時計アイコン(トリガー)をクリックします
  4. Set sendG4HealthCheckAlert毎日好きな時間に実行

手動での確認は不要。データの漏れによる問題もありません。プロパティのトラッキングが停止した場合、チームに通知されます。

標準エラー: Apps Script を開くときに「400 不正なリクエスト」が表示される

400 不正なリクエスト

If you try to open Apps Script and get hit with a 400 Bad Request error, it’s because Google doesn't play nice when you're logged into multiple accounts at once.

Fix:

  • すべてのGoogleアカウントからログアウトする
  • ログインonly the one who owns the Sheet
  • または、単一のアカウントでシークレットウィンドウを使用する

これは Google セッションの問題であり、コードや設定の問題ではありません。

最後に

このセットアップはシンプルで高速です。サードパーティ製のダッシュボードや高価なツールは使用しません。SyncWith経由で取得したデータとシンプルなスクリプトを使用することで、すべてが適切に動作するようにします。

Check out similar posts:

If you're working with multiple GA4 properties, you might also want to streamline your paid search data. Learn how to Google 広告スクリプトを使用して、最も成果の高い検索語句をエクスポートする or Google スプレッドシートでクライアント センター全体の目標ステータスを監視する.

サイトがフラットになった場合、クライアントが怒鳴り始める 3 週間後ではなく、24 時間以内に気付くでしょう。

Bright Vesselの専門家と協力する

At Bright Vessel, we specialize in building innovative, scalable analytics systems for multi-location businesses, schools, and agencies. From Google Analytics 4 health monitoring to SEO performance alerts, we help our clients stay ahead of tracking failures and performance drops. Whether you're managing a handful of properties or hundreds, our team ensures your data flows seamlessly and your decision-making stays informed.

無料のSEO監査を受ける

無料のSEO監査フォーム

"*" indicates required fields

このフィールドは検証目的のためであり、変更しないでください。
コンテンツ
この記事をお楽しみいただけましたか?
Share it on social media!
無料のSEO監査を受ける

無料のSEO監査フォーム

"*" indicates required fields

このフィールドは検証目的のためであり、変更しないでください。
無料のSEO監査を受ける

無料のSEO監査フォーム

"*" indicates required fields

このフィールドは検証目的のためであり、変更しないでください。
この記事は気に入っていただけましたか?
Share it on social media!

別のブログ投稿もチェックしてください!

すべてのブログ投稿に戻る
© 2024 Bright Vessel. All rights reserved.
下向きシェブロン左矢印