APIs & Integrations

RTelyatnik
Member

Inject Hubspot Chat into Next.js app

Could you please tell, how to inject Hubspot chat widget to the Next.js app? Didn`t find any documentation for it.

0 Upvotes
3 Replies 3
MMalaya
Member

Inject Hubspot Chat into Next.js app

0 Upvotes
AA_AMPTech
Member

Inject Hubspot Chat into Next.js app

We have implemented it this way:

{/* Hubspot */}
<Script id="hs-script-loader"
src="//js-eu1.hs-scripts.com/25314488.js"
strategy={'lazyOnload'}

For some reason, it results to an error though which leads to sending a random form entry. Any ideas on how to solve this?

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Inject Hubspot Chat into Next.js app

Hey @RTelyatnik 

This is not next.js specific, but may help get you started.

@amjadg asked this question about chat in a React app.

@kierana and @Mark_Ryba had some useful insights.