Customization

Woopra allows users to customize settings in order to provide flexibility for a wide variety of environments. Doing so is as simple as calling a function within the tracker object. The two settings which can be customized by end users are the idle timeout and the ability to combine subdomains.

Custom Timeout Setting

The default Woopra visitor timeout – or the time after which Woopra ignores inactive visitors on a website – is set at 4 minutes. This means that if a user opens your Web page and then leaves it open in another browser window, Woopra will report that the visitor has gone away after 4 minutes of inactivity on that page (no page scrolling, clicking or other action).

If you would like to increase or decrease the idle timeout setting you define object woo_settings in milliseconds. For example, to set the default timout to 10 minutes it would be (10 min x 60 sec x 1000):

tracker.option('idle_timeout', 600000);

Keep in mind that increasing this number will not only show you more visitors on your site at a time, but will also skew your average time on a page reporting. So it’s important to keep the number reasonable in order to accurately make predictions.

Custom Subdomain Aggregation

Some Woopra users wish to aggregate subdomain traffic within the domain statistics so that they can run combined reports across the entire website. In this case, you need to define an object to tell Woopra to combine the statistics. For example:

tracker.option('domain', 'myrootdomain.com');

If this was running on a subdomain such as shop.mydomain.com it would combine the statistics with the root domain mydomain.com. This method can only be used to combine a subdomain with it’s own root domain, and no other combination.

Cookie Options

Changing the tracking cookie name:

tracker.option('cookie_name', 'woopraTracker');

Changing the tracking cookie domain:

tracker.option('cookie_domain', 'myrootdomain.com');

Changing the tracking cookie path:

tracker.option('cookie_path', '/');

Changing the tracking cookie expiration:

var expires = new Date();
expires.setDate(expires.getDate() + 365);//expires in one year
tracker.option('cookie_expire', expires);

Enabling/Disabling the periodic pings:

tracker.option('ping', true);

Changing ping interval:

tracker.option('ping_interval', 12000); // milliseconds

Enable download tracking:

tracker.option('download_tracking', true);

Enable outgoing links tracking:

tracker.option('outgoing_tracking', true);

Change download pause:

Default pause in milliseconds ( to guarantee the tracking request is sent )

tracker.option('download_pause', 200);

Change outgoing link pause:

Default pause in milliseconds ( to guarantee the tracking request is sent )

tracker.option('outgoing_pause', 200);