PDA

View Full Version : External Visitors script does not work properly


Attila85
10-21-2011, 12:27 PM
Hello,

I have on my website http://www.thesims3.it a php tracker for statical purposes, a classical web tracking of users, users online, referral etc.
Before I migrated to vbulletin it said i had more or less 4k visitors per day, now that I migrated, and that I put the counter script in the header, I don't know why it counts only 400 users more or less per day.. even if it is impossible (Sometimes I have more than 100 hundreds of user online).
The analytics counter say the same, and I have implemented it from vbseo.

Any tips?

Lynne
10-21-2011, 04:15 PM
If you got the script from vbseo, then that is where you should be asking this question. The script isn't from here, so this is the wrong place to ask about it.

Attila85
10-22-2011, 01:17 PM
The script for the statistics that I use does not come from vbseo, it's an external script that works fine, I'm just wondering why any statistic system I implement say that I have around 500 visitors instead of 4000... Maybe I should not put it on the header but somewhere else?

Lynne
10-22-2011, 04:21 PM
If it's saying 500 instead of 4000, then there is something wrong in the code.

Attila85
10-22-2011, 04:30 PM
Okei, let's try with Question->answer

Is the hader the correct position? Is it included in all the pages?

kh99
10-22-2011, 05:17 PM
I think what Lynne means is that we can't hope to be able tell you why it's not working if we can't see how it's supposed to work and exactly where you have it installed.

But yes, the header is included in most pages, so if it's just a matter of counting page accesses I don't see why that wouldn't work.

Attila85
10-23-2011, 04:37 PM
Tnx.
I tried to insert the following php code (that works on my previous website)
<?php
define('__PHP_STATS_PATH__','/web/htdocs/www.thesims3.it/home/');
include(__PHP_STATS_PATH__.'php-stats.redir.php');
?>
and I inserted it into the head_include bottom, but with no luck.
Users are not tracked.
Any idea?

Lynne
10-23-2011, 04:48 PM
What do you mean you inserted it in the head_include bottom? What is that? You cannot put that code into a template. PHP doesn't go into templates.

kh99
10-23-2011, 04:48 PM
Are you sure that path is still the right path for your new server (or software, or site)?

Edit: oh yeah, of course - what Lynne mentioned is most likely the problem.

Attila85
10-23-2011, 04:53 PM
Are you sure that path is still the right path for your new server (or software, or site)?
Yes, it still works on the old website

What do you mean you inserted it in the head_include bottom? What is that? You cannot put that code into a template. PHP doesn't go into templates.
I thought everything in the headinclude_bottom page would be processed in the head tags.
So where should I add the above mentioned code in order to be displayed in the head tags of every page?

Lynne
10-23-2011, 05:07 PM
What is a headinclude_bottom page? Do you mean template? You cannot put php into templates.

kh99
10-23-2011, 05:18 PM
You need to put that code in a plugin because as Lynne said you can't put php in a template. Here's the manual page for creating a plugin: https://www.vbulletin.com/docs/html/main/add_plugin

If that script doesn't produce any output, then just putting those two lines in a plugin using hook global_start will probably be enough. If that php file produces output, then you will need to buffer the output and capture it in a string variable, then register that variable to a template, then add a tag to the template. Here's the manual page that describes including an external file that produces output: https://www.vbulletin.com/docs/html/main/templates_externalfiles

If that doesn't have all the info you need to figure it out, let us know.

Attila85
10-23-2011, 05:24 PM
Perfectly clear, thanks a lot