Reading the documentation of Zopim (a.k.a Zendesk Chat): API calls must be inserted after the Live Chat Script …