SORU
29 NİSAN 2013, PAZARTESİ


GAİTrackedViewController ve UİTableViewController

İOS için Google Analytics ile Google v2 UIViewController GAITrackedViewController sınıf sınıflara gösteriyor. Biz UİTableViewController bu durumda ne yaparsınız?

source

#import "GAITrackedViewController.h"

@interface AboutViewController : GAITrackedViewController

CEVAP
2 Mayıs 2013, PERŞEMBE


Manuel Ekran İzleme

GAİTrackedViewController uzanan ekran görünümleri izlemek için tek bir yol olduğunu unutmayın. Manuel yol gibi kolaydır.

SDK v2

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];

    // returns the same tracker you created in your app delegate
    // defaultTracker originally declared in AppDelegate.m
    id<GAITracker> tracker = [[GAI sharedInstance] defaultTracker];

    // manual screen tracking
    [tracker sendView:@"Home Screen"];
}

SDK v3

#import "GAI.h"
#import "GAIFields.h"
#import "GAIDictionaryBuilder.h"

...

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];

    // returns the same tracker you created in your app delegate
    // defaultTracker originally declared in AppDelegate.m
    id tracker = [[GAI sharedInstance] defaultTracker];

    // This screen name value will remain set on the tracker and sent with
    // hits until it is set to a new value or to nil.
    [tracker set:kGAIScreenName
           value:@"Home Screen"];

    // manual screen tracking
    [tracker send:[[GAIDictionaryBuilder createScreenView] build]];
}

Başvuru

https://developers.google.com/analytics/devguides/collection/ios/v2/screens#manual https://developers.google.com/analytics/devguides/collection/ios/v3/screens#manual

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • KIT KAT

    KIT KAT

    3 EKİM 2005
  • Lancome USA

    Lancome USA

    30 HAZİRAN 2009
  • ShotgunSandwichENT

    ShotgunSandw

    3 EKİM 2012