Hello,

I want to implement a chat sistem into my website, but when i put my custom JS code nothing is happening.

This is the code:

<script type="text/javascript">
        var _basePath = window.location.protocol + "//" + window.location.host + "/";
        var _mdtCIC_configs = { CampaignID: 'xxxxxxxxxxxxx', ProxyPath : _basePath/*'http://xXXXxIPxXXXXx/' */ };
        document.write('<script type="text\/javascript" src="' + _basePath + 'chat\/mcic_chat.js"><\/script>');
    </script>

Thanks!

    Hi Mihnea ,

    Welcome to the Buttonizer Community!

    Have you seen our knowledge base article about the custom JavaScript click action? https://community.buttonizer.pro/knowledgebase/34

    Also, you do not need the <script type="text/javascript"> tags when using the custom JavaScript click action.

    Quick question, what chat API is this? Because, they might have an API you can use instead and leave that part of the code in the footer of your website.

    Let me know 🙂

      Hello Jasper,

      1. I've seen the articles but i can't figure what fits me.

      2. I deleted <script type="text/javascript"> and now the windows is turning white blank page.

      3. I can use this link https://##URL_TO_MCIC##/WFClient?WidgetType=WFClientChatWidget&CampaignID=##CAMPAIGN_KEY##&ClientName=
        But it opens the chat into another tab as fullscreen instead a popup window.

      Thank you!

        5 days later

        Hi @Mihnea ,

        I see you have this link straight to the chat.

        Mihnea https://##URL_TO_MCIC##/WFClient?WidgetType=WFClientChatWidget&CampaignID=##CAMPAIGN_KEY##&ClientName=

        You can combine this with the javascript button action to open this link in a popup window.
        use the following javascript code to open it in a small popup window, without toolbar:

        window.open('http://www.google.com', '_blank','toolbar=no,width=250,height=250')

        Where obviously you would replace http://www.google.com with the chat link you posted.

          Castor

          Thanks alooot, but this is a temporary solution, because I would like to customize this window. (like https://ro.kruk.eu/clienti-cu-datorii - From the same chat provider). I WOULD APPRECIATE SO MUCH

          Also, the windows is openeing in the top left corner, can I open in the bottom right corner?

          Thank you!

          Hi @Mihnea ,

          What chat provider is this? So I can do some research.

          Mihnea
          Thanks. I see this is a paid service, furthermore I can't really find any documentation or instructions to help you with this. I think it's better you contact them for help on getting the widget working using the javascript code. Buttonizer is just running the code you are providing, and it seems that you should be able to get it working with that, but I cannot help you with the content of the javascript code.

          Ok, I understand,

          How can I insert a folder with css and js files on my website and just call them in buttonizer JS editor?

          22 days later

          Hi @Mihnea ,

          This goes beyond our plugin and I really have limited knowledge of this. I would guess that you could insert <style> (js) and <script> (css) tags into your website (perhaps with a plugin, or maybe just with the normal page editor?). The buttonizer code can run the same things that you would be able to run inside your browser's javascript console.

          Since your chat plugin/service requires you to insert this code into your website, I think you will have better luck with their support, or on a Wordpress helpdesk forum.