mojoPortal Gets Advanced Google Analytics Integration

As of version 2.2.6.8, mojoPortal now includes advanced integration with Google Analytics. Google provides you with a basic script that you can use to track page views in your site, it looks like this:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-xxxxxxx-x");
pageTracker._trackPageview();
</script>

Historically, in mojoPortal and in other ASP.NET sites, you could always put this script into the bottom of your masterpage, in mojoPortal, that would be the layout.master file in your skin. This would get you basic tracking and it was very easy to do. Now in the current version of mojoPortal, you just enter this part "UA-xxxxxxx-x" from the script provided by google into your Site Settings  under (key icon) Administration Menu > Site Settings > API Keys like this:

Google Analytics Setting in mojoPortal

of course your code will be different than "UA-xxxxxxx-x", that just represents the format of your tracking code.

If you are using a custom skin, the only other requirement is to put this in the bottom of your layout.master file just before the closing form tag:

<portal:mojoGoogleAnalyticsScript ID="mojoGoogleAnalyticsScript1" runat="server" />
</form>

All the skins included in mojoPortal already have this so if you are using one of those you don't have to do anything other than the site setting above.

mojoPortal will automatically setup the script and it will do a lot more than the basic script.

One of the first advantages, is that it doesn't matter if you change skins or use different skins on different pages, the script will just work as long as the skin has the needed control. So for example in the past, unless you also put your google analytics script into the printerfriendly skin, it wasn't tracking page views when users clicked the printer friendly link, but now it does. THis also helped me with tracking traffic on demo.mojoportal.com, in the past I never bothered tracking that site because users could always change the skin and it was tedious to have to put my tracking code in all the skins. Now I just set it in user.config, you can set it there like this and it will trump the one in site settings : <add key="GoogleAnalyticsProfileId" value="UA-xxxxxxx-x" />.  The only reason I use it on the demo site is so that no-one can change it in site settings and affect my tracking. I mean people get to login to the demo site as admin after all.  Of course for multi site installations you want to always use the sitesettings.

In addition to the convenience of not having to maintain tracking codes in all your skins, mojoPortal will automatically label your visitors as Members if they are registered on your site, and if they make a purchase in WebStore or the Event Calendar Pro features they will be labelled as Customers. You will see this under the "User Defined" section of reports beneath Visitor reports. mojoPortal will also track ecommerce transactions in Google analytics from WebStore and from Event Calendar Pro features.

Site Search is also tracked, but to take advantage of it you need to configre your settings in google analytics like this:

google analytics search configuration, add a q as the query parameter for search

Note that you just enable it and set "q" as the Query Parameter. Now you will start to capture data in the Site Search Reports beneath the Content Reports.

You can also enable tracking of page load time by setting this in your Web.config or user.config: <add key="TrackPageLoadTimeInGoogleAnalytics" value="true" /> Unfortunately, as of the time of this writing, you won't see this yet in your google analytics reports unless you are in their beta program. But, by starting to capture data now, you will see it later when event reports come out of the beta process.

Another thing you can do is capture the google analytics data into your own IIS or apache web logs by setting this in Web.config or user.config: <add key="LogGoogleAnalyticsDataToLocalWebLog" value="true" />
To get any value out of this data you would need to get google Urchin and use it to analyze your web logs. Another reason to capture this data in your logs is because google analytics only keeps your data for 25 months.

If you have more than one host name that your site responds to like mojoportal.com and www.mojoportal.coom, recommend that you force a preferred host name, to keep your reportng consistent.

Since anyone can view the rendered source of a page and see your tracking code, its possible for someone else to put your code in their site and create bogus data in your reports. To avoid this, after forcing a preferred host name, I recommend that you set a filter on your google analytics profile. Click the Add Filter link:

screen shot showing the Add Filter link in google analytics

then configure it like this:

google analytics host name filter configuration screen shot

I'm really just learning about all the possibilities for taking full advantage of Google Analytics, I've learned what I have so far from the top book in this picture and hope to learn more ways to make it easy to get good tracking integrated into mojoPortal.

screen shot of a stack of books about google analytics and search engine optimization


 

Gravatar Joe Audette is the founder of the mojoPortal project and was the primary developer until February 2017.

mojoPortal 2.2.6.7 Released

mojoPortal 2.2.6.7 is now available on the download page.

This is primarily a bug fix release. There was a change in the search engine architecture in recent versions that did not work in Medium Trust hosting environments that has now been fixed.

It seems like a constant battle to avoid medium trust issues, so I started a small document here with some notes for developers about things to avoid that can cause problems under medium trust.

http://www.mojoportal.com/developing-for-medium-trust.aspx

Its not comprehensive so if anyone else has any suggestions for things to list on this page let me know. Sometimes its surprising when seemingly innocuous things don't work under medium trust. The problem we encountered was when we changed the search engine to use a queue for writing/updating the search index to ensure things happen in correct sequence. We were serializing our task object into a row in the database then our little task service would deserialize it and run it on a new thread in the background. As it turned out the SoapFormatter we were using to do the serialization throws a security exception under medium trust so you can't use it. I had to re-work the code to use the XmlSerializer.

Since a lot of people are hosted in medium trust I thought it important to get this fix out quickly.

This release also fixes a few other minor bugs as mentioned in the forums. I was surprised how many people are experimenting with our WebStore feature. Several bug fixes and improvements have been made in WebStore. Most of the bugs were only affecting the MS SQL version, whereas the store on this site is runningunder MySql

