New Zenner
- Join Date:
- Sep 2013
- Posts:
- 25
- Plugin Contributions:
- 0
Tracking products added to basket in google analytics / event tracking
Hi,
I´d like to track products that have been added to basket.
As decribed here http://www.blog.analyticsinspector.com/how-to-track-products-added-to-basket-in-google-analytics/ I have to add event tracking code to my "add to cart" - button.
In html_output.php I added the code ```php
// form input button
$css_button = '<input class="' . $mouse_out_class . '" ' . $css_button_js . ' type="submit" value="' .$text . '"' . $parameters . $style . ' onclick="_gaq.push(['_trackEvent', 'addtobasket', 'Product name', 'Tracker Button']);" />';
}
So my html-output is
```html
<!--bof Add to Cart Box -->
<div id="cartAdd">
Anzahl: <input type="text" name="cart_quantity" value="1" maxlength="6" size="4" /><br /><br />
<input type="hidden" name="products_id" value="944" />
<input class="cssButton button_in_cart" onmouseover="this.className='cssButtonHover button_in_cart button_in_cartHover'" onmouseout="this.className='cssButton button_in_cart'" type="submit" value="In den Warenkorb " style="width: 110px;" onclick="_gaq.push(['_trackEvent', 'addtobasket', 'Product name', 'Tracker Button']);" />
</div>
<!--eof Add to Cart Box-->
But in analytics my conversion-goal is alway 0.
My goal:
category (Equals to) =addtobasket
Action (Equals to) =Product Name
Label (Equals to) = Tracker Button
Any idea what might have gone wrong?
Best ragards
Dave