Skip to main content
Answered

Intercom integration in angular 15

  • November 5, 2024
  • 4 replies
  • 137 views

How to integrate intercom in angular 15 app ?

Best answer by agathaabigail17

To integrate Intercom in an Angular 15 app, include the Intercom JavaScript library in your HTML `<head>` element. Replace `APP_ID` in the provided code with your unique workspace ID. Then, call `window.Intercom('boot', {app_id: APP_ID, ...user details})` when a user logs in, as this is essential for SPAs like Angular, where page refreshes are rare. For detailed instructions, refer to the official Intercom SPA integration documentation.

View original
Did this topic help you find an answer to your question?

4 replies

   


mateusz.leszkiewicz
Intercom Team
Forum|alt.badge.img+5

Hi @Johannes Wallner,  It’s Mat from the Support Engineering Team 😀

To integrate Intercom in an Angular 15 app, you should start by including the Intercom JavaScript library file in your HTML head element. The code snippet provided in the documentation needs to be customized with your unique workspace ID, referred to as APP_ID in the code. After this initial setup, when you have a logged-in user on your site, you should make a call to window.Intercom('boot', {app_id: APP_ID, ...other attributes}) with the user's details. This is a necessary step for single-page applications like those built with Angular, which are characterized by few page refreshes and lots of asynchronous JavaScript. For complete details, you can refer to the documentation on integrating Intercom in a single-page app. Additionally, the linked documentation provides further instructions and best practices for integrating Intercom in a SPA environment.

 


  • New Participant
  • 2 replies
  • Answer
  • November 7, 2024

To integrate Intercom in an Angular 15 app, include the Intercom JavaScript library in your HTML `<head>` element. Replace `APP_ID` in the provided code with your unique workspace ID. Then, call `window.Intercom('boot', {app_id: APP_ID, ...user details})` when a user logs in, as this is essential for SPAs like Angular, where page refreshes are rare. For detailed instructions, refer to the official Intercom SPA integration documentation.


  • New Participant
  • 2 replies
  • February 10, 2025

To integrate Intercom in an Angular 15 app you can try this steps:

  • Install Intercom SDK:
    npm install ngx-intercom
    
  • Import in app.module.ts:
    import { IntercomModule } from 'ngx-intercom';
    @NgModule({
      imports: [IntercomModule.forRoot({ appId: 'your-app-id' })]
    })
    
  • Use in components:
    constructor(private intercom: Intercom) {}  
    this.intercom.boot({ user_id: '12345' });
    

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings