Wednesday, November 28, 2007

Using Google Analytics with DotNetNuke (DNN)

I use a content management system called DotNetNuke to build a lot of my websites. It's tremendous in its flexibility and power, and {gasp} it's an open source project for the Microsoft platform. I've used other CMS tools, but nothing comes close to the power of DotNetNuke, especially when extending it using ASP.NET.

One problem I've ran into when attempting to use Google Analytics with DNN derives from the fact that each page is built dynamically when the user requests the page. A single default.aspx file is used for all page requests, and the content, skin, objects, etc. are injected as elements into this default.aspx file to create the page. On the surface it would seem simple to just copy and paste the Google Analytics code into this single default.aspx file. Some problems arise from this:

  • Sometimes multiple sites share this default.aspx file. Tracking reports from Google Analytics will then show the numbers for all these sites (or portals as they are called in DNN parlance)
  • Pushing the Google Analytics code into every DotNetNuke page using a single default.aspx file creates an issue with the DNN administrative pages. Not that it hurts anything, but those pages shouldn't be counted in the usage totals - it skews the results.
  • If you have any https pages in your site, they will fail the security test because the Google Analytics code uses plain-jane vanilla http requests. (Note - I've seen some workarounds for this, but none have been satisfactory).
  • The Google Analytics code shows extremely skewed results for some pages because of the strange way that DotNetNuke builds the URLs for each page. The friendly URL problem will hopefully have a fix in a future release.
So what to do? The answer is simpler than it seems.
  1. Login as either the DNN administrator or super user (host) account.
  2. Navigate to your home page
  3. Add a Text/HTML Module, preferable somewhere unobtrusive like the bottom of the page
  4. First, change the settings on the Text/HTML module so that the container is invisible (uncheck the 'Display Container' under the Page Settings section) and save your changes.
  5. Next, click the 'Edit Text' button on the module
  6. In the Edit Text window, click on the 'Source' button to view the actual HTML. Delete whatever content is in there (if any) and copy and paste your Google Analytics code that you received from Google. Make sure to click the Update button to save the changes.
  7. Next, go back into the Settings for the module, but this time expand the 'Advanced Settings' tab. Make sure the 'Show on every page' checkbox is checked and click 'Update'
  8. If you have https pages, navigate to those and manually delete the module from them. You won't be able to track your secure pages (maybe someone has a suggestion about this).
Make sure that Google Analytics is picking up the code, and if so, you'll have to wait until the next day to view your stats through the Analytics reports. Google updates the stats everyday at about midnight Pacific time, so statistics are never real time and always one day behind, but they are a great tool to have.

Happy stats!

Sunday, November 18, 2007

How to add multiple sites with the same root directory to your MSN Webmaster tools

Some may not even know that MSN has a set of webmaster tools to track your websites' position in the Live.com search engine. For those who don't yet know about the tools, you can find them at webmaster.live.com. They are a far cry from the robust tools available from Google, but they're a good start. I track only my most important websites in the MSN tools (at least for now).

One problem I ran into was in the verification process. MSN requires you to either add an XML file to the root directory of your site, or add a META tag to your home page HTML file.

I use a Content Management System that allows me to build hundreds of web pages using the same database, file structure, and index file. Each page is built dynamically at run time based on the request from the user (what URL, which page, etc.).

This left me with a problem - I could add a new META tag to my default HTML file for each site that I track, or I could add the XML file to the root directory. Since hundreds of websites share the same default HTML file, it seemed inefficient to add the overhead for thousands of requests per hour to that file. Instead, I added the XML file to the root directory.

Here's where it got tricky. The file name is always the same for each website (LiveSearchSiteAuth.xml), but the content is different. It's a fairly simple XML file with a single Users attribute with multiple users nested with user tags. The first site I added was easy; I simply copied and pasted the text it gave me into the XML file and copied that into the root directory of the site.

The rest were a bit harder, but once I had it figured out, they were also easy. Instead of copying all the XML code that Microsoft gives you, only copy the information between the start and end users tags and add it onto the end of the file you created. You can add as many users tags as you would like - one for each website you want to track.

I don't think there's a limit - I have over 10 right now, and I assume that I can add as many as I'd like to the file.

Thursday, November 8, 2007

Google stock takes a tumble

The Associated Press is reporting that Google's stock dropped about 5% today. The tumble means a loss of about $12 billion in market capitalization. Other tech stocks also took large plunges today, with Apple down about 6% ($9 billion drop in market cap) and Cisco fell nearly 9.5%, costing its shareholders about $19 billion in market value.

The correction in Google's stock price shouldn't come as a surprise - no stock goes up all the time. But, the timing is odd, and reflects investor's ignorance of technology in general and tech companies in particular. The drop came about because of a warning from Cisco that demand is down (and partially blaming it on the real estate/mortgage industry woes). I guess that investors lump all technology stocks in together, but Cisco and Google couldn't be more different, and investors really don't understand the difference between a HARDWARE (Cisco) and a SOFTWARE/ADVERTISING (Google) company. The fact that investor's panicked and started dumping tech stocks shows a problem with how American's invest - i.e., they don't do enough research into the companies in which they invest.

(sidenote: Americans should be far more worried about the Dollar's continuing weakness, especially with rumors of China threatening to dump Dollars in favor of the Euro.)

Google is still on an upward track, with huge earnings and enormous growth potential. The ceiling for Google is still nowhere in sight, so while new investors might not be getting in on the ground floor, those savvy enough to do so might hop on now. Expect a bounce back for Google's stock soon.

Wednesday, November 7, 2007

Digital Marketing Firm in Calgary

If you are living in the Calgary Alberta area in Canada and seeking a Calgary digital marketing firm, there are many specialized firms in which to choose. These firms help to market your brand via social media and other platforms, while increasing its visibility. When the Calgary business person representing a brand becomes a client for the firm, they are assigned a team that works with them. This team includes: sales and marketing, accounting, client servicing, content/creative communications, search engine optimization(SEO), web design and development and search engine marketing.

*Sales and Marketing
The sales and marketing team for your Calgary brand, will help in selling products and services and in marketing the brand.

*Accounting
The accounting team helps in developing and strengthening the clients/brands financial record. Any taxes paid by the company or invoices that need to paid due to distribution, etc. are done within this department.

*Client Servicing
This is the face of the brand. They client servicing team is there to answer and resolve issues that the consumer may have. Any complaints from the customer about the brand, will go through the client servicing team.

*Content/Creative Communications
This team does the writing for the brand. Anything needing to be written, such as blogs, advertisements, press releases, will be done by the content/creative communications team. They will often work with the SEO team in creating great dialogue, that leads to great advertisement for the brand.

*SEO (Search Engine Optimization)
Considered the heart of the team, today's society is all about the search engine optimization or SEO. This helps to generate thousands of leads for the company on a daily basis. It is considered the bread and butter of the brand and rightly so. If the brand name of the company is not visible through search engine optimization(SEO), then it might as well not exist.

*Web Design and Development
Your Calgary brand name needs to have a website in order to market to the masses. Websites help to tell the personality of a company. It also helps consumers to understand the company and educate them about its products and services. An experienced and knowledgeable web design and development team, are vital in giving you the website that will help bring traffic to your brand. The website will also allow consumers to see what your company is all about. Landing pages on websites help to create an ambience, that consumers will either dislike and not return to or love and want to visit again. Major traffic on your website, due to creative web design and development, leads to increased repeat customers, which could lead to increased sales and profitability.

*Search Engine Marketing
The search engine marketing team helps to create ideas, that will market and help sell your products and services, via the search engine on the internet. Another vital part to the team, as it helps to drive consumers towards recognizing and respecting your brand.


Now, you have joined the team and your chosen. The investment is beginning to pay off and you are seeing company growth. You are now seeing your business recognition increase locally as well in the Calgary area. This has helped your brand to become more visible, while growing into the company you knew that it could be.