Adding MailChimp pop-up signup form to your Selz store

You can embed a MailChimp list signup pop-up form on your Selz store pages.
To design your signup form please follow the MailChimp article here.
The generated code will look similar to one below.

<script type="text/javascript" 
src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" 
data-dojo-config="usePlainJson: true, isDebug: false"></script>
<script type="text/javascript">require(["mojo/signup-forms/Loader"], function(L) { 
L.start({"baseUrl":"{your_baseUrl}","uuid":"{your_uuid}","lid":"{your_lid}"}) })</script>

Use the bellow snippet to embed your signup form to your Selz store.┬áReplace {your_baseUrl}, {your_uuid} and {your_lid} in the code with the values from your MailChimp embed script and add to ‘Custom JavaScript’ in the advanced store settings.

(function () {
    function async(u, c, a) {
        var d = document;
        var t = 'script';
        var o = d.createElement(t);
        var s = d.getElementsByTagName(t)[0];
        o.src = u;
        if (typeof a === 'object') {
            for (var attr in a) {
                s.setAttribute(attr, a[attr]);
            }
        }
        if (c) {
            o.addEventListener('load', function (e) {
                c(null, e);
            }, false);
        }
        s.parentNode.insertBefore(o, s);
    }
    async('//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js', function () {
        require(['mojo/signup-forms/Loader'], function (L) { 
            L.start({ 'baseUrl': '{your_baseUrl}', 'uuid': '{your_uuid}', 'lid': '{your_lid}' });
        });
    }, { 'data-dojo-config':'usePlainJson: true, isDebug: false' });
})();

You should now see the MailChimp signup pop-up form when you visit your Selz store pages.

NOTE: If you wish to test the pop-up after dismissing it again, clear the browser cookies.

Was this helpful?

0 0