2

在我的 iPhone 应用程序中,我使用 Omniture 进行跟踪。

我在 AppDelegate 中编写的代码:

 OMAppMeasurement * s = [OMAppMeasurement getInstance];

/* Specify the Report Suite ID(s) to track here */
s.account = @"reportSuiteID";

s.currencyCode = @"USD";
/* Turn on and configure debugging here */

s.debugTracking = YES;

/* WARNING: Changing any of the below variables will cause drastic
 changes
 to how your visitor data is collected. Changes should only be made
 when instructed to do so by your account manager.*/

s.pageName=@"firstViewController";

s.trackingServer = @"trackingserver";
[s track];

我的控制台只显示一行:

App Measurement Library 编译时间 = Jan 25 2011 11:46:14

建议我做错了什么?

我的代码在正确的位置吗?

在哪里可以看到报告?

4

3 回答 3

1

对于我们所有的客户,我们都使用了不同的 sintax 来实现。我们把 OMAppMeasurement * s; 在 AppDelegate 和 applicationDidFinishLaunching 函数中的所有配置代码中。这是所有 Omniture 实施文档中的认证实施。

#import "BasicExampleAppDelegate.h"
@implementation BasicExampleAppDelegate

OMAppMeasurement * s;

@synthesize window = window_;

- (void)applicationDidFinishLaunching:(UIApplication *)application {

    //Instantiate instance
    s = [[OMAppMeasurement alloc] init];
    //Setup application config variables
    s.account = @"RSID";  

    s.trackingServer = @"TRACKSERVER";  

    s.pageName = @"Main Page";

    [s track];

  [window_ makeKeyAndVisible];
}

- (void)dealloc {
  [s release];
  [window_ release];
  [super dealloc];
}

@end
于 2011-03-03T11:01:44.877 回答
0

检查您的项目中是否包含所有必要的文件和框架(“OMAppMeasurement.h”和框架 libOmnitureAppMeasurement-iPhoneDevice.a 和 libOmnitureAppMeasurement-iPhoneSimulator_4_0_GM.a)。

尝试使用您自己的跟踪数据创建一个 NSDictionary 并使用(void)track:(NSDictionary *)variableOverrides. 如果跟踪成功,则没有正号(作为日志语句)。

可以在 Omniture 网站上查看这些报告。

编辑:初始化代码必须在 UIAppDelegate 中。[track] 调用必须是您要跟踪某些数据的位置(例如,在某些 UIViewController 的 init 方法中或在按下某个按钮之后)。

可以在这里找到指南

于 2011-02-25T12:28:59.780 回答
0

看看这个指南:http ://www.2shared.com/document/dfkGsrwu/App_Measurement_for_iPhone_Imp.htm

帮了我很多,大量的信息:)

于 2011-09-30T10:24:44.080 回答