ביקורים – iOS SDK

מסמך זה מספק סקירה כללית ברמה גבוהה של סשנים בהקשר ל-Google Analytics SDK ל-iOS v3.

סקירה

סשן מייצג תקופה יחידה של אינטראקציה של משתמש עם האפליקציה. סשנים משמשים כמאגרים שימושיים של פעילות נמדדת, שכוללת צפיות במסך, אירועים ופירוט עסקאות.

ניהול פעילויות באתר

כברירת מחדל, מערכת Google Analytics תקבץ היטים שהתקבלו בתוך 30 דקות אחד מהשני באותו סשן. את התקופה הזו אפשר להגדיר ברמת הנכס. איך מגדירים את פרק הזמן הקצוב לתפוגה של סשן?

ניהול סשנים ידני

כדי להתחיל או לסיים סשן באופן ידני, צריך להגדיר את הפרמטר של בקרת הסשנים במילון שאתם מעבירים לשיטה send: של מכשיר המעקב.

// May return nil if a tracker has not yet been initialized.
id tracker = [[GAI sharedInstance] defaultTracker];

// Start a new session with a screenView hit.
GAIDictionaryBuilder *builder = [GAIDictionaryBuilder createScreenView];
[builder set:@"start" forKey:kGAISessionControl];
[tracker set:kGAIScreenName value:@"My Screen"];
[tracker send:[builder build]];
// There should be no need to end a session explicitly.  However, if you do
// need to indicate end of session with a hit, simply add the following line
// of code to add the parameter to the builder:
[builder set:@"end" forKey:kGAISessionControl];