Conditionally embed Knack

Anyone know of a way to conditionally embed knack into a page or perhap conditionally run the embed. I want to only show the view when certain query parameters are in the URL simply using javascript with something like

if (window.location == "blahblah") { <knack embed code> };

that would work great normally except knack uses some unusual <script> tags that I don't know how to deal with and they mess with the javascript if/then statement that is operating on it. Im sure there is a way around all this just not at my level of JS knowledge. Likely using docuement.write to spit the embed code out somewhere else on the page