Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter samfletch

    (@samfletch)

    Hi Lap ,

    Thanks for the quick reply!

    JS events looks like a good solution. Could you confirm that the following code taken from here would work with the Mailchimp top bar?

    `<script type=”text/javascript”>
    mc4wp.forms.on(‘subscribed’, function(form) {
    // GTM Data Layer push
    window.dataLayer = window.dataLayer || []; window.dataLayer.push({ ‘event’ : ‘Sign-up’, ‘name’ : form.name + ‘ ID: ‘ + form.id });
    });
    </script>`

    If so would this script be added into the header of the site?

    Many thanks

Viewing 1 replies (of 1 total)