Googleアナリティクスを使用して、特定のユーザーによるページビューとセッションをトラッキングします。 これを行うには、最新の(v1.1)GANTrackerバージョンでサポートされているカスタム変数を使用したいと思います。私はこれを入れて追跡したいページを開き、関数内iPhone SDKカスタム変数のGANTrackerでエラーが発生する195946409
error1: Error Domain=com.google.googleanalytics.GANTrackerError Code=195946409 "The operation couldn’t be completed. (com.google.googleanalytics.GANTrackerError error 195946409.)"
error2: Error Domain=com.google.googleanalytics.GANTrackerError Code=195946409 "The operation couldn’t be completed. (com.google.googleanalytics.GANTrackerError error 195946409.)"
:私は私のアプリを起動したとき
[[GANTracker sharedTracker] startTrackerWithAccountID:@"UA-xxxxxxxx-x"
dispatchPeriod:10
delegate:nil];
NSError *error1;
if(![[GANTracker sharedTracker] setCustomVariableAtIndex:0
name:@"userSession"
value:@"username"
scope:kGANSessionScope
withError:&error1]){
NSLog(@"error1 %@", error1);
}
NSError *error2;
if(![[GANTracker sharedTracker] setCustomVariableAtIndex:1
name:@"userSession"
value:@"username"
scope:kGANPageScope
withError:&error2]){
NSLog(@"error2 %@", error2);
}
が、私はこれらのエラーを取得:私のappHeaderで
私はこのコードを持っています:
はNSError * error;
if(![[GANTracker sharedTracker] trackPageview:@"/pagename"]
withError:&error]){
NSLog(@"%@", error);
}
これはエラーを返しません
setCustomVariableAtIndex関数を省略すると、ページビューはアナリティクスに記録されますが、カスタム変数とは何も得られません。
私はこの問題をどのように解決できるか考えている人はいますか?
これを上記のコードを変更しますインデックス1を使用する必要があり、私は1で、インデックスを設定することにより、(私は思う)、それを解決し、2 0と1の代わりに – Weptunus