How to Insert Web Push Notification Code to a Website with Google Tag Manager
If you don't have access to the source code of a site, you can add the code via Google Tag Manager.
In your SendPulse account, add a site where you want to send web push notifications.
To add the web push notification code to your site using Google Tag Manager, you will need a piece of the code that you will receive in your SendPulse account.
Create a new tag in your Google Tag Manager account.
Select the "Custom HTML" tag type.
Add the following script into the "HTML" field in the "Tag Configuration" form:
<script> var head = document.getElementsByTagName ('head') ; var script = document.createElement ('script'); script.async = true; script.src = 'CODE LINK'; head.appendChild (script); </script>
'CODE LINK' is the site protocol, HTTP or HTTPS, and the code that you received in your SendPulse account.
Configure the triggers which will activate the tag.
Save the tag.
Submit the workspace changes in Google Tag Manager.
Last Updated: 10.12.2019