Widget for Angular 7 Website? | Community
Skip to main content

Widget for Angular 7 Website?

  • June 17, 2020
  • 4 replies
  • 0 views

We built our site with Angular 7...  is there some way to incorporate the Chat Widget? 

The regular HTML version won't work.


Thanks

4 replies

Christopher15

Hi Brett, we have the web widget enabled on an Angular 8 site. We put the widget <script> in the head of the main index.html file.


  • August 31, 2020

Good evening Chris, hope you are great. Thanks for the awesome work

Does this work when the project is not in production ie. running on my localhost? I keep getting this error whether I put script in the head or body.

GET http://localhost:4200/%E2%80%9Chttps://static.zdassets.com/ekr/snippet.js?key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%E2%80%9D net::ERR_ABORTED 404 (Not Found).

Any help will be greatly appreciated!

 


Christopher15

Hi @Joseph Cobbinah, it works fine for us in development mode. The error suggests that maybe it's trying to load it as a relative url, rather than an absolute url. Check your code and make sure that angular isn't trying to do anything other than load the exact url you've provided.


  • January 9, 2021

I have it working on an Angular 8 app. Simply added the widget script code to the index.html...However, due to Angular Routing I believe, Zendesk cannot track the visitor page. It is always shown as the root domain. Considering the number of Angular apps out there now, it would be smart for Zendesk to build an ngx Zendesk Chat module that CAN track the visitor pages within an Angular app.