אחזור תובנות על המיקום
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
במדריך הזה מוסבר איך לאחזר מדדי מיקום בפרופיל העסק.
ה-API של 'Google לעסק שלי' מאפשר לכם לעבוד עם מדדי מיקום כדי לאחזר את סוגי הנתונים הבאים:
לפני שמתחילים
לפני שמשתמשים ב-API של 'Google לעסק שלי', צריך לרשום את האפליקציה ולקבל פרטי כניסה ל-OAuth 2.0. למידע נוסף על תחילת העבודה עם Google My Business API, קראו את המאמר הגדרה בסיסית.
התובנות הנתמכות
כדי לראות אילו תובנות נתמכות, אפשר לעיין בדף העזרה של מדד.
תובנות בסיסיות
אחזור תובנות בסיסיות לגבי רשימה נתונה של מיקומים. משתמשים ב-API accounts.locations.reportInsights
כדי להציג את התובנות שמשויכות למיקום.
כדי להציג את התובנות הבסיסיות שמשויכות למיקום, משתמשים בקוד הבא:
POST
https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations:reportInsights
{
"locationNames": [
"accounts/{accountId}/locations/{locationId}"
],
"basicRequest": {
"metricRequests": [
{
"metric": "QUERIES_DIRECT"
},
{
"metric": "QUERIES_INDIRECT"
}
],
"timeRange": {
"startTime": "2016-10-12T01:01:23.045123456Z",
"endTime": "2017-01-10T23:59:59.045123456Z"
}
}
}
מסלול נסיעה
אחזור מדדים של מסלולי נסיעה לרשימת מיקומים נתונה. אפשר להשתמש ב-API accounts.locations.reportInsights
כדי להציג מדדים של מסלול נסיעה שמשויכים למיקום.
כדי להציג את המדדים של כיוון הנסיעה, משתמשים בקוד הבא:
POST
https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations:reportInsights
{
"locationNames": [
"accounts/{accountId}/locations/{locationId}"
],
"drivingDirectionsRequest": {
"numDays": "NINETY"
}
}
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-01-29 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-01-29 (שעון UTC)."],[[["This tutorial demonstrates how to retrieve location metrics, such as basic insights and driving directions, using the Google My Business API."],["Before using the API, you'll need to register your application and obtain OAuth 2.0 credentials as outlined in the basic setup guide."],["You can retrieve basic insights like direct and indirect queries for specific locations within a defined timeframe using the `accounts.locations.reportInsights` API."],["Driving direction metrics, including data for the past 90 days, can also be retrieved using the `accounts.locations.reportInsights` API with a driving directions request."],["Refer to the Metric reference page for a comprehensive list of supported insights available through the Google My Business API."]]],[]]