You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today.

Customer engagement is not a cost center. It's an investment in customer relationships.

ZenDesk Chat, or perhaps more accurately Zopim Chat, as they haven't changed almost anything aside from increasing the price since acquiring Zopim in 2014 is a very effective tool in your online marketing arsenal. However, their Javascript API does tend to be rather lacking. One both extremely annoying example is this is that they only intrinsically provide you with a means to put the chat button on the bottom left, middle, and right on mobile devices, which can be incredibly annoying in instances like the image on the right. ZenDesk Chat overlapping other element.


To remedy the issue, I extended the $zopim.livechat.button with a function called resetLocation. Internally, the function simply uses Zopim's intrinsic setOffsetHorizontalMobile and setOffsetVerticalMobile functions and takes x and y as parametersThe function simply takes the available screen height and subtracts the amount height of the header and similarly takes the available screen width and subtracts whatever number that you specify, so that you can add a little space between the edge of the screen and the button.

The code is as follows:

If you have any questions or need any help with your programming project, please feel free to drop me a line anytime, by using our contact form.
Until next time: Happy Coding!

Happy Coding!