Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Most of the integration functionality happens at the S4S Cloud Send2CRM service, which allows more detailed debugging and troubleshooting.

General debug information

The S4S Cloud Send2CRM client automatically logs various troubleshooting messages to the JavaScript console when the debug setting is enabled. Most modern browsers include developer tools for easy viewing of console messages and other useful information. For example, Google Chrome or Mozilla Firefox.

...

Service connection errors

S4S Cloud The Send2CRM client will continue to output debug messages as it performs actions on the page, including sending form submissions and visitor updates.

...

Info

The S4S Cloud Send2CRM service sends the following HTTP error codes:

  • 400 (Bad Request): invalid data sent. This will occur if the form is not mapped.

  • 401 (Unauthorized): invalid shared key or request not sent via JavaScript client.

  • 500 (Server Error): unexpected service error.

Local data

S4S Cloud The Send2CRM client stores data in the browser local storage.

...

If cookies have been enabled in settings, you can also inspect the values using the web browser.

Forcing visitor updates

The following JavaScript code may be run directly in the browser console to force immediate visitor updates instead of waiting for the next automatic update.

Code Block
languagejs
// Clear all visitor data in the browser.
javascript:localStorage?.clear();

// Send an update for the current visitor to the service (if identified).
javascript:send2crm.analytics?.visitor?.sendToService();

// Force the current session to end and send immediately.
javascript:send2crm.analytics?.endSession();
Note

This is intended for development use only, excessive use on a production site may exceed service limits (e.g. if set to run on every page load). The Send2CRM client sends regular updates only when required, if this needs to occur more frequently consider adjusting the frequency setting.

Browser back/forward cache (bfcache)

Depending on web browser settings inline JavaScript may not be executed on every page load when using the back and forward buttons. If you wish to perform a task on every page view, e.g. recording Goals, you can use the pageshow event rather than load.

Code Block
languagejs
window.addEventListener('pageshow', (event) => {
  // Execute something on every page display.
});