Forum Moderators: coopster

Message Too Old, No Replies

Form submission is working for just sometime.

Google analytics track from submission but data is not collected in databas

         

ninenote

1:56 am on Feb 19, 2010 (gmt 0)

10+ Year Member



Hi, I'm come from blind point, please help.

I basically setup Google analytics to track goal when people submit the form that go to thank you page.

However, the number of goal conversion is greater than the emails (and database records) I received in each day. This mean, not all the form submission is collected in database.

The goal path in GG analytics quite clear that people navigate through landing page and submit form to go to thank-you page (no one directly entrance at thank you page).

From my Window/PC end, I have test sql injection, special character, disable cookies, disable javascript, IE6/7/8, ff, safari. I get email and database is record everytime. Also, analytics is tracked my test.

I don't know where to go from here, the missing form are too valued to the company who I'm working for.

If somebody could give me a direction, it would really save my life. I really don't know what the other issue I should make a test.

I'm using php/mysql, After hit submit at form page, the action will take user to the thank-you page. 'thank-you' page will collect all information to database and also email to information to executive team.

The website have 5K-6K visitors a day with approximately 18K page views.

Could this should be a server issues? or are there any solutions to make a proper submission form? As mentioned, form worked every time I tested with different condition. Analytics tracked, all data collected and emails are sent.

I'm not sure where the missing submission from visitor go.

Please, please help!

jatar_k

1:54 pm on Feb 19, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



well you need to be sure analytics is right, I have a sneaking suspicion it might not be

but you need to add more checks
maybe try checking your logs yourself and see if you can find the submissions and match em up, you can use the db or email timestamp to check the logs and then compare with any other page views you see.

those would be my first thoughts

ninenote

10:45 pm on Feb 19, 2010 (gmt 0)

10+ Year Member



Hi jatar_k

Thank you so much for your response.
I'm initially concern about GG analytics issue and report all factors to the executive. However, Google is the best IT leader in my view, and I'm the one who introduce GA goal tracker to the company. So I'm not quite keen to push mistake to Google.

However, what I did is, install another paid web analytics. Then, use the real time tracking campaign (thank-you?camp=abc). This helps company track every goal in real time without delay. Until now, nothing going wrong yet. However, nothing yet missing from GA as well. It may spends a week to ensure that everything is accurate.

I do have TStamps log in database and can check the email sending time. It seem that the missing value always happens during the day time. So may be it's some testing issue that we unable to track. However, new stat excluded people in the office, so we can have a better view from now on.

Also in the past, I did set $_SESSION to mark up when the database and email was already submit. This to avoid visitor hits refresh and create a duplicate form. It should be fine for people who don't enable cookies as if php can't find the exact value, the form will submit anyway. However, to avoid missing the valued submission. I already disable this.

Thanks again for taking time reading and trying to help. I'm the only IT person in the company who take responsibility on every technology issues. Sometime I feel really lonely without another IT to discuss. I really appreciate your help.

Thanks :)

Demaestro

11:30 pm on Feb 19, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You can also look through your raw server logs to see if there are POST(s) to the page you are tracking.

There should be a lot more info in there if you follow a user through the pages that you suspect aren't working.

Usually the logs are 1 directory up from your public_html folder in a dir called 'logs' and there should be 2 log files access_log and error_log

Go through the access_log and do a find for the page name that submits the form and the page that it submits to.

If you see that someone did post to the page in question but nothing was captured then you can check the error log for an error around the same time. It may help you find what is happening.

ninenote

1:57 pm on Feb 21, 2010 (gmt 0)

10+ Year Member



Thank you Demaestro. I did found the php logs file outside public_html. However, the logs is stop reporting since December last year. I'm not sure if that is no error or error is not logged as we move to new private server in the early of January. I'm going to contact hosting company on Monday to find out the truth.

On Saturday, according to analytics, one order was not sent via email but fornately, database is captured. I test form again by using the missing data (that luckily captured in database). Both email and database work ... (arhh..h..). I really don't know what to do.

One concern is,
Is anybody know if it possible that sometime email fucntion or db connection is overloaded by massive query. Then, some tasks in queue is missing.
When I query database or use mail functions, I have not return memory to CPU as I think it will be automatically clean up after php finish execute.

Are there any PHP function to return memory to CPU after db connection and email function.

Lastly, I'm not sure, but should I try using this?

while(!sent_email()) {//keep looping}
while(!mysql_query()) {//keep looping}

Will this turn thing to worst?

ninenote

2:27 pm on Feb 21, 2010 (gmt 0)

10+ Year Member



Sorry, I just realize that the above code probably burn the server if it is not about the queue but something else.

How about this

$count = 0;
while((!sent_email()) && ($count < 4))
{ sleep(2); $count++;}

$count = 0;
while((!mysql_query()) && ($count < 4))
{ sleep(2); $count++;}

Just try to prevent if queue is missing at some specific time. However, I never see people do code like this, I'm not sure if there are any negative effect by doing this?