开发者

Implementing Google Analytics in Asp.net mvc

I want to integrate Google analytics in my asp.net mvc appli开发者_开发问答cation. So im doing some R&D for it to find out which one is the better. I find out a Google Analytic Dashboard Controls which are available at

http://gadashboardcontrols.codeplex.com/

But they are server control and im not sure how to implement in asp.net mvc. Secondly can i implement asp.net charts in my asp.net mvc application?


Implementing standard ASP.NET controls in an ASP.NET MVC application, while possible, defeats the whole purpose of using MVC.

To get around this issue with the chart control, go here New asp.net charting controls - will they work with MVC (eventually)?

The answer describes how to render the control as an image to be used by the view. A nice elegant solution that still adheres to MVC's separation of concerns :)

As for google analytics, if all you need is the tracking code then you can simply include the script tag they give you. However, if you need all the custom analytics controls I don't think they have an MVC equivalent. Though you could code against the google API.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