S
S
simpleasthat2016-03-02 00:32:31
JavaScript
simpleasthat, 2016-03-02 00:32:31

How to show the MailChimp form when leaving the site?

Hello.
Introductory data: there is a blog on Wordpress, there is MailChimp.
Task: It is necessary to implement the display of a pop-up form when the cursor is moved outside the body tag. The script that is currently used for these purposes is loaded from a remote server, it also adds a form to the body of the document and displays it. Before the script completes, there are no blocks with a form in the document.
Question: how can you implement the display of such a form when the cursor is removed from the body with the most minimal effort under the existing conditions, while you need to throw a cookie to the user, and the next time you visit the site if you have a cookie, you do not need to show the form. Perhaps there is some standardized solution? It is important to use exactly the form that is loaded by the script, so as not to write your own form and not bind it yourself to the MailChimp API.
I'm sorry that I'm asking a question in a chaotic form and inconsistently, I hope you understand me.
The script is loaded like this:

<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":"mc.us12.list-manage.com","uuid":"zdesid","lid":"zdesesheodinid"}) })</script>

I would be very grateful for any advice.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilshat Shavaliyev, 2017-02-05
@shifaley

There is a simple way - to install a service code on the site that shows popups (i.e. its forms), and then automatically transfers data to Mailchimp via api. One of the best services: https://popmechanic.ru/ (with traffic on the site less than 10k per month, the service is free).
If mailchimp is not important, check out https://mailganer.com/ru/ - a mailing service with built-in pop-ups (including display when the cursor is moved out of the window).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question