Often when adding tracking in Google Tag Manager you will be redirected to a thankyou page. In the Google Tag Manager preview mode the click event is lost here which makes identifying variables to assign to the click difficult. This also created fake form submissions in a business account. (see also our post on the Chrome extension for excluding your IP data in GA).
To combat thus – Simply enter the JavaScript console (Ctrl+Shift+J in Google Chrome) and enter the following script:
window.addEventListener('beforeunload', function(e) {
e.preventDefault();
e.returnValue = '';
});
Now when you submit the form – just click cancel. You can then review any click events and variables assigned to the form submit