Adding Google Analytics to Knack

I'm trying to add Google Analytics to my knack app. I tried following the post guides here, but when my knack javascript gets run, $('#knack-body') doesn't exist, so my google analytics script never gets run. Where is the element with id 'knack-body'?

Hey there,

There's actually no need to do anything with #knack-body. You can simply put this in your app's JavaScript, replacing UA-XXXXX-Y with your Google Analytics Tracking ID.

If you would like further help with this or anything else, feel free to contact me at! :)

(if the link above does not work, try: