• Resolved samfletch

    (@samfletch)


    Hello,

    I am using MC4WP Top Bar as a sign up to newsletter bar pinned to the bottom of the site.

    I have populated the message fields for the plugin such as a success message for successful sign ups “Thank you for subscribing! Check your email for your 10% off discount code.”

    I have also added in a successful sign up redirect URL so that sign ups can be tracked in Google Analytics. However adding in the redirect URL stops the successful sign up messages from appearing.

    The form still works however its now confusing for customers as it doesn’t let them know that their sign up was successful.

    The direct URL is a query string (https://ironandvelvet.co.uk/?subscribed) so it doesn’t take the user away from the page they are on and I can track the URL for successful sign ups within Google Analytics.

    • This topic was modified 3 years, 7 months ago by samfletch.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Lap

    (@lapzor)

    I recommend tracking by JS events instead.
    https://www.mc4wp.com/kb/javascript-form-events/

    Hope that helps. If you have any questions, please let me know!

    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

    Plugin Contributor Lap

    (@lapzor)

    errr, actually nope.
    I will see if we can add events for the topbar as well.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Mailchimp Top Bar Newsletter Sign up’ is closed to new replies.