Aug
19
Written by:
Darrell Hardy
8/19/2009 12:39 AM
If you ever use the Admin => Site Log => Detailed Site Log report, you may have noticed that you are getting no visitors using IE7 or IE8. A quick look at the stored procedure that retrieves data for this report (GetSiteLog2) shows us the problem. In the middle of the select statement you will see the following:
'UserAgent' =
case
when dbo.SiteLog.UserAgent like '%MSIE 1%' then 'Internet Explorer 1'
when dbo.SiteLog.UserAgent like '%MSIE 2%' then 'Internet Explorer 2'
when dbo.SiteLog.UserAgent like '%MSIE 3%' then 'Internet Explorer 3'
when dbo.SiteLog.UserAgent like '%MSIE 4%' then 'Internet Explorer 4'
when dbo.SiteLog.UserAgent like '%MSIE 5%' then 'Internet Explorer 5'
when dbo.SiteLog.UserAgent like '%MSIE 6%' then 'Internet Explorer 6'
when dbo.SiteLog.UserAgent like '%MSIE%' then 'Internet Explorer'
when dbo.SiteLog.UserAgent like '%Mozilla/1%' then 'Netscape Navigator 1'
when dbo.SiteLog.UserAgent like '%Mozilla/2%' then 'Netscape Navigator 2'
when dbo.SiteLog.UserAgent like '%Mozilla/3%' then 'Netscape Navigator 3'
when dbo.SiteLog.UserAgent like '%Mozilla/4%' then 'Netscape Navigator 4'
when dbo.SiteLog.UserAgent like '%Mozilla/5%' then 'Netscape Navigator 6+'
else dbo.SiteLog.UserAgent
end,
Notice that the stored procedure is not testing for IE7 or IE8. Therefore anything later than IE6 just gets the generic “Internet Explore” label.
This is easily remedied. Simply add the following two lines after the line testing for IE6 and before the generic IE test:
when dbo.SiteLog.UserAgent like '%MSIE 7%' then 'Internet Explorer 7'
when dbo.SiteLog.UserAgent like '%MSIE 8%' then 'Internet Explorer 8'
Once you update your stored procedure, your report will correctly identify IE7 and IE8.
If you do not feel comfortable or don’t have the tools to edit the stored procedure, you can use the SQL page located under the Host Menu. Simply paste in the contents of this file once you have unzipped it. Be sure to check the “Run as Script” check box before you click the “Execute” link.
Enjoy your updated logs and happy DNNing.
Tags: