Title: Analytics conversion event tracking
Last modified: June 11, 2017

---

# Analytics conversion event tracking

 *  Resolved [Gal Baras](https://wordpress.org/support/users/galbaras/)
 * (@galbaras)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/analytics-conversion-event-tracking/)
 * I have 3 popups: one with a link to a product page, one with a MailPoet subscription
   form and one with a Contact Form 7 form. In Google Analytics, I only see conversions
   for the popup with the link, but I know for a fact that the other forms are converting
   too.
 * To me, any action taken on a popup that isn’t a “close” should be viewed as a
   conversion. This is because the contents of the popup can be safely assumed to
   contain a single desired action, which navigates to some other page.
 * So the best approach would be to trigger a conversion event whenever any link
   or any button is clicked in the popup, and even when the popup is “unloaded” 
   for any reason that isn’t a “close” (clicking the “close” handle or outside the
   popup).
 * Alternatively, is there a way to trigger a conversion event myself by attaching
   a JS listener to the button (and without cancelling any default action)?

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [Damian](https://wordpress.org/support/users/timersys/)
 * (@timersys)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/analytics-conversion-event-tracking/#post-9221242)
 * Hi Gal,
    that’s the way it works by default. Any action not considered a close
   it’s a conversion, Even if you paste a link to google and the user clicks on 
   it, that will be a conversion. So those forms should be working, if you want 
   send me a link where I check to see If I spot anything.
 * Reegarding js function you have SPU.hide( popup_id, show, conversion) , so on
   this case you need to call it like SPU.hide( 123, false, true)
 *  Thread Starter [Gal Baras](https://wordpress.org/support/users/galbaras/)
 * (@galbaras)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/analytics-conversion-event-tracking/#post-9222088)
 * First, I’ve gone further back and realised that the Contact Form 7 popup has 
   registered conversions. I haven’t had them since, so I’m going to assume this
   works.
 * 2 out of 3 🙂
 * When you scroll to the bottom of the content on [https://www.ronitbaras.com/family-matters/parenting-family/can-change-life/](https://www.ronitbaras.com/family-matters/parenting-family/can-change-life/),
   you should get a subscription popup, which users a MailPoet form.
 * In the past month, Analytics captured 4,521 impressions of this popup and 27 
   goal completions for Subscription Confirmation, but no popup conversion events.
   I can see 29 events (26 unique) with the event label “(not set)” and the event
   category “outbound-link”, which may or may not be related.
 * I use Monster Insights Pro on this site, with tracking of outbound links, if 
   this makes any difference, but you can see all of that on the page itself, I’m
   sure.
 *  Plugin Author [Damian](https://wordpress.org/support/users/timersys/)
 * (@timersys)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/analytics-conversion-event-tracking/#post-9224376)
 * Yes you will to attach a listener manually or add in the thanks page the code
   to track the conversion.
 *  Thread Starter [Gal Baras](https://wordpress.org/support/users/galbaras/)
 * (@galbaras)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/analytics-conversion-event-tracking/#post-9225774)
 * Hey Damian,
 * I was hoping for something a bit more specific, since you’ve had a chance to 
   look at my page. There may be something there that’s preventing your code from
   working, and I was hoping you could find it, because I’m not sure where your 
   code is.
 * Thanks again,
    Gal
 *  Plugin Author [Damian](https://wordpress.org/support/users/timersys/)
 * (@timersys)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/analytics-conversion-event-tracking/#post-9228741)
 * Hi Gal, Mailpoet don’t have a way for me to detect that the form is submited.
   If you want to track it automatically you need to use the optin integration of
   the premium version will use mailpoet api.
    If instead you want to place the 
   mailpoet form all you can do is place on the tahnk you page the code for tracking.
   So every time the user is redirected to that page it will track one conversion
   You can do that by placing this code that I commented earlier: `<script>SPU.hide(
   123, false, true)</script>`
 *  Thread Starter [Gal Baras](https://wordpress.org/support/users/galbaras/)
 * (@galbaras)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/analytics-conversion-event-tracking/#post-9229389)
 * So the SPU.hide code goes on the Thank You page?
 * What code does the plugin execute when link is clicked? I can attach it to the
   form myself.
 *  Plugin Author [Damian](https://wordpress.org/support/users/timersys/)
 * (@timersys)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/analytics-conversion-event-tracking/#post-9246299)
 * That same code is executed.
    SPU.hide( 123, false, true);
 *  Thread Starter [Gal Baras](https://wordpress.org/support/users/galbaras/)
 * (@galbaras)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/analytics-conversion-event-tracking/#post-9246538)
 * Thank you. I think I got it.
 * I was actually using e.preventDefault on this (oops), because I wanted to avoid
   the default MailPoet actions on submit, and triggering the “hide” function went
   missing, but now it’s back. Yay!
 *  Thread Starter [Gal Baras](https://wordpress.org/support/users/galbaras/)
 * (@galbaras)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/analytics-conversion-event-tracking/#post-9254313)
 * 2 days later…
 * Still not working, [@timersys](https://wordpress.org/support/users/timersys/).
   Analytics shows 5 visits to the thank you page and only impressions for the popup,
   no conversions.
 * Would you mind looking at my page again? Please?
 *  Plugin Author [Damian](https://wordpress.org/support/users/timersys/)
 * (@timersys)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/analytics-conversion-event-tracking/#post-9262625)
 * Hi Gal, I gave the code to close and not to track. Try the following:
 *     ```
       jQuery('form.widget_wysija').submit(function(e){
       e.preventDefault();
       setTimeout(function(){
       var msg=jQuery('.wysija-msg');
       if(msg.text()!==''){
       SPU.hide(14341, false, true);
       SPU.track(14341, true);
       window.location.replace('https://www.ronitbaras.com/thank-you-subscribe');
       }},3000);
       });
       ```
   
 *  Thread Starter [Gal Baras](https://wordpress.org/support/users/galbaras/)
 * (@galbaras)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/analytics-conversion-event-tracking/#post-9264950)
 * I should have know that, actually. I had this in my code for another popup. Thank
   you for catching it.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Analytics conversion event tracking’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/popups_efeef0.svg)
 * [Popups - WordPress Popup](https://wordpress.org/plugins/popups/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/popups/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/popups/)
 * [Active Topics](https://wordpress.org/support/plugin/popups/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/popups/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/popups/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 11 replies
 * 2 participants
 * Last reply from: [Gal Baras](https://wordpress.org/support/users/galbaras/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/analytics-conversion-event-tracking/#post-9264950)
 * Status: resolved