cancel
Showing results for 
Search instead for 
Did you mean: 
aryan_ajdari
Community Member

Javascript code on canvas site

I want to install Intercom's chat feature onto my canvas site. The following link explains that I need to insert a small snippet of Javascript code: Install Intercom on your website (for logged-out visitors) | Help Center 

Is this possible to do within canvas? I know I can upload javascript code in the Theme Editor but I'm not sure if it'll work. Any advice or help would be appreciated - thanks!

Tags (2)
2 Replies
mzimmerman
Adventurer III

Hello Aryan,

Custom Javascript has always got to be tested to be sure that it doesn't conflict with the code in Canvas itself.  Have you tried this specific Javascript in the Theme Editor on your Canvas test instance?

Mike

stuart_ryan
Community Coach
Community Coach

Hi Aryan,

I am with Michael on this one, and these things need extensive testing (as well as being mindful of the three weekly update cycle that you should test the custom javascript prior to each release).

I have toyed around with HotJar using a custom JavaScript injection which worked really well in the past, so, in theory these sorts of things are possible with the same caveat Michael mentioned (ensuring you don't break Canvas with conflicting code).

I also wanted to flag something else I saw with what you linked to, it talks about logged out users (i.e. guests to a site) however when you put the code in Canvas, these people will be logged in. It is good to remain mindful of Javascript injections having potential access to information loaded within the screen when it loads for a user, so, I recommend making sure you are aware of what data the application is collecting about the browser/session/etc to make sure it only does what you intend.

Definitely give it a go in test and let us know how you get on!

Stuart