主题的functions.php中间添加:

function themeConfig($form) {
$tongji = new Typecho_Widget_Helper_Form_Element_Textarea('tongji', NULL, NULL, _t('统计代码'), _t(''));
$form->addInput($tongji);
}

前台Footer文件调用:

<?php $this->options->tongji(); ?>