
I have set up the metatraffic to my website and I didn't have much problem. But after a few days, every time I go to there to try to see the report, it was always "the database is empty". But it is not possible, since the site is testing by me, my husband and other people, how could it to be empty?
I am using the version 1.2, type of database MSACCESS. I wish someone could help me out of here. Thanks.:(
Why the database is always empty?
Hello there,
Simple but basic question :
Did you add the little piece of code in the pages you wanted to track ?
The piece of code being the #include for the "track.asp" file or the code 'snippet' to be added if using the "track.js" one.
Hope that help.
Why the database is always empty?
Hi,
Could you please include an instruction file with the download? What code snippet? Where is it? I am having the same problem. I have looked and probably overlooked this snippet.
Thanks a million!
Why the database is always empty?
OK - this is taken straight from 'readme.htm' included in the download of metatraffic_v1200.zip:
ASP LOGGING METHOD -- ASP PAGES (.asp)
To track your .ASP files, add the following code to any .ASP page that you want to track:
<% Server.Execute("/metatraffic/track.asp") %>
You can also use a standard include in your asp pages like this:
It is preferable to use the Server.Execute method, specifically if you have ASP script in your pages as it will run independantly of those scripts preventing re-use of variables, etc. The obove logging method will only work in ASP pages as it executes the tracking ASP code directly.
JAVASCRIPT LOGGING METHOD -- TRACKING HTML FILES THAT SUPPORT SERVER SIDE INCLUDES (.shtm, .shtml, .stm, etc)
To track an html file that supports server side includes, add the following line of code to your html document:
Important Note: You can configure IIS to support server side includes for any file extension. However, by default, IIS only supports server side includes for files with the extensions .shtm, .shtml, .stm, and .asp. To learn more about server side includes and how to allow other extensions such as .htm and .html to support them, read this Microsoft TechNet article.
JAVASCRIPT LOGGING METHOD -- TRACKING HTML FILES THAT DO **NOT** SUPPORT SERVER SIDE INCLUDES (.htm, .html, .cfm, .aspx, etc)
If your html files do not support server side includes, you have two options. You can include the track.js javascript file in your pages by placing the following HTML code somewhere in your page:
You can also copy and paste the code from track.htm file into your web pages.
Important Note: If you installed metatraffic into a folder other than the default, you will also have to modify the scriptlocation variable in track.js or track.htm to point to the correct location of the track.asp file. Do not use more than one of the tracking options shown above in the same page. Doing this will cause multiple entries to be logged in the database and cause incorrect reporting behaviour.
REDIRECT LOGGING METHOD -- TRACKING OTHER FILES (.zip, .exe, etc.)
You can also track files that aren't web pages by linking to them in your web page with HTML. This is useful for tracking downloads, media files, etc. The link would look like this:
Download somefile.zip
This would track downloads of somefile.zip that existed in a virtual directory called downloads. Once track.asp logs the activity, the user is redirected to whatever file you specify. The querystring variable "r" expects some file location to be passed to it. This can be a virtual file path as shown above, an absolute path or a fully qualified URL such as http://www.somedomain.com/media/myfile.zip. MetaTraffic will not log the domain information (only the file path) so this cannot be used to track outbound traffic as it will not show the domain information in any report.
It is recommended that you use a virtual path when specifying paths as in all the examples above.
Mark Voss
[url="http://small-business-websites.co.uk/"]Small Business Websites[/url] [url="http://fastsnail.co.uk/"]FastSnail[/url] [url="http://sbwhosting.com/"]SBW Hosting[/url]
Why the database is always empty?
I found it! Thanks. Sorry for being so blind. I think I need to get my eyes checked.:?
Why the database is always empty?
Hi, I have added the javascript code into the page as following:
However, it still doesn't log any into the mdb database.
The path I have is c:\inetpub\wwwroot\abc\metatraffic1200
virtual directory for metatraffic is: metatriffic12
Can someone help? Thanks.
Jnf
Why the database is always empty?
quote:Originally posted by jnf
Hi, I have added the javascript code into the page as following:
However, it still doesn't log any into the mdb database.
The path I have is c:\inetpub\wwwroot\abc\metatraffic1200
virtual directory for metatraffic is: metatriffic12
Can someone help? Thanks.
Jnf
Don't forget to change the "scriptlocation" variable assignment in "track.js" to match your setup too.
It should be set in relation to the root of your site to simplify the things, therefore "/abc/metatraffic1200" shoud do the job.
Assigning a virtual directory to your MetaTraffic physical directory might be accomodating if you run it locally, but this is not something that will work when you will upload your site on the web as the chances that your web hosting service will create a virtual directory as you did, are practically inexistant.
So if you have to type "http://localhost/abc/metatraffic1200" in your browser's URL box to get to your MT installation directory, then "/abc/metatraffic1200" will be what you will need to specify in the "track.js" file.
Have fun.
Why the database is always empty?
Don't forget to change the "scriptlocation" variable assignment in "track.js" to match your setup too.
It should be set in relation to the root of your site to simplify the things, therefore "/abc/metatraffic1200" shoud do the job.
Assigning a virtual directory to your MetaTraffic physical directory might be accomodating if you run it locally, but this is not something that will work when you will upload your site on the web as the chances that your web hosting service will create a virtual directory as you did, are practically inexistant.
So if you have to type "http://localhost/abc/metatraffic1200" in your browser's URL box to get to your MT installation directory, then "/abc/metatraffic1200" will be what you will need to specify in the "track.js" file.
==============================
Hi, thanks for response.
I don't see any scriptlocation within config.asp, so I add one myself as follow:
scriptlocation = "track.js"
And I have received an error message:
Error Type:
Microsoft VBScript runtime (0x800A01F4)
Variable is undefined: 'scriptlocation'
/abc/metatraffic1200/config.asp, line 126
please help..
Thanks.
Jnf
Why the database is always empty?
hi, sorry for the careless.
I did fix that error message.
However, I still not be able to log the track into the database.
Please help.
jnf
Why the database is always empty?
AH!!!!
It works!!! HA!
Thank you thank you!!^++^
Why the database is always empty?
quote:Originally posted by jnf
AH!!!!
It works!!! HA!
Thank you thank you!!^++^
No problem,
Have fun...;)