=== LeadConnector === Contributors: varunvairavanlc, pranoylc, alphaenigma, iamnfinitylc, hemantlc, raahatsharma, paraglc Plugin URI: https://www.leadconnectorhq.com/ Tags: chat-widget, crm, funnels, forms, marketing-automation Requires at least: 6.2 Tested up to: 7.0 Requires PHP: 7.4 Stable tag: 4.0.2 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html Connect WordPress to LeadConnector for chat widgets, funnels, forms, calendars, reviews, custom values, and CRM tools. == Description == **Turn your WordPress site into a LeadConnector-powered conversion engine.** LeadConnector connects WordPress with your LeadConnector CRM so your site can capture leads, book appointments, publish funnels, display reviews, and personalize content from one connected admin experience. **Key Features** * **Lead capture tools**: Add chat widgets, forms, surveys, quizzes, calendars, phone pools, and reviews widgets. * **Funnel publishing**: Import LeadConnector funnel steps as WordPress pages using iframe, redirect, or native HTML display. * **CRM personalization**: Sync LeadConnector custom values into WordPress content. * **Email and SEO**: Send WordPress email through LeadConnector SMTP and manage page metadata. * **AI and cache tools**: Use supported AI Pages workflows and purge Rocket.net cache when configured. == Installation == = Minimum Requirements = * WordPress 6.2 or greater * PHP 7.4 or greater = Recommended Environment = * WordPress 6.4 or greater * PHP 7.4.9 or greater * WordPress memory limit of 64 MB or greater; 128 MB or higher is preferred = Setup = 1. Install LeadConnector from the WordPress plugin installer, or upload the plugin folder to `/wp-content/plugins/`. 1. Activate the plugin from the WordPress Plugins screen. 1. Go to **LeadConnector** in the WordPress admin menu. 1. Connect your LeadConnector account. 1. Select your location and enable the tools you want to use. == Frequently Asked Questions == = Do I need a LeadConnector account? = Yes. You need an active LeadConnector account and a connected location to use the CRM-connected features. = Is the plugin free? = The WordPress plugin is free. A LeadConnector subscription may be required to use connected services such as widgets, funnels, forms, calendars, email, and CRM tools. = How do I connect my LeadConnector account? = Open **LeadConnector** in the WordPress admin menu and follow the connection flow. Settings changes use authenticated WordPress admin requests. = How do I add the chat widget to my site? = Open **LeadConnector > Chat Widget**, enable the widget, and select the widget you want to display. The plugin loads the selected LeadConnector chat widget on your WordPress site. = How do I publish a LeadConnector funnel in WordPress? = Open **LeadConnector > Funnels**, choose a funnel and funnel step, set the WordPress slug, and publish it. Funnel pages are stored in WordPress as LeadConnector funnel content and routed through the selected display method. = What shortcodes are available? = The plugin includes `[leadconnector_form]`, `[leadconnector_calendar]`, `[leadconnector_survey]`, `[leadconnector_quiz]`, `[leadconnector_reviews_widget]`, and `[leadconnector_phone_number_pool]`. The historical `[lc_*]` aliases remain registered for backward compatibility and will be removed in a future major release. = Does the plugin work with Elementor and other page builders? = Yes. The plugin includes Elementor-specific compatibility support and frontend styles for supported LeadConnector funnel pages. Compatibility can vary by theme, template, and builder configuration. = Does the plugin support RTL languages? = Yes. LeadConnector includes Right-to-Left language support for supported plugin screens and frontend output. = External Services = LeadConnector is a CRM/marketing platform operated by LeadConnector LLC. This WordPress plugin is a thin client for that platform: connecting WordPress to your LeadConnector account, embedding chat widgets, forms, calendars, surveys, quizzes, reviews, and phone-tracking pools, importing and rendering funnel pages, opening the LeadConnector authorization flow, and optionally purging an external CDN cache. **Every feature that needs the LeadConnector platform will cause one or more HTTP requests to LeadConnector-owned hosts (and, for form-embed support, a sibling messaging host).** This section documents every external host the plugin reaches out to, why, when, what data crosses the wire, and what does not. All LeadConnector-owned hosts (`leadconnectorhq.com`, `msgsndr.com`, `reputationhub.site` subdomains listed below) are governed by the same LeadConnector terms of service and privacy policy: * Terms of service: https://www.leadconnectorhq.com/terms2 * Privacy policy: https://www.leadconnectorhq.com/privacy-policy Each domain block below repeats the per-domain links so reviewers (and end users) can verify them in place. Calls to these hosts only happen when the corresponding feature is enabled, configured, or used. A feature that is disabled, an empty configuration value, or a shortcode that is not present on the page will not trigger any of these requests. = services.leadconnectorhq.com (admin / server-to-server and chat widget browser endpoints) = * What it is: LeadConnector's authenticated services API. The plugin's primary read/write surface for account and configuration data, OAuth token exchange / refresh, optional CDN cache purge, chat-widget service endpoints, and one allowlisted host for optional funnel tracking-code downloads supplied by LeadConnector during import. * What is sent: * OAuth access token (Authorization: Bearer header) when an admin has connected their account; OAuth refresh token during token-refresh calls only. * Connected location ID. * Plugin settings being saved (chat widget selection, SMTP enable flag and configuration, SEO override fields, white-label URL, AI Pages flags). * Funnel/page identifiers and the WordPress post ID they were imported into (during funnel import, refresh, and native-mode warm-up). * Custom-value field keys for the connected location during the admin "sync custom values" action. * Cache-purge target identifiers (`{locationId}`, `{wpId}`) inside the URL path when CDN purge fires; no request body is sent for cache-purge calls. * Chat-widget service URL configuration is exposed to the widget loader through script `data-*` attributes when the chat widget is enabled. * Optional funnel tracking-code download URL when LeadConnector supplies a download URL on this host during import / publish. * When sent (admin-triggered server-side requests only): * OAuth connect / disconnect flow (admin clicks "Connect to LeadConnector" or "Disconnect"). * OAuth token refresh (background WP-Cron task `leadconnector_oauth_token_refresh_cron`, fired only when a connected access token is approaching expiry). * Settings save on the LeadConnector admin screen. * Funnel browse, import, and refresh actions (admin clicks "Import" / "Refresh" inside the LeadConnector funnels UI). * Custom-value listing and sync action. * SMTP enable / disable / test send actions. * Reviews widget admin browsing. * Admin REST proxy requests that target an allowlisted full URL on this host. * CDN cache purge (see below for triggers). * CDN cache-purge triggers (only when `CDN_WP_ID` or `CDN_SITE_ID` is defined in `wp-config.php` and an active OAuth session exists). The plugin sends an authenticated empty-body `POST` to `services.leadconnectorhq.com/wordpress/lc-plugin/site/{locationId}/{wpId}/clear-cache` on: 1. A connected WordPress administrator clicking "Purge everything on all domains" in the admin bar. 2. The LeadConnector settings page being saved. 3. A public post (any post type registered with `public => true`, including standard `post`, `page`, WooCommerce products, and third-party CPTs) being published or updated via WordPress's `save_post` hook. Auto-saves, revisions, and non-public post types are skipped. * Custom-value placeholder fallback (a single front-end-render code path): when a `{{custom_values.…}}` placeholder is referenced on a public page and the local transient cache is cold for that key, the public renderer falls back to an authenticated read from `services.leadconnectorhq.com` using the admin-issued OAuth bearer that the site has stored. The fallback is a read-only lookup; no visitor data is forwarded. * Visitor browser trigger: when the chat widget is enabled, the browser loads `widgets.leadconnectorhq.com/loader.js` with `data-server-u-r-l` and `data-marketplace-u-r-l` values pointing at `services.leadconnectorhq.com`; the widget may contact those service endpoints directly. Browser requests include the selected widget configuration plus normal browser metadata (IP address, User-Agent, Referer, language headers, and any cookies the host previously set). * What is **not** sent by PHP server-to-server calls: WordPress administrator credentials, password hashes, WordPress secret keys/salts, WordPress authentication cookies, other plugins' data, visitor IP, visitor User-Agent, or visitor referrer. Chat-widget browser requests are initiated by the visitor's browser and carry normal browser metadata as described above. * Service: provided by LeadConnector LLC. * Service terms: https://www.leadconnectorhq.com/terms2 * Privacy policy: https://www.leadconnectorhq.com/privacy-policy = rest.leadconnectorhq.com (admin / server-to-server) = * What it is: LeadConnector's REST API. Used by legacy admin flows that have not yet migrated to `services.leadconnectorhq.com` and as one allowlisted host for optional funnel tracking-code downloads supplied by LeadConnector during import. * What is sent: the LeadConnector API key (when API-key auth is configured instead of OAuth), location ID, page/funnel IDs, custom-value keys, and request parameters required by the admin action. For optional tracking-code downloads, WordPress sends a server-side `GET` to the LeadConnector-supplied download URL. * When sent: admin-triggered actions only - account validation against the REST API, certain custom-value reads, certain legacy data pulls, admin REST proxy requests that target an allowlisted full URL on this host, and funnel import / publish when the supplied tracking download URL points to this host. The plugin never calls this host from the public render path. * What is **not** sent: WordPress admin credentials, WordPress secrets, WordPress auth cookies, visitor data. * Service: provided by LeadConnector LLC. * Service terms: https://www.leadconnectorhq.com/terms2 * Privacy policy: https://www.leadconnectorhq.com/privacy-policy = api.leadconnectorhq.com (front-end browser **and** admin server-to-server) = * What it is: LeadConnector's public widget and asset host. It serves browser-loaded JavaScript / iframes for embeds, allowlisted admin REST proxy targets, and optional funnel tracking-code downloads supplied by LeadConnector during import. * Front-end browser triggers (visitor's browser contacts the host directly): * `[leadconnector_phone_number_pool id="…"]` shortcode loads `https://api.leadconnectorhq.com/loc/{locationId}/pool/{poolId}/number_pool.js` and `https://api.leadconnectorhq.com/js/user_session.js`. * `[leadconnector_form id="…"]` shortcode renders an iframe pointing at `https://api.leadconnectorhq.com/widget/form/{formId}`. * `[leadconnector_survey id="…"]` shortcode renders an iframe pointing at `https://api.leadconnectorhq.com/widget/survey/{surveyId}`. * `[leadconnector_quiz id="…"]` shortcode renders an iframe pointing at `https://api.leadconnectorhq.com/widget/quiz/{quizId}`. * `[leadconnector_calendar slug="…"]` shortcode renders an iframe pointing at `https://api.leadconnectorhq.com/widget/booking/{slug}`. * The shortcodes also enqueue `https://link.msgsndr.com/js/form_embed.js` (see the `link.msgsndr.com` block below) which is what allows the iframes to resize. * Data the visitor's browser sends to `api.leadconnectorhq.com` when those embeds load: the configured identifier in the URL (location/pool/form/survey/quiz/calendar slug), plus whatever the visitor's browser includes automatically (IP address, User-Agent, Referer, language headers, and any cookies the host previously set in this browser). Anything the visitor subsequently types into an embedded LeadConnector form, survey, quiz, calendar booking, or chat is submitted directly from the visitor's browser to LeadConnector's services and is governed by the LeadConnector privacy policy. * Funnel display trigger: if a published funnel step is configured to redirect to an `api.leadconnectorhq.com` URL, the visitor's browser is redirected there. In native mode, the funnel HTML is fetched from `app.leadconnectorhq.com`, but scripts or stylesheets inside that upstream HTML may reference `api.leadconnectorhq.com`; those assets are re-emitted only when they pass the native-mode allowlists documented below. * Admin server-to-server triggers: * Certain admin REST data pulls (calendar lists, reviews widget metadata, related lookups) target `api.leadconnectorhq.com` with the OAuth bearer. * The admin REST proxy accepts `direct_endpoint=true` only for an allowlisted LeadConnector URL. If an administrator action requests an allowlisted full URL on `api.leadconnectorhq.com`, WordPress performs a server-side `GET` to that URL. * During funnel import / publish, WordPress may fetch a LeadConnector-supplied tracking-code download URL on this host. * What is **not** sent by the plugin itself: WordPress admin credentials, WordPress secrets, WordPress auth cookies, other plugins' data. The plugin does not proxy visitor input through PHP; it embeds the iframes/scripts directly. * Service: provided by LeadConnector LLC. * Service terms: https://www.leadconnectorhq.com/terms2 * Privacy policy: https://www.leadconnectorhq.com/privacy-policy = backend.leadconnectorhq.com (admin / server-to-server) = * What it is: LeadConnector's marketplace backend. * What is sent: OAuth bearer, location ID, marketplace identifiers, page IDs, template IDs, and funnel-step identifiers required to retrieve page metadata during import. * When sent: admin-triggered marketplace and funnel-template browsing, import, sync, and publish actions inside the LeadConnector admin UI, plus admin REST proxy requests that target an allowlisted full URL on this host. * What is **not** sent: visitor data, WordPress secrets, WordPress auth cookies. * Service: provided by LeadConnector LLC. * Service terms: https://www.leadconnectorhq.com/terms2 * Privacy policy: https://www.leadconnectorhq.com/privacy-policy = app.leadconnectorhq.com (admin **and** front-end) = * What it is: LeadConnector's customer-facing application host. The funnel HTML that gets rendered as a WordPress page lives here. * Admin triggers: the funnel import / refresh flow performs an authenticated `wp_remote_get()` against `https://app.leadconnectorhq.com/{path}` to fetch the funnel step HTML so it can be stored in WordPress. The OAuth bearer is sent; the visitor never sees this request. The admin UI may also open connected LeadConnector app screens in the administrator's browser, and the admin REST proxy may request an allowlisted full URL on this host. * Optional server-side tracking download: during funnel import / publish, WordPress may fetch a LeadConnector-supplied tracking-code download URL on this host. * Front-end triggers depend on the funnel page's configured display mode (set per funnel post): * **iframe** mode - The visitor's browser loads `https://app.leadconnectorhq.com/{funnelStepPath}` inside an `