Subversion Repositories SmartDukaan

Rev

Rev 4740 | Rev 4798 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4740 Rev 4786
Line 20... Line 20...
20
function trackPageWithGA(page)	{
20
function trackPageWithGA(page)	{
21
	if(typeof _gaq != "undefined" && _gaq != null)	{
21
	if(typeof _gaq != "undefined" && _gaq != null)	{
22
		_gaq.push(['_trackPageview', page]);
22
		_gaq.push(['_trackPageview', page]);
23
	}
23
	}
24
}
24
}
25
	
25
 
26
$(function() {
26
$(function() {
27
	  $('.add-to-cart-icon').live('click', function() {
27
	  $('.add-to-cart-icon').live('click', function() {
28
	    var items = this.id;
28
	    var items = this.id;
29
	    var itemsarray = items.split('-');
29
	    var itemsarray = items.split('-');
30
	    addToCart(itemsarray[1], itemsarray[0]);
30
	    addToCart(itemsarray[1], itemsarray[0]);
31
	    trackEventWithGA('Home Page', 'Add to Cart Click', '');
31
	    trackEventWithGA('Home Page', 'Add to Cart Click', '');
32
	    return false;
32
	    return false;
33
	  });
33
	  });
34
	  
34
	  
-
 
35
	  $('.best-deals .title a, .best-deals .productImg a').click(function(){
-
 
36
		  trackEventWithGA('Home Page', 'Product Link Click', 'Best Deals');
-
 
37
	  });
-
 
38
	  $('.latest-arrivals .title a, .latest-arrivals .productImg a').click(function(){
-
 
39
		  trackEventWithGA('Home Page', 'Product Link Click', 'Latest Arrivals');
-
 
40
	  });
-
 
41
	  $('.best-sellers .title a, .best-sellers .productImg a').click(function(){
-
 
42
		  trackEventWithGA('Home Page', 'Product Link Click', 'Best Sellers');
-
 
43
	  });
-
 
44
	
35
	$("a.addtocart").live('click', function() {
45
	$("a.addtocart").live('click', function() {
36
		var catalogid = $(this).attr('catalogid');
46
		var catalogid = $(this).attr('catalogid');
37
 
47
 
38
		var radBtn = "";
48
		var radBtn = "";
39
		var param = "PARAMETERS_" + catalogid;
49
		var param = "PARAMETERS_" + catalogid;