Forum Moderators: DixonJones

Message Too Old, No Replies

web analytics

web analytics

         

deadstar32

5:44 am on Mar 12, 2009 (gmt 0)

10+ Year Member



I need to determine some important web analytics...

I have a form which interested users submit (a free estimate request). After they submit the form, we manage this information in a custom, but simple database I made.

Now, we get a number of 'bad' leads--and I'm trying to figure out where these leads are coming from. My current internal database has a provision where people can note whether a lead is bad (out of area, since this is a local business)

What Web Analytics Data I need:
I need to get all this information into the mysql database:
1-uniquely identify each website visitor
2-track the referring source (and any other useful information)
3-if the visitor submits the contact form, i need to figure out what the source of the lead was.

Now, the challenge here, is just that I need to get this information into an existing mysql database. I figure I can probably get what I need with some PHP commands.

But--I wonder if there's a more intelligent way to do this.

Is there existing tracking software, or web analytics software that makes a standard cookie, or a flash cookie that I can extract data from when needed? (when the form is submitted). (Sidenote: I hear flash cookies are superior to normal cookies because they can hold 100k of data).

I already use things like google analytics and some yahoo conversion software. The problem is, I don't know whether a "conversion" was low quality or bad, until an employee marks this in the database.

Is there a good tracking program that stores a reliable referrer source (e.g. a google ad click/ or a yahoo search query/ direct hit/ whatever), which I can then insert into my database for comparison purposes?

I was looking at my database, and I'm disspointed that I didn't include user IP/ browser/ and a lot of other information that could have been quite helpful in identifying sales trends/ customer demographics, etc.

Summary: Web Analytics (what I need)
Ok, here's my attempt to summarize this:
is there an existing tracking script or software, that can help me uniquely identify my conversions, and their referring sources, which I can also use php to insert into my existing mysql database for comparison purposes.

deadstar32

5:50 am on Mar 12, 2009 (gmt 0)

10+ Year Member



Something else--do you guys think these java script trackers that yahoo/ google use are really that great? I thought a lot of users disabled javascript-- and I know some users disable cookies too. I was hoping there was a sophisticated, but accurate tracking software or script out there which could effectively deal with these types of issues with some degree of accuracy.

Maybe there's existing scripts that could do all these things I need which I could easily tweak. I set up wordpress as the customer CMS on this particular site where I need to set up tracking (I'm very happy with wordpress--its a good CMS in my opinion, mostly because of plugin availability, the ease of customization, and decent built in seo).

As a sidenote, the site already has wordpress analytic type stuff built in (in addition to yahoo & google analytics, and conversion tracking). The real problem is I can't correlate what came from where with the end conversions, so I don't know where poor quality leads are coming from.

deadstar32

5:52 am on Mar 12, 2009 (gmt 0)

10+ Year Member



