Placing the <script> tag directly in the iframe probably won't work and is contrary to facebook's directions. You will have to load an HTML page from your webserver or provide HTML code for the iframe with the javascript in that HTML code.
Excerpt from facebook's instructions:
Add your analytics code in one of the following methods: Specify the URL pointing to the source for your analytics code. Embed the full unescaped HTML and scripts as content within the <iframe> element representing this analytics code.
Please refer to https://developers.facebook.com/docs/instant-articles/analytics and https://developers.facebook.com/docs/instant-articles/reference/analytics
... View more