I would like to Integrate Google Analytics Tracking into my IOS APP.
我想把谷歌分析跟踪整合到我的IOS应用中。
I have integrated Google Analytics Library and Add It To my Application.
我已经集成了谷歌分析库并将其添加到我的应用程序中。
Here is my code snippet,
这是我的代码片段,
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[UIApplication sharedApplication].statusBarHidden = NO;
[GAI sharedInstance].trackUncaughtExceptions = YES;
[GAI sharedInstance].dispatchInterval = 1;
[GAI sharedInstance].debug=YES;
[[GAI sharedInstance] trackerWithTrackingId:@"UA-43556575-1"];
return YES;
}
Code In my FirstViewController
代码在我FirstViewController
- (void)viewDidLoad
{
[super viewDidLoad];
self.trackedViewName = @"Home";
....
....
}
List of Librarys which i have added, (First i have copied all this library from download folder then added to my project folder and then in Xcode i am taking reference from project folder)
我添加的Librarys列表(首先我从下载文件夹中复制了所有库,然后添加到我的项目文件夹中,然后在Xcode中我从项目文件夹中获取引用)
- GAI.h
- GAI.h
- GAITrackedViewController.h
- GAITrackedViewController.h
- GAITracker.h
- GAITracker.h
- GAITransaction.h
- GAITransaction.h
- GAITransactionItem.h
- GAITransactionItem.h
- libGoogleAnalytics.a
- libGoogleAnalytics.a
Almost 5 days and still stuck with same problem :(
差不多5天了,还是遇到同样的问题:
: Please Help ...
:请帮助…
Thank you for reading and thanks in advance.
感谢您的阅读和提前的感谢。
1 个解决方案
#1
1
I think this may be one case. Your UIViewController
class must be a subclass of the GAITrackedViewController
class,
我认为这可能是一个例子。你的UIViewController类必须是GAITrackedViewController类的子类,
@interface FirstViewController : GAITrackedViewController
And Must override these function.
必须重写这些函数。
-(void)viewDidLoad
{
[super viewDidLoad];
self.trackedName = @"Home";
// your code here
}
-(void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
// your code here
}
As viewDidLoad
and viewDidAppear:
are important methods.
正如viewDidLoad和viewDidAppear:是重要的方法。
And Remember the profile must be for mobile app
.
请记住,个人资料必须用于移动应用。
#1
1
I think this may be one case. Your UIViewController
class must be a subclass of the GAITrackedViewController
class,
我认为这可能是一个例子。你的UIViewController类必须是GAITrackedViewController类的子类,
@interface FirstViewController : GAITrackedViewController
And Must override these function.
必须重写这些函数。
-(void)viewDidLoad
{
[super viewDidLoad];
self.trackedName = @"Home";
// your code here
}
-(void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
// your code here
}
As viewDidLoad
and viewDidAppear:
are important methods.
正如viewDidLoad和viewDidAppear:是重要的方法。
And Remember the profile must be for mobile app
.
请记住,个人资料必须用于移动应用。