This commit is contained in:
1 parent
cfa8128aa4
commit
16cf001bb3
1 file changed
+3
-3
@@ -267,7 +267,7 @@ async function fetchAudience(
|
||||
const data = await graphql<{
|
||||
viewer: {
|
||||
accounts: {
|
||||
rumPagesAdaptiveGroups: {
|
||||
rumPageloadEventsAdaptiveGroups: {
|
||||
count: number;
|
||||
sum: { visits: number };
|
||||
dimensions: { date: string };
|
||||
@@ -280,7 +280,7 @@ async function fetchAudience(
|
||||
query WebAnalytics($account: string, $site: string, $date: string) {
|
||||
viewer {
|
||||
accounts(filter: { accountTag: $account }) {
|
||||
rumPagesAdaptiveGroups(
|
||||
rumPageloadEventsAdaptiveGroups(
|
||||
limit: 30
|
||||
filter: { siteTag: $site, datetime_geq: $date }
|
||||
orderBy: [date_ASC]
|
||||
@@ -303,7 +303,7 @@ async function fetchAudience(
|
||||
date: `${thirtyDaysAgo}T00:00:00Z`
|
||||
}
|
||||
);
|
||||
const rows = data.viewer.accounts[0]?.rumPagesAdaptiveGroups;
|
||||
const rows = data.viewer.accounts[0]?.rumPageloadEventsAdaptiveGroups;
|
||||
if (!rows)
|
||||
throw new Error('未返回数据,请检查 Token、Account ID 和 Site Tag 是否正确并具有权限');
|
||||
|
||||
|
||||
Reference in new issue
Block a user