Hi,
I'm using crawltrack to monitor web traffic. According to the crawltrack docs the script should be included in the root index.php file: http://www.crawltrack.net/doccms.php

Is this the proper drupal way? And if it is, what would be the best way to use any return value from the included script in the template files?
Or can I include the script directly in html.tpl.php or page.tpl.php?

Comments

pontus_nilsson’s picture

Including the php file the way they describe is bad since you are altering core files.

From a quick glance of what that script does, could you not use Google Analytics instead, which has good support for Drupal via http://drupal.org/project/google_analytics

bluegray’s picture

I thought so.

I'm using both, since crawltrack has a few nice features as well, and does not rely on javascript. Comparing stats from both are also quite useful.

What would be the best way to include an external php script then?

lelizondo’s picture

I've never used Crawltrack but I guess you could create a module and do something like:

<?php
function crawltrack_init() {
  include_once("absolute_path_to_the_crawltrack_php_file"); 
}

That could work but again, I never tried.

Luis

OneTwoTait’s picture

I added the code in a block, using the PHP filter, then put the block in the footer. It seems to be working.

OneTwoTait’s picture

Crawltrack tracks bots. Google Analytics doesn't.