Install PLuG search

To get the PLuG search widget to appear on your website and web app, insert the code snippet provided below on every page where you want the widget to appear for website visitors.

Unique app ID

Ensure to replace the app ID with your app ID which identifies your PLuG search widget. You can access your app ID from your DevRev account by following these steps.

  1. In DevRev, go to Settings > Support > PLuG Settings through the settings icon in the top-left corner.
  2. Click Enable PLuG Widget if it isn’t already enabled.
  3. Copy your Unique App ID from the Configuration tab.

Place the following code in the <head> section of your HTML page:

1<script
2 src="https://plug-platform.devrev.ai/static/plug.js"
3 type="text/javascript">
4</script>

Place the following code in the <body> section of your HTML page:

1<script>
2 window.plugSDK.init({
3 app_id: '<your_unique_app_id>',
4 disable_plug_chat_window: true,
5 });
6
7 window.plugSDK.onEvent((payload) => {
8 if (payload.type === 'ON_PLUG_WIDGET_READY') {
9 window.plugSDK.initSearchAgent();
10 }
11 });
12</script>

To toggle searchAgent, call the following method on any event required:

window.plugSDK.toggleSearchAgent();

To prefill search input from outside the window, call the following method:

window.plugSDK.prefillSearchQuery(query:"string")

You should now have the PLuG search widget installed on your website. Facing some issues? Reach out to us through our own PLuG chat widget from the bottom right of your screen.

Once the widget is installed on your website, every user who visits your website is considered an anonymous user. Anonymous users are the users that come to your site and haven’t yet logged in or shared any information.

After integrating the PLuG widget, you can personalize and contextualize customer engagement. Learn how to identify your customers and update their information.