Hi there,

I was wondering if you had considered integrating Urchin tracking as an additional feature for the GA module?

For those that do not know what Urchin is, it is basically a fully internally housed solution to web analytics (i.e. you house the data, the logs, and the Urchin instance, no data is sent to big brother Google). A lot of government departments in New Zealand are forced to use these internal solutions for privacy concerns.

The reason why I am raising this as a feature request for the GA module, is that I feel a lot of the code in this GA module would help for the Urchin features (event tracking, user segmentation, documentation etc). Urchin has similar methods to GA for tracking page views, no event tracking, but this can be fudged with page views.

Also, GA and Urchin can run in parallel, for an example of this, see http://www.ird.govt.nz/ - specifically here is the tracking code:

	try{
		var pageTracker = _gat._getTracker("UA-235836-1");
		pageTracker._setLocalRemoteServerMode();
		pageTracker._setLocalGifPath("/__utm.gif")
		
		// check for virtualURL in the content
		if(typeof(virtualURL) != 'undefined') {
			pageTracker._trackPageview(virtualURL);
		}
		// else no virtualURL, use the default
		else {
			pageTracker._trackPageview();
		}
	} catch(err) {}

What are your thoughts here? Do you think this is a good idea? Or should I create a brand new module specifically for Urchin?

Thanks
Sean

Comments

hass’s picture

Category: feature » support
Status: Active » Fixed

You are asking for something that is already possible with this module!

Your example is not for the new async api, so this is 2.x and not 3.x. But you can migrate and add the settings required for a local urchin server via the custom javascript BEFORE section. See http://code.google.com/intl/de/apis/analytics/docs/tracking/asyncMigrati... how this can be done with the async API.

Put this into your BEFORE section and you may be done.

_gaq.push(['_setLocalRemoteServerMode']);
wiifm’s picture

Title: Support of Urchin » Support for Urchin standalone
Status: Fixed » Active

Thanks for your quick reply @hass,

Oh and thanks for the heads up of the new 3.0 features on async tracking (btw congrats to the team here, this is a nice feature to have in the module).

I guess my question was not clear enough though.

Situation: I am looking to deploy drupal for our internal intranet for a NZ govt department. I do not want GA to have any data, but rather all data reside in Urchin. The tandem option is not preferable for me (but it is nice to know that this is an option for others)

It should be a simple process to include the latest urchin.js + __utm.gif files into the GA module, and customise the javascript a little.

Urchin have a quick start section on the JavaScript required: https://secure.urchin.com/helpwiki/en/UTM_Quick-Install_%28Apache%29

<script src="/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
        urchinTracker();
</script>

Thoughts?

hass’s picture

Status: Active » Postponed (maintainer needs more info)

Are you new to the Urchin tracking?

Above example is OUTDATED for I guess ~2 years. The tracker code have completely CHANGED. I have not said you should use any "tandem option" (aside - no idea what this means). Read the Google docs of asynchronous tracking and how to migrate your OUTDATED urchinTracker() code to the new async API code.

The docs link and custom javascript code is in #1.

If something is missing in the module or we need to change - we may be able to do so, but not without understanding and currently there is no need to change anything. I guess you only need to understand how the custom javascript tracking settings in the GA module need to be configured.

wiifm’s picture

Status: Postponed (maintainer needs more info) » Fixed

Thanks for your help @hass,

I have read through the new GA API's, turns out everything I am after can be accomplished by placing the following code in the 'before' section:

_gaq.push(['_setLocalGifPath', '/__utm.gif']);
_gaq.push(['_setLocalServerMode']);

The above will force GA to call only a local __utm.gif file (no callback to www.google.com), enabling the Urchin software to work.

Thanks for all your help

hass’s picture

Great, thx for verifying and testing this configuration. Only as a note - I guess you have a typo in there and it needs to be:

_gaq.push(['_setLocalGifPath', '/__utm.gif']);
_gaq.push(['_setLocalRemoteServerMode']);

Status: Fixed » Closed (fixed)
Issue tags: -Urchin

Automatically closed -- issue fixed for 2 weeks with no activity.