开发者

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开发者_如何学C 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 ?


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.


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.

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


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