Hi there,
I have a piece of javascript code that I want to embed on a few pages of our community to enable some in-site messaging, does anyone know how I can add the code?
Thanks!
Hi there,
I have a piece of javascript code that I want to embed on a few pages of our community to enable some in-site messaging, does anyone know how I can add the code?
Thanks!
From there you can choose where to add the code in relation to the Head and body of the page, unless you’re referring to some tracking code that goes in the very top area “Insert in <HEAD>” the head, then most likely you’ll want the last area or “Before </Body>” before the body closing tag.
If you’re really not familiar with what you are doing I would recommend double checking the code with a third party to ensure you’re not adding anything that shouldn’t be there.
Additionally you can customise what pages the code applies to if not to all pages by wrapping the code in something like this:
<script>
if (inSidedData.page.url.includes("/search?")) {
YOUR CODE GOES HERE
}
</script>
The above example limits the code in it to applying only on the search page.
Hope this helps!
If you ever had a profile with us, there's no need to create another one.
Don't worry if your email address has since changed, or you can't remember your login, just let us know at community@gainsight.com and we'll help you get started from where you left.
Else, please continue with the registration below.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.