Useful scripts for Google Tag Manager

Survey #2

This is the second version of the Custom HTML survey template.


Step 1 – Create a Custom HTML tag

Step 2 – Add the following code:



You can remove the Jquery library call if you already have it installed.

<script src=””></script>


Step 3 – Replace the questions and the answers from the code with your own.

You can have as many questions as you want.

You can have a maximum of 4 answers per question.

The survey box will not resize according to the number of characters in the answers and questions so test it beforehand.



click here  —>  GTMsurvey

When the user clicks “Send”  the answers are pushed to the DataLayer. You can use an event tag to send the answers to Google Analytics.




Tiny tweeks may be needed for different platforms.


Jquery pagination respectfully borrowed from  Michael Vaughan.

Next Post

Previous Post

Leave a Reply

© 2021 GTMScripts