Track form submit with Tag Manager

I have a simple form consisting of div-elements, one textarea-field and one button-element and would like to track how many times the form was submitted. After each form submittion there appears a thank-you-message (a DIV-element with ID=thank_you) as a text directly below the form.
So I thought the easiest way would be to count, how many times the thank-you-message appeared.

I found the forum entry How to track form submissions using tag manager? where it is nicely described how to configure the VARIABLE and the TRIGGER - both are clear for me.
Unfortunately I don’t see what configuration the TAG should have?
And what is the “mtm.FormSubmit” - is it some Javascript which has to be inserted somewhere?

My form (it has no form-element):

<script>
$(document).ready(function(){
  $("button#MF-SB").click(function(){
    $("<div id='thank_you'>Thanks a lot for your message.</div>").insertAfter("div#MF");
  });
});
</script>

<div id="MF">
   <div class="form-group">
       <label for="exampleFormControlTextarea1">WRITE A MESSAGE in this textarea</label>
       <textarea class="form-control" id="exampleFormControlTextarea1" rows="3"></textarea>
   </div>
   <button id="MF-SB" class="btn btn-primary" type="submit">Submit</button>
</div>

Hi @wt_muc

The configuration variable is the one you have to configure in the MTM container, and that contains the … configuration! (Matomo server URL, site ID, custom dimensions, etc.)

This is just the event name in your MTM container, in order to be able to select it as the TAG trigger.