• Resolved wordpressuser

    (@tompo0323)


    Hello,

    I would like to trigger a tag when a pop-up form is submitted.

    Here are the steps until far:

    1) Create subscriber pop-up form on Mailchimp
    2) View code > Copy code in Mailchimp
    3) Created a new form with your plugin > pasted the script in the form.

    I then pasted the event script from your website under the first script:

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

    4) Created a GTM tag which is trigged by the custom event name ‘Sign-up’
    5) Pasted the shortcode in a box with Boxzilla
    6) Pasted the same shortcode in a post via the text editor
    7) Submitted the form on the post page. Nothing happens, no event is sent.

    I have tried pasting the tracking code from your website in Mailchimp’s form, in the post html via the text editor under the form shortcode, and also under the shortcode in the box. Nothing worked.

    Any idea why I don’t see an event sent in the Google Tag Manager preview pane?

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

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

    (@hchouhan)

    Hello,

    Thanks for reaching out to us.

    You can add the code to our form at “MailChimp for WP > Forms” menu in your WordPress admin.

    Thread Starter wordpressuser

    (@tompo0323)

    I’m sorry but this is really not working.

    Could you tell me if my tag manager setup is correct?

    Tag: Track Type = Event
    Category: Sign-up
    Triggering: Custom Event (Event Name = Sign-up)

    When I submit the pop-up form, the tag is not triggered. It seems the form submission doesn’t send any event.

    Any idea on why it doesn’t send the ‘Sign-up’ event?

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hello,

    I’m afraid that this issue mostly comes down to your GTM implementation. The code to fire off the event looks correct, but I can’t check your exact GTM settings. Could you post screenshots of it here?

    Thread Starter wordpressuser

    (@tompo0323)

    Hello,

    I will post here screenshots of the tag and trigger configurations.

    Tag configuration

    Trigger configuration

    Plugin Contributor Lap

    (@lapzor)

    The code and settings seems good to me / should work like that.

    I went to check the page / link you shared but the page seems to be deleted. The form in the footer seems not to be made by our plugin.

    Do you still need help with this? Can you share a link to where we can see the form with the tracking code?

    Thanks

    Thread Starter wordpressuser

    (@tompo0323)

    You can see the form on this page.

    This is the form:

    <script type="text/javascript" src="//downloads.mailchimp.com/js/signup-forms/popup/unique-methods/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">window.dojoRequire(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us17.list-manage.com","uuid":"cac3833bc8f29c953b629f047","lid":"769558f68a","uniqueMethods":true}) })</script>
    <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>

    And this is the shortcode I use on the page I have linked to above: [mc4wp_form id="14954"]

    Note that I am not using Boxzilla anymore, since it appears pop-up forms also work without.

    Plugin Contributor Lap

    (@lapzor)

    The form I see in the popup on the right bottom is not created with our plugin. It seems to be a MailChimp embedded form.

    Or am I looking at the wrong form / is there another form on this page that I overlooked?

    ?Thanks for letting us know.

    Thread Starter wordpressuser

    (@tompo0323)

    No, this isn’t the good form. You can see it on this page: this is not the form at the bottom; it’s a pop-up form. It doesn’t seem to work on Firefox because Mailchimp tracks emails and Firefox blocks trackers. So I suggest you visit this page on Google Chrome.

    Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hi,

    The pop-up form is created using MailChimp.com’s code. Have you changed it?

    Thread Starter wordpressuser

    (@tompo0323)

    No, I haven’t changed it.

    Here it is:

    <script type="text/javascript" src="//downloads.mailchimp.com/js/signup-forms/popup/unique-methods/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">window.dojoRequire(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us17.list-manage.com","uuid":"cac3833bc8f29c953b629f047","lid":"769558f68a","uniqueMethods":true}) })</script>
    <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>
    Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hello,

    I am not able to see a form created using our plugin on this page https://www.belram.be/2018/10/11/cpr-cables/.

    Thread Starter wordpressuser

    (@tompo0323)

    Have you tried to view the page in Chrome and wait 5 seconds? Mailchimp popup forms don’t work on Firefox because it’s blocking Mailchimp’s tracking code.

    Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hello,

    Please note that the form in your pop-up is not created with our plugin. Please see the screenshot at https://www.dropbox.com/s/6937wqahmaai2fc/Screenshot%202019-01-02%2015.51.54.png?dl=0. I assume you are referring to this form.

    This form is created with MailChimp.com. We are a different company “Ibericode” which had made the plugin “MailChimp for WordPress”.

    The code we are sharing with you works only when you use a form created with our plugin.

    Thread Starter wordpressuser

    (@tompo0323)

    Alright, thank you.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Where should the GTM snippet go?’ is closed to new replies.