Form Submissions are Duplicated / reCAPTCHA error

Revised April 17, 2019

The Issue

We're seeing infrequent and inconsistent behavior where a form is submitted once but generates TWO copies (duplicates/clones). The time stamps are almost identical and all fields and any attached files are included in both versions. The form submit button was not clicked twice.

If the form includes a reCAPTCHA spam filter, the second submission of the form is blocked with a warning that the reCAPTCHA failed.

The Cause

This does not appear to be browser or operating system related.  

Native UBCMS forms and those in Formstack but embedded on a UBCMS page have both been effected.

The form submit button was definitely not clicked twice.

We do not know the exact cause, but believe it relates to Google Analytics GTM (tag manager) tracking codes. In all known instances, this has occurred on a page that has TWO of the GTM codes.  We have also conducted some tests where the the same form with no codes or just one code does not get duplicated, but with TWO codes, is frequently duplicated.

Workaround

The workaround is only use one GTM code on a site.

FYI, these codes are used by tools like Google Analytics to track usage of your website content, clicks to individual pages, file downloads, and so on. The master UB tracking code GTM-T5KRRKT is added to all UBCMS websites when they are launched. This code is added 'behind the scenes' in CRXDE and cannot be modified by authors. Sometimes a legacy code GTM-PRK43Q may also still be present on older sites and can usually be safely removed. Units may also have opted to add their own tracking codes (in their home page Page Properties).

These codes are normally added/blocked in the home page's Page Properties Advanced settings under Google Analytics. We do not recommend turning off the master UB GTM code since your usage data will no longer be available for your use, or any other unit, but that is an available option for a site manager or Unit Web Leader. They can also add/remove their own tracking code in these same settings. (Read more about Google Analytics in the UBCMS.)