diff --git a/app/code/community/THB/ABTest/Model/Observer.php b/app/code/community/THB/ABTest/Model/Observer.php
index 2e6bcdd..2b03335 100644
--- a/app/code/community/THB/ABTest/Model/Observer.php
+++ b/app/code/community/THB/ABTest/Model/Observer.php
@@ -155,6 +155,27 @@ public function conversion_wishlist_add_product($observer)
}
}
+ /**
+ * Registers a conversion when a visitor subscribes to the newsletter
+ *
+ */
+ public function conversion_newsletter_subscribe($observer)
+ {
+ # This runs every time a visitor subscribes, regardless of whether or not
+ # an AB test is running.
+ if ( ! Mage::helper('abtest')->isRunning())
+ return;
+
+ if ($variations = Mage::helper('abtest/visitor')->getVariationsFromObserver($observer->getEvent()->getName(), 'observer_conversion'))
+ {
+ foreach ($variations as $variation)
+ {
+ # Get our table name for variations and update the row information
+ $this->_register_conversion($variation, 0); // send 0 price value for conversion
+ }
+ }
+ }
+
/**
* Registers a conversion when a product is sent to a friend
*
diff --git a/app/code/community/THB/ABTest/etc/config.xml b/app/code/community/THB/ABTest/etc/config.xml
index 94525af..e538a16 100755
--- a/app/code/community/THB/ABTest/etc/config.xml
+++ b/app/code/community/THB/ABTest/etc/config.xml
@@ -211,6 +211,16 @@
+
+
+
+ singleton
+ abtest/observer
+ conversion_newsletter_subscribe
+
+
+
+
diff --git a/app/design/adminhtml/default/default/template/abtest/form/settings.phtml b/app/design/adminhtml/default/default/template/abtest/form/settings.phtml
index 10707e2..d61d150 100644
--- a/app/design/adminhtml/default/default/template/abtest/form/settings.phtml
+++ b/app/design/adminhtml/default/default/template/abtest/form/settings.phtml
@@ -115,6 +115,7 @@