如何扩展 Blogengine.Net 来收集访客统计信息?

发布于 2024-07-06 19:13:56 字数 588 浏览 7 评论 0 原文

我喜欢博客引擎。 但据我所知,它没有收集我想看到的访问者的标准信息(推荐人、浏览器类型等)。

当我以管理员身份登录时,我有一个名为“Referrer”的菜单项。 我可以选择一个工作日,然后我会看到 1 或 2 行

“google.com 4 次点击,”itmaskinen.se 6 次点击”等等,但这不是我想要的,我想在哪里我的访问者来自、国家/地区、IP(如果可能)、有多少访问者等等,

如果你们中有人熟悉 Blogengine.Net 并且可以为我指出正确的方向,我将在哪里放置我自己的日志代码,或者您是否知道。任何可以为我做这件事的访问者统计扩展,我都会很高兴知道我更喜欢一个扩展,因为如果我自己对 BlogEngine 进行更改,它可能会破坏我安装的

博客软件 。在.Net中找到这里: http://www.dotnetblogengine.net/

是的,我更喜欢这个在这里而不是在 Blogengine.Net 论坛上提问,你知道为什么;)

(任何人,请随意编辑我这篇文章中的(糟糕的)英语,然后删除这句话)

I love BlogEngine. But from what I can se it does not collect the standard information about the visitors I would like to see (referrer, browser-type and so on).

When I log in as Admin I have a menu item named "Referrer". I can choose a weekday and then I'll be presented with 1 or 2 rows with

"google.com 4 hits, "itmaskinen.se 6 hits" and so on, But that's not what I want to se, I want to se where my visitors come from, country, IP if possible, how many visitors and so on.

If someone of you are familiar with Blogengine.Net and can point me in the right direction to where I would put my own log-code or if you know any visitor-statistic-extension that can do it for me, I would be really happy to know. I prefer an extension, because if I make changes myself to BlogEngine it may break later updates I install.

Blogengine.Net is a blog software made in .Net found here: http://www.dotnetblogengine.net/

And yes, I prefer to take this question here rather then in the Blogengine.Net forum, you know why. ;)

(Anyone, feel free to edit my (bad) english in this post and after that delete this sentence)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

往日情怀 2024-07-13 19:13:56

这不是一个扩展,但我用它来收集我的所有 blogengine.net 数据,并且它应该是安全升级的。

当您登录 Blogengine.NET 管理屏幕时,您可以转到“设置 > 自定义代码 > 跟踪脚本”,在这里您可以将您的 http://www.google.com/analytics/ 日志记录脚本。 Google Analytics 提供您想要的所有引荐来源网址、浏览器类型等内容。 令人高兴的是,如果您选择的话,您可以为其他网站创建额外的帐户。

This isn't an extension, but it's what I use to collect all my blogengine.net data and it should be upgrade safe.

When you log into the Blogengine.NET admin screens you can go to "Settings> Custome Code > Tracking Script", here you can put your http://www.google.com/analytics/ logging script. Google Analytics provides all the referrer, browser type, etc stuff you were wanting. And what's nice is you can then create additional accounts for other sites if you choose.

蓬勃野心 2024-07-13 19:13:56

我使用 Google Analytics 和 StatCounter 来跟踪访客统计信息。 我发现每个人都提供了其他人没有提供的有用信息。 而且它们在一定程度上都是免费的。

我将他们的 javascript 代码放入我的自定义 BE.Net 皮肤的 site.master 文件中。

对于 Google Analytics,我更进一步,将经过身份验证的用户的用户名作为自定义变量传递。 这样我就可以将用户名与统计数据相匹配。 为此,您可以在 GA pageTracker 上使用 _setVar javascript 方法,如下所示:

<script type="text/javascript">
    var pageTracker = _gat._getTracker("UA-129049-25");
    var userDefinedValue = '<%= System.Web.Security.Membership.GetUser() != null ? System.Web.Security.Membership.GetUser().UserName : "" %>';
    pageTracker._setVar(userDefinedValue);
    pageTracker._trackPageview();
</script>

I use both Google Analytics and StatCounter to track visitor stats. I find that each one provides useful information that the other doesn't. And they're both free to a certain extent.

I place their javascript code int the site.master file of my custom BE.Net skin.

For Google Analytics I go a step further and pass the username of authenticated users as a custom variable. That way I can match users names up with the stats. To do this you can use the _setVar javascript method on the GA pageTracker like so:

<script type="text/javascript">
    var pageTracker = _gat._getTracker("UA-129049-25");
    var userDefinedValue = '<%= System.Web.Security.Membership.GetUser() != null ? System.Web.Security.Membership.GetUser().UserName : "" %>';
    pageTracker._setVar(userDefinedValue);
    pageTracker._trackPageview();
</script>
说好的呢 2024-07-13 19:13:56

有人注意到我们错过了来自 RSS 读者的所有点击吗? Syndicate.axd 不运行分析 JavaScript。 所以我们从统计数据中漏掉了绝大多数观众。 我们很高兴地分析说,临时访客并不重要。

Anyone noticed that we miss all the hits coming from RSS readers? Syndication.axd does not run the analytics javascripts. So we miss the vast majority of viewers from the statistics. And we happily analyze that is just not impotant - ad-hoc visitors.

看海 2024-07-13 19:13:56

对于绝大多数情况,Google Analytics 的表现都很好。 这完全取决于您想要多少数据。 例如,如果您想记录 IP 地址并解析它们以获取域名,并突出显示您工作公司的同事等对您博客的所有访问,则必须编写一些自定义代码你自己。 然而,这一切都相当原始——使用 ASP.NET 可以轻松实现这些事情。

For the vast majority of cases, Google Analytics does just fine. It all depends on how much data you want. For example, if you want to keep note of IP addresses and resolve them to get domain names, and also highlight all visits to your blog from, say, your coworkers at the company where you work, you'd have to write some custom code yourself. However, it's all fairly primitive - these sorts of things are easily achievable using ASP.NET.

日裸衫吸 2024-07-13 19:13:56

我在 BlogEngine 实例的 IIS 网站上设置了收集统计信息,然后使用 WebLog Expert 分析日志 - http://www.weblogexpert .com

它比谷歌分析更可靠,因为我确实看到了发送到我的 IIS 的所有请求,无论这是对 axd 的请求还是对某些静态内容的请求。 而且,一旦我发现谷歌在访问次数上欺骗了我。 从那以后,我比谷歌更信任我的 IIS 统计数据。

I set up gathering statistics on IIS web site of my BlogEngine instance and then analyze the logs using WebLog Expert - http://www.weblogexpert.com.

It is more reliable than google analytics, since I see really ALL requests that are coming to my IIS, no matter if this is a request to axd or to some static content. And, once I've found out that google was fooling me in the number of visits. After that I trust my IIS statistics much more than google.

世界和平 2024-07-13 19:13:56

有一个小部件可用于显示访问量和在线用户统计信息。
您可以通过以下链接找到它:
http://www.nuget.org/packages/Statistics/
http:// /www.itnerd.ir/post/2013/07/25/Visits-and-Online-Users-Statistics-widget-for-BlogEngine-2
但要查看说明,请转到第二个链接。

There is a Widget which can be use to display Visits and Online Users Statistics.
You can find it from following links:
http://www.nuget.org/packages/Statistics/
http://www.itnerd.ir/post/2013/07/25/Visits-and-Online-Users-Statistics-widget-for-BlogEngine-2
but to see the instructions go to the second link.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文