UPDATE: I've just uploaded a new set of files versioned 2-2-6-7-b because a significant bug was found today in the task framework. The changes I made to the way we serialize tasks to fix the medium trust issue introduced a bug that allowed multiple instances of the same task to run at the same time and this would use up additional threads from the threadpool, potentially causing hangs and performance problems. I also upgraded to FCKeditor 2.6.3.

Gravatar Joe Audette is the founder of the mojoPortal project and was the primary developer until February 2017.

mojoPortal 2.2.6.6 Released

I'm happy to announce the release of mojoPortal 2.2.6.6

This is a minor upgrade and bug fix release. There is a new option to show or hide any content instance based on whether the user is signed into the site or not. There is a new Traditional Chinese translation, thanks to Alex Ho!

There are a couple of bug fixes for the MS SQL version of WebStore and a few mnior improvements to a few admin pages in the WebStore.

There is a bug fix for a forums error that would occur if anonymous posting is enabled, though I still don't recommend allowing anonymous posting.

As usual, be sure and backup your site and database before upgrading, and post in the forums if you run into any troubles.

UPDATE: I've released a new set of files versioned 2-2-6-6-b, there was a packaging bug in the first set of files and it was missing some .htm files used by TinyMCE editor. I also fixed a few more bugs in the WebStore that were discovered today.

Gravatar Joe Audette is the founder of the mojoPortal project and was the primary developer until February 2017.

mojoPortal is Catching on at Universities!

Universites need a lot of web sites. They have many departments, divisions, research projects, events, etc., and they need web sites for all these things to disseminate information and to enable collaboration and communication between members of these various communities. With so many sites to manage, Webmasters at Universities need a good web infrastructure that allows them to easily deploy new sites and extend them as needed. Its only natural that Universites need content management systems and several Universites have selected mojoPortal for their content management needs.

Shaun Geisert, Webmaster, Division of Student Affairs, Colorado State University, recently let me know about a number of their sites already using mojoPortal as well as plans to use mojoPortal in another 20+ sites going forward.

Quoting Shaun: "Before discovering Mojo (I used CMS Matrix, btw), I had researched and/or used a number of other open source .NET CMSs in order to find one whose core framework best meets the needs of our numerous departments.  Since then, I’ve found it to be above and beyond anything else I’ve seen in the open source .NET realm."

When I look at all these sites I'm very impressed with the design work Shaun and his team did with all the different skins, they all look really great and it makes me proud to point them out as mojoPortal sites. They also produced a nice user guide document for their users that looks very professional and helpful and they've offered this document back to us as a contribution to the project. I probably need to de-brand it before sharing it so I'm not making it available right away, but will use it as a basis for producing a more generic user guide. To me, willingness to share is a clear sign that these guys "get" open source, and I'm really glad to have them in the mojoPortal community.

Another example of mojoPortal in use at Universities is the School of Health and Social Care at University of West England, Bristol.
http://hsc.uwe.ac.uk/school/
They supported our efforts last year to implement multiple sites on a single installation using folder names, so anyone using that feature today can thank them for their good participation in the community. Quoting Matt Cownie: "we've had a tremendous amount of utility from mojo and its saved us an awful lot of donkey work." Matt is a great guy, I really enjoyed working with him on the multi sites feature last year.

A third example is the site for the Glasgow Clinical Trials Unit.
http://www.glasgowctu.org/

Its really great to see mojoPortal catching on in Universities and other large organizations. We've got a lot of plans for continued improvements in mojoPortal and we hope to see more and more adoption.

Gravatar Joe Audette is the founder of the mojoPortal project and was the primary developer until February 2017.

mojoPortal 2.2.6.5 Released and the Semi-Grand Opening of the mojoPortal Store

I'm happy to announce the release of mojoPortal 2.2.6.5! Its been 2 months since our last release and a lot of good progress has been made.

What's New?

Upgrade to the newest version of MySql Connector
Upgrade to FCKeditor 2.6.2
Upgrade to the latest version of NeatHtml
Usability Improvements for google map enabled features and improvements to the search architecture as mentioned in this previous blog post.
A number of bug fixes as reported in the forums since the last release.
WebStore Improvements - the web store now supports selling download products using Authorize.NET, PaPal, and Google Checkout
A new plugin system for handling PageCreated events so developers can write their own handlers that execute after a page is created - not yet documented
A new plugin system for handling UserCreated events so developers can write their own handlers that execute after a nw user is created - not yet documented.

As always, be sure and backup your database and site before upgrading, and if you run into any problems post in the forums and we will try to help.

The Semi Grand Opening of the mojoPortal Store

I call it semi grand because no real products are available yet, all you can do in the store is buy me a beer at the moment. I expect to have my first product, Event Calendar Pro available by the end of July. You can see what I have so far for the Event Calendar Pro feature on the demo site http://demo.mojoportal.com/events. I decided to go ahead and open the store now because I thought it might interest others who want to use the mojoPortal WebStore to sell download products. The WebStore feature is very rudimentary now but it will be getting more love as I improve it to meet my own ecommerce needs. I will try to update some documentation on the WebStore soon. The one tip I will mention is you configure "Products" then you configure "Offers". Products are not sold directly, but by Offers. An Offer can have 1 or more products and price is set at the Offer level, not at the product level. The Product Catalog is very bare bones, we don't have categories yet so its really only good for a short list of products.

I've also opened up a store on CafePress to sell mojoPortal merchandise: http://www.cafepress.com/mojoportal.

t-shirtladies t-shirtcoffee mug

A great way to support mojoPortal, each item purchased contributes $5 to the project.

I'll announce the real Grand Opening of the mojoPortal Store as soon as our first product is available.

Gravatar Joe Audette is the founder of the mojoPortal project and was the primary developer until February 2017.