jQuery(document).ready(function($) { jQuery(document).on("submit_success", function(event, formID) { window.dataLayer = window.dataLayer || []; window.dataLayer.push({ event: "formSubmission", formID: "#Test Form2" }); }); });