I've gotten a few messages asking about how I gather data for surveys. I posted a sample of data on this thread:
http://stmforum.com/forum/showthread...-Success-Diary
I looked at some old code that I had and coded a simple script for you guys to track your survey data.
This script uses PHP to process the survey and .CSV files to store the data. (See attachment below)
Example #1: survey1.html
survey1.html is your basic bare bones template

Example #2: survey2.html
survey2.html uses jQuery transitions and CSS to style the survey.



survey#.html Note #1
Each group of answers requires 'Q-' prepended in the 'name' tag and requires the same question
Example:
<h3>What is your gender?</h3>
<input type="radio" name="Q-What is your Gender?" value="male">Male<br />
<input type="radio" name="Q-What is your Gender?" value="female">Female
<h3>What is your Age?</h3>
<input type="radio" name="Q-What is your Age?" value="18-21">18-21<br />
<input type="radio" name="Q-What is your Age?" value="22-25">22-25<br />
<input type="radio" name="Q-What is your Age?" value="26-30">26-30<br />
<input type="radio" name="Q-What is your Age?" value="31-35">31-35<br />
<input type="radio" name="Q-What is your Age?" value="36-40">36-40<br />
<input type="radio" name="Q-What is your Age?" value="41-45">41-45<br />
<input type="radio" name="Q-What is your Age?" value="46-50">46-50<br />
<input type="radio" name="Q-What is your Age?" value="51-55">51-55<br />
<input type="radio" name="Q-What is your Age?" value="56-60">56-60<br />
<input type="radio" name="Q-What is your Age?" value="60+">60+<br />
<input type="hidden" name="redirect_url" value="http://www.amazon.com/PaleoTrim-Natural-Raspberry-Ketones-African/dp/B009K6ECTU">
$survey_filename = "survey_data_file.csv";
How to use Google Spreadsheets to Analyze Survey Data
This tutorial was done using sample data that I created using the survey script.
Step 1. Open Google Drive and click on "CREATE" then "Spreadsheet"

Step 2. Click on "File" then "Import"

Step 3. Click on Choose File and select your .CSV file. Click Import and then "Open Now >>"

Step 4. In order to create a Pivot Table, click on "Data" then "Pivot Table report ..."

Step 5. Click on "Rows - Add Field" and select "What is your Age?"

Step 6. Click on "Columns - Add Field" and select "How much Weight would you like to lose?"

Step 7. Click on "Values - Add Field" and select "How much Weight would you like to lose?"

Step 8. Under Values, Click on Summary By Sum and select "COUNTA"

Step 9. This is what your data should look like after resizing the columns

*Sample CSV data file included for educational purposes
Thanks a ton for this Jasper, you just opened up a dozen doors that I've been to technically challenged to open.
Thanks a lot! I have new idea now and I am gonna use it.
Boom! Thanks man this is awesome.
awesome tutorial ,jasperp ! been looking for this for quite a while ! thanks a bunch
btw is there a way to show a div with a running bar and then redirect to another div (q6) ? cheers
EDIT: just figured it out. you should add this-
setTimeout("$('#q5').hide()",3000);
setTimeout("$('#q6').fadeIn()",3000);
And this if you want it to be automatically redirected to the offer page -
<script type="text/javascript">
setTimeout("window.location='url'",3000);
</script>
btw does anyone have a process javascript spinner ? tried spin.js by Felix Gnass, cant seem to work it out
thanks !
Update: finally got it to work
here's a very detailed description: http://www.jqueryscript.net/loading/...g-Spinner.html
Would this work for lead/email submits? Or only answering questions?
@bravenewworld - How are you envisaging it working with email submits?
Like I would have an email submit on my landing page. Would a database be best for that or really only for surveys like in the example?
In that case you'd probably be best just capturing the email to a mailing list server, I think.
Hey guys,
I've followed the survey steps, modified it a bit and it definitely works (when I go through the flow).
However, on my tracker it doesn't show any clicks to the "offer" or the "landing page" of the survey (tested both).
Here's the super strange part. The clicks to the offer (after the survey) are showing up in the ad network. BUT the survey
responses are not showing up when I download the csv.
I've created another banner that directs straight to the survey without going through the tracker and am waiting for
results on this to see if it changes anything.
Any idea what it could be?
Thanks for the help.
Cheers
P.S. The tracker goes through the 'LP' flow using cookie tracking (desktop campaign) and it goes to the offer
after survey completion, so I'm kind of stumped.
When you click through it yourself, are your clicks going into the csv?
Also, have you checked your webserver's error log? Sounds like there's probably a PHP error happening somewhere.
Hey Caurmen,
Yeah the clicks are going to the csv, which is why i'm confused.
I haven't checked the error log yet, ill check it soon.
Thanks for the help!
Hey Caurmen,
The only error I get in the error log is the following:
[09-May-2014 06:15:59 America/New_York] PHP Warning: Module 'Phar' already loaded in Unknown on line 0
It only showed up 5 times however up until 07:24:09. The traffic has been running until about an hour ago (13:00 New York Time).
Any ideas?
Thanks
To clarify, my survey results ARE showing up in the CSV, but the visitor's are not.
How is the cookie tracking set up? Could it be an error here, i.e. no cookie = broken survey. You are cookied = survey works fine?
Hey,
OK. So I did the test direct to the survey without going through the tracker and
the survey results are in!
Fuck ya! Though for some reason it's no longer 10% of the visitors going to the
offer. Super strange...
Thanks for the help guys
Cheers
That error's unlikely to be causing the problem.
Frankly, I'm a bit stumped on this one. Could they simply not be filling out the survey data? Try adding a pre-filled field to the form and see if that gets recorded in the CSV.
Hey Caurmen,
So am I, it makes no sense!
I've tested it without a tracker (direct linked to survey) and have gotten 30 fill outs so far, so they
are definitely doing the survey.
The strange part is that when using the tracker instead of direct linked I got around 10% click-throughs
to the offer (only way to arrive there is filling out the survey), direct linked it's closer to 1%.
The thing that really boggles my mind is the tracker wasn't showing clicks to the survey when I set
it up as a landing page OR as an 'offer'.
Cheers
EDIT: I'm using Imobitrax as my tracker of choice.
Hmm.
If you want to spend a bit of money you could probably bug fix this.
Get some people on Fiverr or Mechanical Turk to go through the survey with you on Skype at the same time. Watch what they see and what they do. Look at the CSV live.
That should give you some more ideas of the problem.