Ok, after taking a deeper look I've found that the script is being appended properly. However, the script it throwing errors which it doesn't if I just include it directly.
var szqmkgnskgdkduju25834fa5533c80a99192961c6a85 = document.getElementById('udyfvojccgzjjdyod3275310571cd4');
szqmkgnskgdkduju25834fa5533c80a99192961c6a85.style.display = 'block';
Uncaught TypeError: Cannot read property 'style' of null
However when I include the second script directly (see code in previous post) it works. So what is changing? I have the code in the head of the document.
Also, before trying this append script, I was using document.write(), and I think that might have been working but I'm not sure. Anyway, just giving you as much information as I have.