5

I want to integrate Google analytics in my asp.net mvc application. 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?

Jeff Atwood
  • 63,320
  • 48
  • 150
  • 153
Fraz Sundal
  • 10,288
  • 22
  • 81
  • 132

1 Answers1

0

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.

Community
  • 1
  • 1
CatDadCode
  • 58,507
  • 61
  • 212
  • 318