HubSpot Chat Integration: setup and help
Quick start
- Upload the mprhubspotchat ZIP in Modules > Module Manager > Upload a module and install it.
- Click Configure to open HubSpot Chat Configuration.
- Paste only your HubSpot Portal ID into Portal ID; keep Enable HubSpot Chat set to Yes.
- Choose Show on Pages and Show on Mobile for your test page and device.
- Review Pass Customer Data; leave Fallback Delay (seconds) at 0 for the 10-second fallback, then click Save.
- Open an allowed storefront page and scroll, click, touch the page or press a key to start the HubSpot loader.
- Confirm the widget opens and submit a test conversation in HubSpot; also test a page or device you excluded.
Requires PrestaShop 1.6 or later and PHP 7.1 or later.
Setup manual
Install and connect
Use this guide to connect your shop to HubSpot. You need an existing service account and its Portal ID. Configure conversations and the visible widget in the service account.
The module's Configure action opens HubSpot Chat Configuration. Its configuration controller also shows a required-configuration notice and an integrity banner. Use the module's Configuration, Integrity, License, Support and Update pages for the corresponding maintenance work.
Find the connection value
Copy your numeric HubSpot Portal ID, also called Hub ID, from the account details or installation code. The module setup panel points to Settings > Account Defaults > Account Info. Paste the identifier only. Do not paste an entire URL or script. The provider account navigation is quoted from the module's setup guidance and may differ in your account.
The default is empty. For new or changed identifiers, the module expects 1 to 20 digits. A rejected identifier keeps the previous saved configuration. Correct the value and save again.
Configure display and customer data
Set these fields in HubSpot Chat Configuration, then click Save.
| Setting | Installation default | What to do |
|---|---|---|
| Enable HubSpot Chat | Yes | Set No to stop this module from outputting the widget. Keep the connection value filled in when you save, including when disabling chat. |
| Portal ID | Empty | Enter your service identifier before testing. An empty value prevents storefront rendering. |
| Pass Customer Data | Yes | Set No to omit the customer fields prepared by this module. See the service-specific behavior below. |
| Show on Mobile | Yes | Set No to exclude mobile visitors detected by the server. Test with your actual phone. |
| Fallback Delay (seconds) | 0 | This is the maximum wait before loading without interaction. Zero uses a 10-second fallback. A positive value changes that timeout; interaction can start loading sooner. |
| Show on Pages | All Pages | Limit the loader to one of the page groups below. |
Page groups
| Back Office choice | Stored value | Allowed controllers |
|---|---|---|
| All Pages | all |
All storefront pages |
| Product Pages Only | product |
product |
| Category Pages Only | category |
category |
| Checkout Pages Only | checkout |
cart, order, order-opc, orderopc, checkout |
Targeting uses controller names. A custom checkout controller outside this list is not included by Checkout Pages Only. There is no custom URL-rule field. Show on Mobile uses PrestaShop mobile detection rather than browser width alone.
Customer fields
Before loading the script, the template queues _hsq.push(['identify', {email: 'customer@example.com'}]) for a logged-in customer with data passing enabled. It sends the email address only; customer names are not sent. The loader uses hs-script-loader and skips inserting a second element with that ID.
Guests do not receive PrestaShop customer identity fields from this module. The service can still collect information through its own widget. This module does not synchronize order history or cart contents.
Example configuration
For checkout pages on desktop, choose Checkout Pages Only, set Show on Mobile to No, and set Fallback Delay (seconds) to 2. The loader starts on the first interaction or after two seconds without interaction.
Check storefront loading
The module registers displayBeforeBodyClosingTag. It first checks the enable switch, connection value, device rule and page rule. It then places a deferred loader near the end of the page.
Scroll, click, touch or press a key to trigger the loader. Without interaction, wait for the configured fallback. The shared loader removes the inner template delay, so the two waits are not added together. With the installation default 0, allow 10 seconds before treating an idle page as a loading failure.
In browser developer tools, check for a request matching:
//js.hs-scripts.com/{Portal ID}.js
Open the widget and send a test message. Check that it reaches the service inbox. Test a logged-in account if you enabled Pass Customer Data, and verify which identity fields the service receives. Finally, test the excluded pages and mobile devices.
Publish and configure your chatflow in HubSpot. Manage appearance, inbox routing, meetings and CRM behavior in HubSpot.
Troubleshoot
- If no loader is output, check Enable HubSpot Chat, Portal ID, Show on Pages and Show on Mobile.
- If the page is idle, wait for the fallback or interact with it. Fallback Delay (seconds) set to
0does not mean immediate loading. - If saving fails, keep the identifier filled in, check its format, reload the configuration page and retry. Do not use placeholder credentials for a live test.
- If the external request fails, check browser console errors, script blocking, Content Security Policy and any consent tooling on your shop.
- If the script loads but the launcher is absent, check your service-side widget publication, account availability and display rules.
- If a customer field is missing, log in and confirm Pass Customer Data is Yes. Compare with the exact fields listed above.
- If another integration also inserts the service script, check the rendered page for duplicate or conflicting installation code.
Check a custom theme
Your theme must execute the closing-body hook. A developer can restore this call before </body> where the theme lacks it:
{hook h='displayBeforeBodyClosingTag'}
For a theme template adjustment, copy:
modules/mprhubspotchat/views/templates/hook/displayBeforeBodyClosingTag.tpl
to:
themes/your-theme/modules/mprhubspotchat/views/templates/hook/displayBeforeBodyClosingTag.tpl
Keep the module's Smarty variables and identifier escaping. The shared interaction wrapper still applies to this hook template.
Configuration reference
The form uses the MPRHSCHAT_ prefix for submitted field names. Current storage uses module mprhubspotchat in the shared mpr_config table, with short keys:
ENABLED
PORTAL_ID
SHOW_MOBILE
PAGES
DELAY
PASS_USER_DATA
The database table uses your shop's table prefix, so ps_mpr_config is only an example name. Use the configuration form for normal changes. Do not treat form-field names as the current database keys.
Disable or uninstall
Set Enable HubSpot Chat to No and save with the identifier still present to pause this module's output. You can also disable the module in Module Manager.
To remove it, use Uninstall in Module Manager and confirm. The uninstall removes its module configuration and admin menu entries. It does not close the external service account or remove code inserted by another module or theme.
Questions
No questions about this module yet
Ask anything about installation, compatibility or setup. Answers appear here.
Known Issues
3
Outdated setup banner
Chat text gains extra escaping
Missing or damaged interface translations
Feature Requests
2
Implemented
HubSpot chat integration
Chat text by language
Changelog
v1.1.132026-09-20
- Addedcomplete FR/DE/ES/IT/PL translations
Older releases
v1.3.02026-04-20
- Addedadmin menu management via MenuInstaller for streamlined module setup
v1.2.02026-02-08
- Addedfull compatibility with PrestaShop 9.x and Hummingbird theme
- Addedmeeting scheduler embed: customers can book calls directly from the chat widget
- Improvedchatbot flow targeting — configure separate flows for product, cart, and checkout pages
- Fixedidentity token not refreshing for long-lived logged-in sessions
- AddedCRM contact property sync: passes customer group and last order date to HubSpot
v1.1.02025-07-15
- Addedvisitor identification for logged-in customers using HubSpot identity verification token
- Improvedwidget load deferral — script loads after page interactive to preserve LCP
- Fixedwidget appearing on thank-you page despite that page being in the exclusion list
- Addedchatflow routing rules editable from within module settings
v1.0.02025-05-05
- Initialrelease: HubSpot Live Chat widget integration for PrestaShop
- InitialSingle tracking code configuration — connects to HubSpot CRM instantly
- InitialPage-level display rules to show or hide the widget by controller
- InitialFree HubSpot CRM bundled — all conversations stored and searchable without extra cost
Demo
Test the full module before you buy
Buy a licence later and keep your settings.
- Your 30-day demo Test it on your own shop for 30 days from the first install.
- Ready demo shop Explore a ready demo shop in your browser.
- No registration No account, email or store domain needed.
By downloading, you accept the demo terms and privacy policy.
By opening this demo you accept the demo terms and the privacy policy.