Send 'compare product' action to Google Analytics I am having a products page in my site. In that I have a comparison functionality. 

Now I want to send data to google analytics so that Admin can later on check which products were compared. I have captured the products I.E. on which products checkbox the user clicked and store that array of products in a jquery variable. 

Now I want to send this variable in ga function but I am not able to do soo. Can anybody help me out with it or some other solution?
You can use GA Push module


  GA Push offers an API to enqueue informations that are sent GA
  servers, and three submodules to track browser events (using jQuery),
  form validation errors and log exceptions.


So, you can use the API to send an event to Google Analytics when user adds a producto to the comparison. 

For example, you can use the page view function and send virtual page views for each compared product:

$push = array(
  'location' =&gt; '/comparision/product/' . $nid,
  'page' =&gt; 'comparison',
  'title' =&gt; 'Product ' . $product_name . ' comparison',
);

ga_push_add_pageview($push);


This code should called when you detect that a product is being compared.

Disclaimer: I'm one of the developers of this module.