
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
next-intercom
Advanced tools
create intercom chat composer in any browser or on the server using javascript. Keep messager up across SSR pages. Easy drop in for Next.js Extra configuration for priority adjustments to keep the main thread unblocked.
yarn install next-intercom
On the client or you can use the script on the server like Next.js using the ssr toggle.
If your using Next.js you can simply just add the process.browser for ssr to render intercom SSR and have it loaded initally.
const { loadIntercom, initIntercomWindow } = require("next-intercom");
/*
Generate the intercom script and load the composer
*/
loadIntercom({
appId: "myintercomappid", // default : ''
email: "someEmail@gmail.com", //default: ''
name: "Some Name", //default: RandomName
ssr: false, // default: false
initWindow: true, // default: true
delay: 0, // default: 0 - usefull for mobile devices to prevent blocking the main thread
});
// If init was set to false initiate the window when needed
initIntercomWindow({ appId: "myintercomappid", email: "someEmail@gmail.com" });
example using on the server
const { createIntercomSSR } = require("next-intercom");
// Optiobal appId property unless app was not established: example in nodejs, make sure to globally set fetch to your request type like axios etc
app.get("/intercom", (req, res) =>
createIntercomSSR({
appId: req.query.appId,
})
);
Or use in a fetch like manner if needed from the server or clientside. This returns the script for intercom inline for usage.
const { createIntercomSSR } = require("next-intercom");
async function fetchIframe() {
const intercomScript = await createIntercomSSR(appId);
return intercomScript;
}
Stop intercom and close composer.
const { shutdownIntercom } = require("next-intercom");
shutdownIntercom();
Track an Intercom event.
const { trackEvent } = require("next-intercom");
var metadata = {
invitee_email: 'pi@example.org',
invite_code: 'ADDAFRIEND'
};
trackEvent('invited-friend', metadata)
Simply get started with intercom in your app using javascript.
The intercom constructor using window.Intercom('method')
FAQs
create intercom composer with 0 dependencies on the client or server.
The npm package next-intercom receives a total of 4,010 weekly downloads. As such, next-intercom popularity was classified as popular.
We found that next-intercom demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.