By bluegray on
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
Including the php file the
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
I thought so. I'm using both,
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?
I've never used Crawltrack
I've never used Crawltrack but I guess you could create a module and do something like:
That could work but again, I never tried.
Luis
I added the code in a block,
I added the code in a block, using the PHP filter, then put the block in the footer. It seems to be working.
Crawltrack tracks bots.
Crawltrack tracks bots. Google Analytics doesn't.