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

 

Google and Latent Semantic Indexing#

Google allows for a LSI keyword search. By prefacing a tilde (~) before the search term in Google, LSI keyword results will be returned.

Example search: ~automobile

Results would include many “car” related results with the LSI keywords bolded.

 

Example Results:

Toyota.com

Official Web site of Toyota Motor Corporation, USA, providing information on Toyota cars, trucks, SUVs, motorsports, as well as corporate information.
www.toyota.com/ - 11k - Cached - Similar pages

Honda Cars Motorcycles Watercraft ATVs Engines Generators, Acura

Manufactures a wide range of products, including motorcycles, ATVs, generators, marine engines, lawn and garden equipment, and automobiles. (NYSE:HMC).
www.honda.com/ - 20k - Nov 19, 2005 - Cached - Similar pages

Buy new & used cars online, research prices & dealers, sell your ...

Comprehensive site with vehicle profiles, dealer locator, and financing information.
www.cars.com/ - 34k - Nov 19, 2005 - Cached - Similar pages

Car Talk

Home of the funny and useful NPR one-hour call-in radio show of the same name which is broadcast every Saturday. Past shows are archived and can be heard ...
www.cartalk.com/ - 44k - Nov 19, 2005 - Cached - Similar pages

 

Notice “Toyota”, “Honda Cars”, “vehicle” are all bolded in the results. Very handy for getting more keywords ;-)

11/21/2005 8:37:17 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

 

Free Urchin#

One of the best web log analysis applications is Urchin Web Analytics which was bought by Google. I had checked on the Urchin website about a month ago and saw where they were still charging $199 per month plus extra for high traffic. Now the website points to Google Analytics and it is free. All required is to register for an account and to add a JavaScript to your HTML Head. Logging into your Google account will provide detailed reports.

More importantly:

"If you have an AdWords account, you can use Google Analytics directly from the AdWords interface. Google Analytics is the only product that can automatically provide AdWords ROI metrics, without you having to import cost data or add tracking information to keywords."

You can signup here: Google Analytics

 

11/16/2005 11:52:03 AM (Eastern Standard Time, UTC-05:00) #    Comments [0]  |  Trackback

 

Google Insider#
Google Search Engine Optimization
10/23/2005 11:54:05 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

 

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: