wordpress js files and google tag manager

I have a js file that specifies css edits to a page I am iframing. The iframed page is an external site that I don't own. The owner has installed a google tag manager container to the external page and I just need to add the script the plugin I asked for help with before advanced iframe pro has a workaround to add a script <script src="http://mywebsite/wp-content/plugins/advanced-iframe/js/ai_external.js"></script>
that calls back to the js file. I don't know which configuration to use in tag manager to execute this call back. Can you help me determine which of these configurations I should use

Page Variables
1st Party Cookie
The value is set to the first value of the 1st party cookie with the matching name.
Custom JavaScript
This variable uses the provided JavaScript function to calculate its value in the browser. Each time this variable is used, the function will be executed and its return value will be used.

Data Layer Variable
JavaScript Variable
The value is set to that of the global JavaScript variable you specify.

  • Adam Czajczyk

    Hello Brian,

    I hope you're well today and thank you for your question!

    Could you please elaborate a bit more on what you wish to achieve? I'm slightly confused with it.

    By default, you cannot add a script to a page that's fetched into an iframe from an external source. Every browser would be clocking such an attempt due to the security reasons. Still though, I'm not quite sure what are you trying to achieve so could you please give me some more detailed description on this?

    Please advise!

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.