Marife
Marife

Reputation: 27

Is there a downside to using Google Analytics on my MVC pages?

I would like to use Google Analytics but I am concerned about adding more script and slowing down the loading of my web page. Is there some way in MVC3 that I can minimize the impact of the additional scripts. Should I really be concerned about additional time to download the analytics JS ?

Upvotes: 0

Views: 303

Answers (3)

WestDiscGolf
WestDiscGolf

Reputation: 4108

If you're worried about the loading time then Google offer an async version, so just fire and forget. It then shouldn't get in the way of loading.

Upvotes: 0

Mike Miller
Mike Miller

Reputation: 16575

The analytics JS file is tiny and the script should be executed at the very latest moment ideally after the rendering of your page to not impact the user. I wouldn't worry too much about the perf. as so many sites use it. just make sure you follow the instructions to adding the tag probably and you should be fine.

enter image description here

Upvotes: 2

Darin Dimitrov
Darin Dimitrov

Reputation: 1038710

Yes, there could be an additional cost for those scripts. No, there is nothing you could do in ASP.NET MVC (or any other technology) to reduce it as you depend on Google. There is no free lunch. And I shouldn't be worried about it, many very high traffic sites (including this one) use it.

Upvotes: 3

Related Questions