• Laney Stroup 3
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hi there! I need a way to initialize the Live Agent button manually for custom javascript events (rather than just on DOM ready). Is there any documentation on this or does anyone have any experience with this?

Thanks,
Laney
Hi there! I am testing out Live Agent for a client on a Ruby on Rails site, and am running into compatibilitiy issues with Turbolinks. Basically, when Turbolinks renders the body of the page this wipes out the "Live Agent" button, and the Snap-In code does not rerender it. As a result, the Live Agent button shows up correclty when you visit the first page, but then disappears for subsequent pages (i.e. pages visited via Turbolinks). Does anyone here have any solutions or experience with this issue?

Thanks,
Laney
Hi there! I need a way to initialize the Live Agent button manually for custom javascript events (rather than just on DOM ready). Is there any documentation on this or does anyone have any experience with this?

Thanks,
Laney
Should liveagent.disconnect(), allow then to re-initialise the chat?
From what I can see this is prevented by the fact that a "qa" variable (obfuscated code) is set to 0 during initialization

var v = f.getCookie("liveagent_sid") , $ = f.getCookie("liveagent_chatted") , qa = !1 , Q = !1 , k = {}

and then the function that handles the button visibility (and more) does not get executed as qa is 

function O() {
if (!qa) {
  qa = !0;
  f.log("DOM is ready. Setting up environment.");
  null == u.getOref() && u.setOref(document.referrer); null == u.getVisitCount() &&   u.setVisitCount(1); if (window._laq) for (var a = 0; a <     window._laq.length; a++) window._laq[a].call(window); q.connection.setCallback("liveagent._.handlePing"); ra()
  }
}

why liveagent.disconnect() does not reset that 'qa' variable to the default and allow us to make a "re"- init() ?

I came across this problem, as the button that displays the livechat link in our application is inside a dialog, therefore the first time I open the dialog the button appears correcty.
The second time it doesn't for the issue highlighed above