• Resolved Andrius

    (@italpasta)


    Hi,
    I’ve added the Google Conversion tracking script to the form, but no events appear in Google Analytics.

    Here’s the code I used:

    <script type="text/javascript">
    mc4wp.forms.on('subscribed', function(form) {
    	// Google Analytics by Yoast
    	__gaTracker && __gaTracker('send', 'event', 'Forms', 'Download Catalogue', form.name + ' ID: ' + form.id);
    });
    </script>

    This is happening on another site as well. Using the latest version of your plugin and WP 5.2.1 with latest version of MonsterInsights.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hey Andrius,

    I apologize for the delay in replying. Are you still facing this issue?

    Thread Starter Andrius

    (@italpasta)

    Yes, I am. Any ideas on how to resolve it?

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hi Andrius,

    The code you’re using looks correct to me (just tested it in isolation on your site), but your forms does seem to contain a few minor issues which could be causing this.

    – The HTML for your submit button is unclosed. Can you please change it from:

    
    <input type="submit" value="Get catalogue"
    

    To:

    
    <input type="submit" value="Get catalogue" />
    

    That should fix your issue. Good luck!

    Thread Starter Andrius

    (@italpasta)

    @dvankooten, many thanks for your response. I’ve corrected my silly mistake – thanks for pointing it out. However, the event still doesn’t seem to get triggered. Any other ideas as to why?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Google Conversion tracking script not firing’ is closed to new replies.