Airim Documentation
1.0.0
1.0.0
  • Welcome to Airim Docs !
  • Getting Started
    • Customizing Contact Form
    • Adding FAQs one-by-one
    • Importing FAQs
    • Adding Team Members
    • Customising Airim's Appearance
    • Taking Airim Live
    • Adding Vernacular Content
    • Enable or Disable Airim
    • Launching Personalization
    • Integrating with Wordpress
    • Adding CTAs to FAQs
    • Embeddables
  • Integrations
    • Integrating with Zendesk
    • Integrating with Live Chat
    • Integrating Custom Live Chat
    • Integrating with Zapier
    • ConvertFox (Gist) KB integration
    • LiveAgent KB integration
    • ConvertFox / Gist Chat integration
    • Google Analytics
    • Custom Analytics
    • Google Tag Manger
  • Widget API
    • JavaScript ( Web )
    • Using Iframe mode
Powered by GitBook
On this page

Was this helpful?

  1. Widget API

Using Iframe mode

PreviousJavaScript ( Web )

Last updated 6 years ago

Was this helpful?

Iframe mode

Iframe mode loads the widget in an iframe with source set to cdn.airim.co. This is for additional security as the iframe which loads is from another domain, it cannot access elements from the parent window.

<script type="text/javascript">
!function(t,n,i,c,r){t.AirimObj=r,t[r]=t[r]||function(){(t[r].q=t[r].q||[]).push(arguments)},e=n.createElement("script"),x=document.getElementsByTagName("script")[0],e.async=1,e.src="https://cdn.airim.co/widget.js",x.parentNode.insertBefore(e,x)}(window,document,0,0,"airim");
airim('mode','iframe') // important to be before init function
airim('init','<your_account_id>');   // dont forget to replace account id from settings page
</script>

To obtain your javascript code click . Add the snippet airim('mode','iframe') before the init call

here