Add the widget to your website

Any website can show the ParsChat widget with a short piece of code. On WordPress, the WordPress plugin does this for you.

1

Create a widget service

Open your robot, go to Service and click connect to widget. Give the service a name and enter your website’s base address (it must start with https://). Click Register and activate the service.

If the robot already has a widget service, open it instead. Each robot has one service of each type.

Creating the widget service

Creating the widget service
2

Copy the code

Copy the code shown in the panel. It looks like this and carries your service’s own token:

The code, ready to copy

The code, ready to copy
<script src="https://pars-prod-pub.s3.ir-thr-at1.arvanstorage.ir/plugin/parschat_plugin_main.js"></script>
<script>
new ParsChat({
serviceToken: "YOUR_SERVICE_TOKEN"
})
</script>

Copy the code from your panel, not from this page. The serviceToken is unique to each service and is filled in for you there.

3

Add it to your site

Paste the code just before the closing </body> tag.

If your pages share a template, paste it once into that template and the widget appears on every page.

4

Check it

Open your site in a browser. The chat widget should appear in the corner of the page.

The widget doesn’t appear

  • Check the code was copied complete and unchanged.
  • Check the serviceToken value is correct.
  • Open the browser console and look for errors.
  • If your site uses a cache or CDN, clear it so visitors get the updated pages.

Next

Change the widget’s look and position in Widget appearance.