Including php file in directory above WordPress installation

You need to use file paths, not urls, so if mydomainname.com/blog is at /home/account/public_html/blog then your file is /home/account/public_html/testing/assets/inc/analytics.php.

I would recommend putting it into a one-off plugin though.