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

  • Cartoonium

    Cartoonium

    11 NİSAN 2011
  • Eric Magidson

    Eric Magidso

    4 Ocak 2009
  • Kenneth Håkonsen

    Kenneth Håk

    13 Mart 2011