title: How can I make GTM tags fire "once per page" on a single page application?
body: <p>I have a single page web app with a third party marketing tool I need to track. The tool implements a form. </p>
  
  <p>What I need to know is:</p>
  
  <ol>
  <li>How many people started filling in the form on a certain page type, i. e. first-clicked any of the fields (once per page)</li>
  </ol>
  
  <p>All of the fields share the same class (at least partly). So I created a trigger that fires on </p>
  
  <pre><code>"[click classes] starts with [classname part]" AND 
  "[page url] contains [pagetype]". 
  </code></pre>
  
  <p>This trigger is used for an event tag A with the "tag firing options: once per page", so that I do not get all of the element clicks, but only the relevant amount of starts which is per page. *</p>
  
  <ol start="2">
  <li>How many people successfully submit a form (once per page)</li>
  </ol>
  
  <p>This was a little more tricky, since "successfully" means that I am not interested in simple button clicks, since those could also end in error messages if someone missed filling in a required field. Also, I do not get a success page, but a success message. The div this message appears in is always there, it is just not filled until submission. I solved this by creating a custom variable defining that element and an "element visibility trigger" that fires on </p>
  
  <pre><code>"[page url] contains [pagetype]" AND 
  "[custom variable]" equals [success message]"
  
  + DOM change observance.
  </code></pre>
  
  <p>This trigger is used for event tag B with the "tag firing options: once per page". This is necessary, since the marketing tool allows multiple successful submits of the very same form (please don't ask). Therefore, I need to restrict this to once per page as well. *</p>
  
  <p><strong>*) Now here's my struggle:</strong> This setup would be working fine for a multi page application with a standard page view tracking. However, I need to have my standard page view trigger to fire at history event changes, and this crashes my setup. I don't know how to restrict the two new event tags A+B for firing "once per page" if I don't have actual page views.</p>
  
  <p>I cannot imagine that I am the only person who needs to solve this case. However, either everyone else just knows how to or I am not searching well enough - I don't find anything on this matter. </p>
  
  <p>Does anyone have any idea on how to solve this? 
  Any slightest hint would be very much appreciated! 
  Thanks in advance!</p>