Ratings and Reviews Plugins Demo

Skip to end of metadata
Go to start of metadata

 

See it in Action

Ratings & Reviews Demo

The Ratings Plugin:




The Reviews (Comments) Plugin:

 

Read More

Developer Guide
Rating Plugin API Reference

Comments Plugin API Reference

Check Out the Code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1255">
<script type="text/javascript" src="http://cdn.gigya.com/JS/gigya.js?apiKey=3_mK2cmEzLkzhqe4MUrtPncxbv4wKsYAhsew0iVwhVUls3c_Jx_HLX434jAVpq5M_W">
</script>
</head>
<body>
<div id="runningCodeExample" style="border: 1px solid skyblue; padding: 15px; width: 500px; display: block; height: auto;">
	<h2>Rating & Reviews Demo</h3>
	<h3>The Rating Plugin:</h3>
	<div id="ratingDiv" ></div>
	<br/><br/><br/>
	<h3>The Review (Comments) Plugin:</h3>
	<div id="commentsDiv"></div>
	<script type="text/javascript">
		// Present the Rating plugin
		var ratingsParams =
		{
			categoryID: 'Developers Public Ratings', // Comments category ID (from Comments Setup page)
			streamID: 'Developers.Gigya',
			containerID: 'ratingDiv', // <div> ID  in which to present the plugin
			linkedCommentsUI: 'commentsDiv' // link the Ratings plugin to the Comments plugin. 
										//The '# reviews' link becomes an anchor to the Comments plugin on the page. 
		}	
		gigya.comments.showRatingUI(ratingsParams);	
		
		// Present the Comments plugin	
		var commentsParams =
		{
			categoryID: 'Developers Public Ratings',  // Comments category ID (from Comments Setup page)
			streamID: 'Developers.Gigya',
			containerID: 'commentsDiv',
			version: 2
		}
		gigya.comments.showCommentsUI(commentsParams);
		
	</script>
</div>
</body>
</html>

 

Notes:

In order to make the above code work in your environment, please note:

  • The API key in the sample will only work on http://localhost/...
  • To load the page from your domain, modify the value of the "APIKey" field in the code to your own Gigya API Key. A Gigya API Key can be obtained from the Site Dashboard page on Gigya's website. Please make sure that the domain from which you are loading the page is the same domain name that you used for generating the API Key.
  • If you are using https, be sure to further adjust the js API url to: https://cdns.gigya.com/JS/gigya.js?apikey=<Your_API_Key>.


  • No labels