Venexus DotNetNuke Blog#

I have decided to create a blog just for DotNetNuke. I will still post new stuff I find, hear, or encounter concerning general technology and development here, but will post all things related to the DNN community on the Venexus DotNetNuke Blog.

I feel that DNN has much potential in the open-source community. Being that I work with it everyday, I decided to create my own blog just to keep up with it and really expand categories that would not be appropriate here. So, stay tuned...

12/2/2005 10:45:13 AM (Eastern Standard Time, UTC-05:00) #    Comments [0]  |  Trackback

 

SQL for DotNetNuke PageHeaderText Update for Google Analytics#

I have several sites running off a single DotNetNuke installation and I wanted to add the Google Analytics Javascript to several of the sites. I had a few options: 

  1. I could change default.aspx to include the JavaScript code in the HTML head
  2. I could incorporate the Urchin Javascript in a DNN Skin
  3. I could go I could go into each pages Page Settings>Advanced Settings>Page Header Tags and drop the JavaScript into the textbox
  4. Just run a SQL statement

Option 1 does not work because all installations would have the same JavaScript and I could not be site specific with the Google Analytics Site ID. Option 2 is probably the best option but I am lazy and did not want to update each skin and upload them each to the site. Option 3 is just ridiculous for a few of our larger sites and would take forever...so, I picked Option 4, the quick sql statement:

UPDATE Tabs SET PageHeadText = '<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
           </script>
           <script type="text/javascript">
                _uacct = "UA-xxxxxx-x";
                urchinTracker();
           </script>'
 WHERE (PortalID = 0)

Before you use this sql update statement against your DNN database, make sure you update your Google Analytics ID, "UA-xxxxxx-x", and PortalID #.

This will automatically change all pages for that portal to include the Google Urchin JavaScript. If you do not want certain pages such as the Admin pages to include this JavaScript, simply filter out any by ParentID's 

Example:

UPDATE Tabs SET PageHeadText = '<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
           </script>
           <script type="text/javascript">
                _uacct = "UA-xxxxxx-x";
                urchinTracker();
           </script>'
 WHERE (PortalID = 0) AND ParentID <> '38'

You could easily use this same script to add other HTML head code. Hope that helps!

11/28/2005 11:14:43 PM (Eastern Standard Time, UTC-05:00) #    Comments [0]  |  Trackback

 

HTML Table Trick#

Sometimes the menu on a website will alter search engine results because the links in the menu change the importance of the overall page, especially if the links appear before the content of the page. So, optimizing for search engines should include trying to get the actual content of the page higher up in the HTML. Doing so might affect the overall look and feel of the page, but there are ways to get around it. I think most people are accustomed to left navigation menus and expect them to be available, so by using a simple table trick, you can move the menu of a page below the content, giving the content more importance over the menu links for better ranking.

Main Content Goes here. Even though it appears to be right of the menu when viewed, in the source this content comes before the menu...
This is a menu

 

Basic HTML Example: Table-Trick.html (.52 KB)

This can easily be used in DotNetNuke skins to move items like SolPartMenu or modules in the "LeftPane" below the "Content Pane".

DNN Table Trick Example:

dnn-skin-example.html (.49 KB)

 

 

11/20/2005 4:43:02 PM (Eastern Standard Time, UTC-05:00) #    Comments [0]  |  Trackback

 

Replacing the Title Text in DotNetNuke Modules#
Replacing the Title Text in DotNetNuke Modules
9/9/2005 11:35:21 PM (Eastern Standard Time, UTC-05:00) #    Comments [0]  |  Trackback

 

Finding News, Aggregating News#
Article and News Aggregation
8/5/2005 11:08:37 PM (Eastern Standard Time, UTC-05:00) #    Comments [0]  |  Trackback

 

DotNetNuke on CNET#
CNET article on DNN
7/11/2005 10:58:27 PM (Eastern Standard Time, UTC-05:00) #    Comments [0]  |  Trackback

 

DotNetNuke#
Getting Started with DNN
7/4/2005 10:51:10 PM (Eastern Standard Time, UTC-05:00) #    Comments [0]  |  Trackback

 

All content © 2008, Xfernal
On this page
This site
Calendar
<October 2008>
SunMonTueWedThuFriSat
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678
Archives
Sitemap
Blogroll OPML
Scott Schecter
Entropy Expounded
Venexus DotNetNuke Blog
Articles, Code Snippits, and News from the DNN frontline.
Disclaimer

Powered by: newtelligence dasBlog 1.8.5223.1

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Send mail to the author(s) E-mail

Theme design by Jelle Druyts


Pick a theme: