Installing a Multilingual Widget on Your Wix Site

Add a widget to your Wix site that automatically displays in whichever language your site is being viewed in.  
Important:
This article refers to adding your Widget to a site created on Wix.com. If your site was not created on Wix, click here for instructions.
Before you begin:
  • Your Wix site must be upgraded to a Premium Plan. Learn How
  • Use Wix Multilingual to create a site in more than one language. If you don't see subdomains for a secondary language, delete the language and re-add it. 
  • Your domain must be either purchased from Wix, transferred to Wix, or connected via name servers. These instructions do not apply if you connected your domain via pointing. Learn More
Note:
We're currently in the process of releasing a new version of the Wix Answers Widget. If you don't see the steps below in your widget settings, click here for directions. 

Step 1 | Create Your Widget's Embed Code

First, create the code you'll use to embed your Widget on your Wix site. 
  1. Copy the following code: 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<script>
    (function(){
         var w=window;
         function l(){
             var d=document;
             var aws=d.createElement('script');
             aws.type='text/javascript';
             aws.async=true;
             // Array of languages enabled in Wix Answers Widget
             var supportedLanguages = ['en','fr','es','de','pt','it','ru','pl','zh','da','nl','ja','no','sv','he','ko'];
             var checkLocale = window.location.host.split('.')[0];
             if (supportedLanguages.indexOf(checkLocale) != -1) {
               var locale = checkLocale;  
            }
             else {
               // Default fallback language
               var locale = 'en';
             }
'https://{ACCOUNT}.wixanswers.com/apps/widget/v1/{ACCOUNT}/{WIDGET-ID}/' + locale + '/embed.js';                    aws.onload = aws.onreadystatechange = function() {
                 var rs = this.readyState;
                 if (rs && rs != 'complete' && rs != 'loaded') return;
               //   try {
               //   } catch (e) {}
             };
             var s=d.getElementsByTagName('script')[0];
             s.parentNode.insertBefore(aws,s);
         }
         if(w.addEventListener){
             w.addEventListener('load',l);
         }else{
             w.attachEvent('onload',l);
         }
        })()
</script>
Important:
If English is not your site's default language, replace en in line 17 with the default language's abbreviation. For example, if your site's default language is French, the line should read: var locale = 'fr';  
  1. Paste the code into a separate document (such as CodePen, Notepad, or TextEdit). 
  2. Replace {ACCOUNT} in both places on line 19 with the first part of your Wix Answers URL (e.g., if your URL is support.wixanswers.com, then replace with "support"). 
  1. Replace {WIDGET-ID} with your Widget's ID. 
5.  Copy the code you've created in this step so you can paste it in the next step. 

Step 2 | Add the Code to Your Wix Site

Next, add the code in your Wix site's Tracking & Analytics.  
  1. Log in to your Wix account. 
  2. Access the Wix Editor for the site in which you're installing your Widget. 
  3. Click Settings at the top editor menu bar and select Tracking & Analytics
  4. Click + New Tool and select Custom
  5. Paste the code in field: Paste the code snippet here:
  1. Enter a name for your custom code in the Name field. 
  2. Click the Load code once drop-down and select Load code on each new page
  1. Click Apply
  2. Refresh your live website to view your Widget. 
Note:
Currently, adding more than one widget per page is not supported by Wix Answers. 

Related Articles

Installing a Widget on Your Wix Site

Allow visitors to review articles or reach out for help from any page on your Wix site. To embed your Widget, copy its code and add it to your site's Tracking &amp; Analytics. Repeat the steps below for each language in which you'd like to install your Widget. Important:This article refers to adding your Widget to a site created on Wix.com. If your site was not created on Wix, click here for instructions.If you're using Wix Multilingual, you can install a widget that displays in whichever language your site is being viewed in. Learn HowBefore you begin:To install a widget on your Wix site, your site must be upgraded to a Premium Plan. Learn HowNote:We're currently in the process of releasing a new version of the Wix Answers Widget. If you don't see the steps below in your widget settings, click here for directions. Step 1 | Copy Your Widget's CodeFirst, log in to your Wix Answers account and copy the install code for your Widget. Log in to your Wix Answers account.Hover over Settings  and click Widgets.Hover over the widget you'd like to install and click the Vertical Show More icon .Click Install on site.Click Copy Code next to the language of the widget you're installing.  Step 2 | Add the Code to Your Wix SiteNext, paste the code in your Wix site's Tracking &amp; Analytics.  Log in to your Wix account. Access the Wix Editor for the site in which you're installing your Widget. Click Settings at the top editor menu bar and select Tracking &amp; Analytics. Click + New Tool and select Custom. Paste the code in field: Paste the code snippet here:Enter a name for your custom code in the Name field. Click Apply. Note: Leave All pages - Load code once and Place Code in: Head selected.Refresh your live website to view your Widget. Note:Currently, adding more than one widget per page is not supported by Wix Answers. 

2 min read

Installing a Widget on Your Website

Install your Widget to allow visitors to review articles or reach out for help from any page on your site. To embed your Widget, copy its code and add it to your site's HTML code. Repeat the steps below for each language in which you'd like to install your Widget. Have a Wix site?Learn how to add your Widget to your Wix site. Before you begin:Create your Widget and customize it to fit the needs of your customers and your business. Note:We're currently in the process of releasing a new version of the Wix Answers Widget. If you don't see the steps below in your widget settings, click here for directions. To install your Widget on your website:Hover over Settings  and click Widgets.Hover over the widget you'd like to install and click the Vertical Show More icon .Click Install on site.Click Copy Code next to the language of the Widget you're installing.  Paste the code into the body of the HTML at the top of the page(s) in which you want the widget to appear.Note:Currently, adding more than one widget per page is not supported by Wix Answers. 

1 min read

Creating a New Widget

Allow customers to get help without navigating away from your product or website with the Wix Answers Widget. Create a widget to present knowledge base articles and allow customers to get support via contact form, Live Chat, or phone support. Create as many widgets as you need and tailor them to the locations where you are adding them. Note:We're currently in the process of releasing a new version of the Wix Answers Widget. If you don't see the steps below in your widget settings, click here for directions. To create a new widget:Hover over Settings  and click Widgets.Click Create New Widget.Enter a name for your Widget and click Create Widget.Next:Customize your WidgetAdd contact options to your WidgetAdd a contact widget to your Help CenterAdd your Widget to your non-Wix websiteAdd your Widget to your Wix site

1 min read

Customizing Your Widget

Tailor your Widget to your business' needs by customizing its components, appearance, and more. While customizing your Widget, preview its look and behavior at the right side of your screen. Note:We're currently in the process of releasing a new version of the Wix Answers Widget. If you don't see the steps below in your widget settings, click here for directions. Customizing Your Widget's Structure &amp; ContentCustomize your Widget's content and components from the Structure &amp; Content tab. Show me howHover over Settings  and click Widgets.  Hover over the Widget you'd like to customize and click Edit.(For multilingual widgets): Click the language next to Settings for and select a language. Customize your Widget's Header Text:Enter a title for your Widget.(Optional): Click Display Subtitle and enter a subtitle for your Widget.Click Confirm. Customize your Widget's Launcher Text:Click Add a Welcome Message and enter your message. Click Delay the Welcome Message and enter the amount of seconds you'd like to delay your message. Click Confirm.Choose the components and the order in which they appear in your Widget:Add: Click Add Component and select a component to add it to your Widget. Manage: Click Manage next to a component to edit it. Remove: Click the Vertical Show More icon  and select Remove component. Hide contact option: Click the Toggle to enable or disable a contact option. Reorder component: Click and drag the Reorder icon  to reorder a component. Learn more about:Setting up your Widget's contact optionsChoosing which articles customers can access in your WidgetAdding a Custom HTML Box to your WidgetCustomizing Your Widget's Design &amp; BrandingCustomize your Widget's appearance, icon, and position from the Design &amp; Branding tab. Show me howHover over Settings  and click Widgets.  Hover over the Widget you'd like to set up and click Edit.Click the Design &amp; Branding tab. Edit the Widget Appearance settings:Choose your Widget colors: Click Edit in the Header &amp; Launcher Color section and enter a HEX number. Click Edit in the Action Color section and enter a HEX number. Select a background pattern next to Background. Click the Font drop-down menu and select a font. Click the Hide the Wix Answers Banner checkbox to hide the &quot;Powered by Wix Answers&quot; message that appears at the bottom of the widget. Edit your Icon Appearance settings:Select the icon customers click to open your Widget next to Image. Customize the Shape &amp; Size of the Widget icon:Click Large or Small to select an icon size. Click and drag the Shape slider to make your icon's corners more or less round. (Optional) Click the Make Your Icon &amp; Widget Draggable checkbox to allow customers to click and drag your Widget to anywhere on their screen. Edit the Widget Position settings:Select a Position icon to choose which side of the screen your Widget appears. Click the Side Spacing arrows to adjust the distance between your Widget and the side of the screen.Click the Bottom Spacing arrows to adjust the distance between your Widget and the bottom of the screen.Click Update at the top of the page.Customizing Your Widget's Advanced SettingsOn the Advanced tab, you can customize the widget text for each language, add custom CSS and scripts, whitelist domains, and restrict access to authenticated users. Show me howHover over Settings  and click Widgets.  Hover over the Widget you'd like to set up and click Edit.Click the Advanced tab. Edit your Widget's Advanced settings:Translate the text for each of your supported languages:Click Edit next to the relevant language.    Scroll to the text you'd like to translate or enter it in the Search field. Click the text under Line and translate it.Note: Hover over the text and click Revert on the right to revert it. Click Save.Add custom code:Custom CSS: Click + Add CSS, enter your CSS code and click Save.Custom Script: Click + Add Script, enter your JavaScript code and click Save.Whitelist domains:Click Edit in the Domain Whitelisting section.    Enter the domain(s) you'd like to allow your Widget to be displayed on.Note: Press Enter on your keyboard to add multiple domains. Click Save.Click the Restricted Access toggle  to make your Widget only accessible to authenticated users. Learn how to:Add a contact widget to your Help CenterEmbed a contact widget on your non-Wix websiteEmbed a contact widget on your Wix site

4 min read