If you are using Google Tag Manager and your site doesn’t use HTTPS protocol, then you have an opportunity to 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.

In order to insert the code for push notifications using GTM, create the tag «users tag HTML».

You should also replace the following link with the link in the code that you generated earlier:

http://cdn.sendpulse.com/js/push/ce8e409eda15335f2a532dcbe3f296d7_1.js

Insert the code with Google Tag Manager

Here is the code to insert into the GTM tag:

     <script>

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

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

     script.async = true;

     script.src= 'your link to the code';

     head.appendChild(script);

     </script>

Other useful articles

Popular in Our Blog

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

User Rating: 5 / 5 (5)

Try SendPulse today for free