Google analytics 通过段API传递的数据不会显示在Google Analytics上

Google analytics 通过段API传递的数据不会显示在Google Analytics上,google-analytics,Google Analytics,我正在使用Segment.com.NET API将数据传递给Google Analytics。但即使在3到4天之后,这些数据也没有出现在谷歌上。我也看不到段的Account Dashboard的Debugger部分中的数据 我想知道发生了什么事?在Google端是否有任何特殊的配置来显示数据?或者我还缺少什么 下面是使用的代码 Analytics.Initialize("pOAM4 Some-KEY PrAC",new Config().SetAsync(false)); Analytics.

我正在使用Segment.com.NET API将数据传递给Google Analytics。但即使在3到4天之后,这些数据也没有出现在谷歌上。我也看不到段的Account Dashboard的Debugger部分中的数据

我想知道发生了什么事?在Google端是否有任何特殊的配置来显示数据?或者我还缺少什么


下面是使用的代码

Analytics.Initialize("pOAM4 Some-KEY PrAC",new Config().SetAsync(false));
Analytics.Client.Identify("BillGates", new Segment.Model.Traits() {
                                      { "name", uname  },
                                      { "email", uemail },
                                      { "friends", counter }
                                                               });
Analytics.Client.Track("BillGates", "Purchased Item", new Segment.Model.Properties() {
       { "Item", itemcounter},
        { "revenue", 39.95 },
        { "shipping", "2-day" }
    });
Analytics.Client.Track("BillGates", "Logged Out", new Segment.Model.Properties()   {}  );
我已经执行了好几次了。。。。我预计谷歌分析仪表板上会出现一些东西,但它的银行


任何使用过Segment.com API的人有什么帮助吗?

如果您的数据没有到达Segment调试器,这意味着您的实现可能有问题,可能是API键或格式不正确的代码,我建议您使用此库中内置的日志记录,您可以这样使用它

using Segment;

Segment.Logger.Handlers += Logging_Handler;

void Logging_Handler(Level level, string message, Dict args) 
{
if (args != null)
{
    foreach (string key in args.Keys) {
        message += String.Format(" {0}: {1},", "" + key, "" + args[key]);
    }
}
Console.WriteLine(String.Format("[Analytics] [{0}] {1}", level, message));
}
我突然想到的一件事是,您在
.Track()
中调用了
新段.Model.Properties()
,在
中调用了
新段.Model.Traits()

我总是在
.Track()
中使用
newproperties()
,在
.Identify()中使用
newtraits()

Analytics.Client.Identify("<<userId>>", new Traits() {
{ "name", "#{ user.name }" },
{ "email", "#{ user.email }" },
{ "friends", 29 }
});

Analytics.Client.Track("<<userId>>", "Purchased Item", new Properties() {
{ "revenue", 39.95 },
{ "shipping", "2-day" }
});
Analytics.Client.Identify(“,新特性(){
{“name”,“#{user.name}”},
{“email”,“#{user.email}},
{“朋友”,29}
});
Analytics.Client.Track(“,”已购买物品“,新属性(){
{“收入”,39.95},
{“装运”,“2天”}
});
这个库的代码都是开源的,可以在github和上获得


祝你好运

如果您的数据没有到达段调试器,这意味着您的实现可能有问题,可能是API键或格式不正确的代码,我建议您使用这个库中内置的日志记录,您可以这样使用它

using Segment;

Segment.Logger.Handlers += Logging_Handler;

void Logging_Handler(Level level, string message, Dict args) 
{
if (args != null)
{
    foreach (string key in args.Keys) {
        message += String.Format(" {0}: {1},", "" + key, "" + args[key]);
    }
}
Console.WriteLine(String.Format("[Analytics] [{0}] {1}", level, message));
}
我突然想到的一件事是,您在
.Track()
中调用了
新段.Model.Properties()
,在
中调用了
新段.Model.Traits()

我总是在
.Track()
中使用
newproperties()
,在
.Identify()中使用
newtraits()

Analytics.Client.Identify("<<userId>>", new Traits() {
{ "name", "#{ user.name }" },
{ "email", "#{ user.email }" },
{ "friends", 29 }
});

Analytics.Client.Track("<<userId>>", "Purchased Item", new Properties() {
{ "revenue", 39.95 },
{ "shipping", "2-day" }
});
Analytics.Client.Identify(“,新特性(){
{“name”,“#{user.name}”},
{“email”,“#{user.email}},
{“朋友”,29}
});
Analytics.Client.Track(“,”已购买物品“,新属性(){
{“收入”,39.95},
{“装运”,“2天”}
});
这个库的代码都是开源的,可以在github和上获得

祝你好运