How to implement Google Analytics in BlogEngine.NET?

Apr 10, 2011 at 2:56 AM

I see that in the Admin panel, there is a field called "Tracking Script." I assume that this is where you would put the Google Analytics code. Is that correct?

If so, is there any reason why you would use some of the extensions that are offered? Are there any benefits that are offered by the extensions that are not available if you use the "Tracking Script" field?

Coordinator
Apr 10, 2011 at 6:25 PM

When you setup analytics google provides you with a script. Copy-paste it in settings/custom code/trailing script. Or use more sophisticated extension from here

Apr 10, 2011 at 10:36 PM
Edited Apr 10, 2011 at 10:37 PM

What are the benefits of using the extension vs. the tracking script field?

I was looking at that extension but I didn't know if there was a recommended method to do it.

Jul 10, 2011 at 9:16 AM
Edited Jul 10, 2011 at 10:50 AM
rtur wrote:

When you setup analytics google provides you with a script. Copy-paste it in settings/custom code/trailing script. Or use more sophisticated extension from here

I pasted the google analytics code. It gives following error after I click submit: 

Ooops! An unexpected error has occurred.
This one's down to me! Please accept my apologies for this - I'll see to it that the developer responsible for this happening is given 20 lashes (but only after he or she has fixed this problem).

Error Details:

Url : http://saosx.com/tech/admin/Settings/HeadTrack.aspx

Raw Url : /tech/admin/Settings/HeadTrack.aspx

Message : A potentially dangerous Request.Form value was detected from the client (ctl00$cphAdmin$txtTrackingScript="

I even tried converting < sign to &lt; and >to &gt; It saved the script but doesn't work at all.

You mentioned an extension. Does it work on BlogEngine.Net 2.5?

I'm using BE2.5,

.Net Framework 4

I already have in my web.config

<httpRuntime enableVersionHeader="false" useFullyQualifiedRedirectUrl="true" maxRequestLength="16384" executionTimeout="3600" requestLengthDiskThreshold="16384" requestValidationMode="2.0"/>

Jul 10, 2011 at 1:43 PM

http://www.bloggersonline.com/forum/index.php?topic=258.0

Jul 10, 2011 at 1:43 PM

http://www.bloggersonline.com/forum/index.php?topic=258.0

Jul 12, 2011 at 2:03 PM
dmichaud80 wrote:

http://www.bloggersonline.com/forum/index.php?topic=258.0

That's useless. I wonder whether you read my problem statement.