Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Analytics Yönetici hizmeti, Apps Script'te Google Analytics Admin API v1'i kullanmanıza olanak tanır. Google Analytics Admin API, Google Analytics 4 (GA4) yapılandırma verilerine programatik erişim sağlar ve yalnızca GA4 mülkleriyle uyumludur.
Apps Komut Dosyası'ndaki tüm gelişmiş hizmetler gibi AnalyticsAdmin hizmeti de herkese açık API ile aynı nesneleri, yöntemleri ve parametreleri kullanır. Daha fazla bilgi için Metod imzaları nasıl belirlenir? başlıklı makaleyi inceleyin.
/** * Logs the Google Analytics accounts accessible by the current user. */functionlistAccounts(){try{accounts=AnalyticsAdmin.Accounts.list();if(!accounts.items||!accounts.items.length){console.log('Noaccountsfound.');return;}for(leti=0;i < accounts.items.length;i++){constaccount=accounts.items[i];console.log('Account:name"%s",displayName"%s".',account.name,account.displayName);}}catch(e){// TODO (Developer) - Handle exceptionconsole.log('Failedwitherror:%s',e.error);}}
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-06-05 UTC."],[[["The Analytics Admin service in Apps Script enables programmatic access to Google Analytics 4 (GA4) configuration data using the Google Analytics Admin API v1."],["It is an advanced service that requires enabling before use and is exclusively compatible with GA4 properties."],["This service mirrors the objects, methods, and parameters of the public API, providing consistent functionality."],["Support and issue reporting can be found on the Google Analytics Admin API v1 support page."],["A provided sample code demonstrates listing all Google Analytics accounts accessible to the current user."]]],[]]