You can integrate a form into your website by installing a javascript code in the same way as you do with the Google Analytics code.
Once the form is published, the javascript code will be displayed and you have to add it to the source code of your page before the "</header>" tag. Here is an example of the code you should add to all your pages to integrate a popup form.
<!-- Easymailing suscription form -->
<script>
(function (w, d, s, i) {
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s);
j.async = true;
j.src =
'https://assets.easymailing.com/build/trck/universal.js' + '?v' + (~~(new Date().getTime() / 1000000));
f.parentNode.insertBefore(j, f);
w.__easymsettings = {
domain: i
};
})(window, document, 'script', 'miempresa.easymailing.com');
window.__easymsettings.popuphash = 'FORM_IDENTIFIER'
</script>
<!-- End Easymailing suscription form -->
If you are also going to install an embedded form after having already installed the javascript code, you will only have to add a layer with an attribute in the part of the code where you want to embed it.
<div data-easymform="FORM_IDENTIFIER"></div>
How to install javascript code in Wordpress without a plugin?
1Edit your template
To edit the template you have to go to Appearance > Theme Editor in the main menu of Wordpress.
2Locate the header.php file
There is a list of all the files you can edit in your template on the right hand side. Find the file header.php and click to edit the source code of that file.
3Locate the labels <head> and </head> to enter the code
Look inside the code for the <head> and </head> tags, and paste the javascript code provided by Easymailing. Once you have pasted the code, click on the Update button, and you have the javascript code installed in Wordpress.
4Insert the layer where to display the embedded form (For embedding only)
Once you are editing the page where you want to insert the embedded form, click on "Add block" and select "HTML", paste the following code provided by Easymailing and click on "Update" to save the page.e.
<div data-easymform="FORM_IDENTIFIER"></div>
Comments
0 comments
Please sign in to leave a comment.