1. Go to Tag Manager > Variables > Create new

2. Add this JavaScript

function() {
var field = {{Form Element}}.querySelector(‘[name=”X”]’);
return field ? field.value : undefined;
}

3. Use this custom variable when you are setting GA parameter for a tag.

 

Remember, that it is prohibited to store personal data to Google Analytics. So even if you could get someones name from the form for example, you are not allowed to that.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *