Pass parameters to an embedded Hubspot meeting link

Hi,

I have my own website, and a form there is taking the information and pass the users directly to HS schedule a meeting form. I am trying to pass parameters from my website to the embedded hubspot meeting component.

This is the code that I am using to achieve it:

 var link = "https://meetings.hubspot.com/a/consultation-call?embed=true&email=" + email;
 document.getElementById('meeting-link').setAttribute('data-src', link);
 let scriptEle = document.createElement("script");
 scriptEle.setAttribute("src", "https://static.hsappstatic.net/MeetingsEmbed/ex/MeetingsEmbedCode.js");
 scriptEle.setAttribute("type", "text/javascript");
 document.body.appendChild(scriptEle);

Unfortunately, the email is not passed to the embedded meeting component.
Any idea on how to resolve it? Or what am I doing wrong?

Hi, @omriubeya :waving_hand: Thanks for the question. I have a few troubleshooting questions that can help the community better understand your challenge.

  • have you tried logging the value of `email` to the console using `console.log(email)` before constructing the link to verify its value?
  • have you checked the browser’s network tab or console for any errors related to loading or executing the script?
  • have you tried adding a callback function? In case, there is a delay before the script is fully loaded?

Thanks for the additional information! — Jaycee