perhaps I should have named this customizing web analytics--too late now I guess :(

mack

6:02 am on Mar 12, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Not realy my field but heres an idea...

Have a value in your database that incriments. When the user lands on the page read the value, give that value to the user. Add one to the value in the DB so it is set for the next user. at the same time that ou read the value also insert into another table the refering url of the user.

When I say give the value to the user wht I mean is have the value passed from page to page. Lets say for example we call this value uid (user id)

You would use some scripting language php for example to get the value, then just send it along with every page. So if the user clicks on the form he is sent to form.php?uid=12345 then when the foorm is submited you not only have the led you also have the referal information.

Its not exactly elegnt, but you could have it work with other values as well.

Mack.

cgrantski

12:54 pm on Mar 12, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You want a free solution, right? If so, I can't think of anything. If somebody knows of a free program that will do this, I hope they post it. Most of the free ones I know are ultra simple, basically the same thing over and over again done by different people. GA is the only exception and maybe GA can do this - that would be a pleasant surprise.

For free, your best bet might be to built a sessionizing engine script that extracts exactly what you want, for every visit where the form is submitted. The raw material for the script would be log files or javascript tagging log files. If you want to go further than that, and if you have a persistent cookie in place, you can extend it so that a referral for one visit and a submittal on a second visit get joined.

Or, how about changing your form to do some auto-checking on the entries and flag the form submittals as out-of-area right at that point?

deadstar32

2:46 am on Mar 13, 2009 (gmt 0)

10+ Year Member



The key here, is knowing the referring URL of each customer in our existing database.

I'll need a good cookie program probably--this may be what I look into. A good cookie that stores any useful customer data.

Then, if the user submits the online form, then I can insert all the data from the cookie in the database.

This way, the database will only need 1 single query, with a submitted form--I've already set the form so bots could never submit it, which means, my database wont have useless information such as referring URLs or other types of things related to bots.

I suppose I'll have to look into cookies--unless someone can think of a better way to do it. I think javascript tracking + a cookie might be more effective--if I could do it with pure PHP, I think that would actually be several times more effective (for all those users that have cookies and PHP turned off).

I'm still looking for a good solution.

I'll consider a non free solution--although most of the best solutions are becoming open source these days.

I think the more information the better--right now we are pretty restrictive about our advertising, where we only allow google to serve ads in specific cities. Now, if I found lots of valid project leads (which later sold) were from IPs that appeared in the 'wrong' places, then we would konw the IP restrictions we use now are a mistake... (we still get a lot of free hits from google searches, etc)

If someone does know a solution on a good cookie tracker/ or something that can do what I've been asking about here, which is: store user data, like referring URL, browser, ip, whatever, then allow me to put the data in our own custom database when the user submits the form, this would be greatly appreciated!

deadstar32

2:59 am on Mar 13, 2009 (gmt 0)

10+ Year Member



oops (I made one typo):
(for all those users that have cookies and PHP turned off) <---I meant for all those users that have cookies and javascript turned off (opps)

Now about this suggestion from Mack:

You would use some scripting language php for example to get the value, then just send it along with every page. So if the user clicks on the form he is sent to form.php?uid=12345 then when the foorm is submited you not only have the led you also have the referal information.

I would need to set something compatible with the wordpress environment; the site is on a wordpress install (but only as a CMS, the wordpress installation is hidden). Mostly this is a simple thing--I'll just install the script on the template "header.php" page most likely (or a header tag that will point to the script).

I may check and see if there's any decent cookie, javascript or other user tracking plugins that are already written for wordpress. The wordpress plugin database is pretty huge, I've found things I never expected to find, maybe this is possible too).

Cgrantski: you are right, I do prefer something free. Mostly because no matter what I get, I'll probably have to do substantial customization. Why pay for something I'm going to have to substantially customize or modify....

Anyway, I'll try to come back to this forum and post which solution I use once I find it, or write it. I've gotten help here before with things like htaccess, so if I get some useful knowledge on this matter, I'll be sure to share.

I did hear flash cookies are the best, if someone can recommend a flash cookie (or normal cookie if that's better)--please let me know!

deadstar32

3:12 am on Mar 13, 2009 (gmt 0)

10+ Year Member



This is interesting (very similar to Mack's suggestion):
[newestindustry.org...]
header ("Content-type: image/png");
include("dbconnect_logger.php");
$logtime = date("YmdHis");
$ipquery = sprintf("%u",ip2long($_SERVER['REMOTE_ADDR']));
$query2 = "INSERT into logger.blog_log values \
($logtime,$ipquery,'$HTTP_USER_AGENT','$HTTP_REFERER')";
mysql_query($query2) or die("Log Insert Failed");
mysql_close($link);
$im = @ImageCreate (1, 1)
or die ("Cannot Initialize new GD image stream");
$background_color = ImageColorAllocate ($im, 224, 234, 234);
$text_color = ImageColorAllocate ($im, 233, 14, 91);
// imageline ($im,$x1,$y1,$x2,$y2,$text_color);
imageline ($im,0,0,1,2,$text_color);
imageline ($im,1,0,0,2,$text_color);
ImagePng ($im);
?>

Although I don't completely like the idea of the overhead this creates (a lot of mysql entries). I do like how a php solution is very robust-- this is my biggest gripe with javascript and cookies. The more users that disable cookies or javascript (with that type of solution) the more my data will be corrupt.

Correct me if I'm wrong,but this code would need to be modified because he's only creating a unique user identifier based on the ip address. I don't see a way to identify the referring url or other parameters (let's say several pages later, I don't see how I could extract the original referring URL and insert it the mysql database).

BradleyT

6:51 pm on Mar 13, 2009 (gmt 0)

10+ Year Member



Use a combo of both. Set the cookie to expire in 24 hours. If the cookie is not already present you write it using the referring site - that way you only track entrances to your site.

And the IP logging in the database is a backup for when cookies are not set. Since the IP is being logged and you have a timestamp you should be able to recreate any single visitors "footsteps" on the site.

[edited by: BradleyT at 6:52 pm (utc) on Mar. 13, 2009]