API Placement and Availability
Unlike a non-asynchronous include, you cannot be sure that the SnapEngage functions will be available when the document is otherwise ready.
Be sure to place your function calls after the comment
/* Place your SnapEngage JS API code below */.
We recommend that you call API exclusively inside this block. But if you insist on going all cowboy on us...
Using it elsewhere can be tricky
Our chat code is well optimized and loads quickly, but we also defer to your local page first (by design). So if you have a hang or a snag or even just a slow-loading image on your page, it might mean a slight additional delay to the SnapEngage code’s availability.
So what are you to do if you want, say, a hard-coded link on your page that fires
onclick="SnapEngage.startLink();" but you want to make sure that function exists before a Visitor clicks it?