Login   Register  
Icontem

File: example.html

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Arturs Sosins  >  Feedback Easy  >  example.html  >  Download  
File: example.html
Role: Example script
Content type: text/plain
Description: Example file
Class: Feedback Easy
Collect user feedback using Google Analytics
Author: By
Last change:
Date: 2011-07-03 04:31
Size: 2,354 bytes
 

Contents

Class file image Download
<!--
/*************************************************************
 * This script is developed by Arturs Sosins aka ar2rsawseen, http://webcodingeasy.com
 * Feel free to distribute and modify code, but keep reference to its creator
 *
 * Feedback Easy can provide website visitors with option 
 * to rate website and/or leave small comment.
 * Ratings and comments are saved as google analytic events.
 *
 * For more information, examples and online documentation visit: 
 * http://webcodingeasy.com/JS-classes/Collect-feedback-using-Google-Analytic
**************************************************************/
-->
<html>
<head>
<style type='text/css'>
#feedback
{
	text-align: center;
	width: 250px;
}
#feedback > div
{
	margin-top: 5px;
	margin-bottom: 5px;
}
#feedback_rate,
#feedback_submit
{
	margin-left: auto;
	margin-right: auto;
}
</style>
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-9806969-27']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); 
	ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www')
	+ '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; 
	s.parentNode.insertBefore(ga, s);
  })();
</script>
</head>
<body>
<div id='feedback'></div>
<script type="text/javascript" src="./feedback_easy.packed.js" ></script>
<script type="text/javascript">
var f = new feedback_easy("feedback",{
	//maximal rating unit
	max: 5,
	//allow to leave comment
	comment: true,
	//allow to close form without feedback
	allow_close: true,
	//graphic for empty rating unit
	graphic_empty : "./star_empty.png",
	//graphic for full rating unit
	graphic_full : "./star_full.png",
	//encouraging text
	rate_text : "Rate this website:",
	//thank you text
	thanks_text: "Thank you for feedback",
	//text for submit button
	submit_text: "Submit",
	//text for close link
	close_text: "x",
	//callback function for submitted form
	callback : null,
	//callback function for closed form
	onclose : function(){
		document.getElementById("feedback").style.display = "none"
	},
	//do not allow to submit empty comment input
	force_comment: false
});
</script>
</body>
</html>