$("#hsForm_c94751c0-dfb0-455a-ab9e-b5466572acfa").submit(function() { ga(function() { var clientId = ga.getAll()[0].get('ga_client_id'); $("#hidden-client-id").val(clientId); }); })