-
Notifications
You must be signed in to change notification settings - Fork 43
[WEB-4261] Open Hubspot chat when conversation Meta tag is present #2528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
73697c8
to
d8d7643
Compare
Forgive me for being a dumbo tester but what journey are you talking about with the review links provided? Should I be expecting something to pop up on one of them? |
@jamiehenson When you visit both of them, you'll see the Hubspot conversation popup. Left more thorough review notes on the Voltaire PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one @matt423 👏
The meta tag is populated from the website proxy. When it's present, open the Hubspot chat. Hubspot will be configured to only open if agents are online, which is why no additional status checks are needed.
d8d7643
to
d643236
Compare
Description
When the conversation meta tag is present, open the hubspot chat with the relevant query parameter.
Testing
Use review app to complete journey below. On the last page visit, the chat should popup
Platform
Chat Setup
Copilot Summary
This pull request introduces new functionality to the Hubspot integration by adding the ability to open the chat widget based on a meta tag in the document. The changes include updates to the test cases, global window interface, and the main Hubspot function.
New functionality for Hubspot integration:
src/external-scripts/hubspot.ts
: AddedopenFromMetaTag
function to check for a meta tag and open the chat widget if it exists. Updated thehubspot
function to registeropenFromMetaTag
as a callback forhsConversationsOnReady
.src/external-scripts/hubspot.ts
: Extended the globalWindow
interface to includehsConversationsSettings
andhsConversationsOnReady
properties.Test cases for new functionality:
src/external-scripts/hubspot.test.ts
: Added test cases foropenFromMetaTag
to verify the chat widget opens when the meta tag is present, does not open when the meta tag is absent, and correctly sets the URL query parameter based on the meta tag content.Checklist