If you are using Google Tag Manager, you can add the code with the help of it. Use it in the following cases:

  1. You want to remove the scripts associated with tracking and marketing and keep them together.
  2. You do not have access to the site's source code.

To insert the code for subscription form using GTM, create a "Custom HTML tag".

Create custom HTML tag

You should also replace the id value in the script - replace it with your own id value - taken from the code that you generated earlier in your SendPulse account:

Code for inserting on website

Here is the code to insert into the GTM tag:

      <script>

     var body=document.getElementsByTagName('body')[0];

     var script=document.createElement('script');

     script.async=true;

     script.src='//static-login.sendpulse.com/apps/fc3/build/loader.js';

     script.setAttribute('sp-form-id','insert your id value here');

     body.appendChild(script);

     </script>

Rate this article about "How to insert the form code to the website with the help of Google Tag Manager"

User Rating: 4 / 5 (7)

Other useful articles

Popular in Our Blog

Try SendPulse today for free