nsc_Visitor.getVisitNumber()

Returns the site visitor's current visit number. This refers to how many times the visitor has been to your site, this visit included.

Use-case

$(function() {
    // Adding the chat widget initialization event listener
    // Prior to this moment the nsc_Visitor object is absent in the scope
    $(document).on('netroxinit', function(event, data) {
        if (!data.real) { // Not a status change but initialization in any status during page loading

            if (nsc_Visitor.getVisitNumber() > 1) {
                alert("Thank you for coming back!");
            }
        }
    });
});

Demonstration of.getVisitNumber() through the Google Chrome developer kit console
Fig. 1 Demonstration of nsc_Visitor.getVisitNumber() through the
Google Chrome developer kit console

All rights reserved. Copyright © 2017 Netrox SC
Host CMS