Skip to content

Instantly share code, notes, and snippets.

@thewheat
Last active June 18, 2020 22:23
Show Gist options
  • Select an option

  • Save thewheat/956aea06573143344ea9 to your computer and use it in GitHub Desktop.

Select an option

Save thewheat/956aea06573143344ea9 to your computer and use it in GitHub Desktop.
Intercom integration with wix.com. There are some caveats with this installation e.g. Product Tours won't work. See comment below for more details. We have had reports that it doesn't work in some cases but it does seem to function on some sites (e.g. http://timlim96.wix.com/acquire). If you can manually integrate it on your own test non Wix pag…
<script>
// just use the Vistor Install as per https://www.intercom.com/help/install-on-your-product-or-site/quick-install/install-intercom-on-your-website-for-logged-out-visitors
// Notes on Intercom and Wix including possible problems detailed in https://gist.github.com/thewheat/956aea06573143344ea9/
// Add > More > HTML code
// Select "Code" in settings
// paste this snippet
// update your APP_ID
/* Replace 'APP_ID' with your app ID */
window.intercomSettings = {
app_id: 'APP_ID'
};
/* Replace 'APP_ID' with your app ID */
(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',w.intercomSettings);}else{var d=document;var i=function(){i.c(arguments);};i.q=[];i.c=function(args){i.q.push(args);};w.Intercom=i;var l=function(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/APP_ID';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);};if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})();
</script>
@thewheat
Copy link
Copy Markdown
Author

thewheat commented Feb 17, 2016

In the editor, drag and drop "HTML Code" onto your page
image

Copy the script above and update the APP_ID accordingly
image

@thewheat
Copy link
Copy Markdown
Author

thewheat commented May 30, 2019

Issues with this approach

  • Embedded iframe: Wix auto generates an HTML page and loads that as an iframe on the page. This constrains the Intercom widget to show only in a certain section. It will also prevent proper functioning of Product Tours as we cannot correctly detect Intercom being loaded on the page

image

  • Wrong url reported to Intercom: this will prevent correct URL matching

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment