Has anyone figured this out yet? I’ve followed the intercom documentation as well and tried passing ID or class, but nothing happens!
I know Webflow adds their .w-button class to default buttons, so I tried as a combo class as well in the intercom script in the page settings. Didn’t work either way.
UPDATE:
I figured this out, and got this to work, if anyone in this thread still needs help. In my case it was because I was missing a single “,” in the code lol, which is usually the case with these things.
Hey @drungsea can you share the snippet you ended up implementing? I cannot figure out how to just get the intercom messenger to open up on the button clicks.
This is the code I am using now:
<script>
window.intercomSettings = {
app_id: "wy7wv5c1"
};
</script>
<script>
// We pre-filled your app ID in the widget URL: 'https://widget.intercom.io/widget/wy7wv5c1'
(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/wy7wv5c1';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>```
Yes, it should actually be as easy as they (intercom) says it is in their docs and your code is the same as mine (minus app ID of course)
What you’re missing after app_id: "wy7wv5c1", is custom_launcher_selector: '.YOUR-BUTTON-CLASS-NAME'.
Don’t forget the comma after "wy7wv5c1".
And if you’re using IDs instead of class names, don’t forget to use #YOUR-BUTTON-ID in place of the class name, and then type that into the ID field of your button in the settings panel!