We assume that you have already configured your GeoBooster JS widget and now you want to add it to your Wix website.
Go to https://users.wix.com/signin and sign in with your administrator credentials.
Select your website on the "Sites" page and click on the "Select & Edit site" button.
You will be redirected to your website dashboard. Click "Settings" in the side menu to the left.
Scroll down to the "Advanced" section, and click the "Custom code" button.
On the "Custom Code" page click the "Add Custom Code" button.
Return to Local Viking, go to GeoBooster->Widgets, click on your widget, go to the "Embed code" section, and copy the widget code snippet.
Return to Wix. Fill out the "Add Custom Code" dialog as shown below. Paste the widget script in the field "Paste the code snippet here", specify the name of the snippet (for example, GB Widget), select the page to add the widget to, and place to add the widget code, we used "Body - end" here.
Add to the widget snippet the line
data-container-id="gb_widget"
, so your widget code will look like this:
<script
id="gb_widget_script"
type="module"
src="https://gb-widget.localbusinessreporting.com/gb-widget.js"
data-container-id="gb_widget"
data-widget-token="1234567890123456789abcdef">
</script>
Click the "Apply" button.
Click the "Site & App"->"Website" in the side menu to the left.
Click the "Edit Site" button.
Wix editor opens. Select the page you want to add the widget to from the dropdown.
Add a new blank section to the website layout at the place where you want to add the widget: click the "+ Add Section" button, then select the "+ Blank Section" in the side menu.
Click the "Add Elements" button in the toolbar.
Select "Embed Code"->"Custom"->"Custom Element".
A new custom element will be added to the website layout. Please adjust its size if you need to.
Click the "Set Attributes" button.
The "Element Attributes" dialog opens. Click the "Set Attributes" button.
Set "Attribute name" equal to
id
and "Value" equal togb_widget
, then click the "Set" button.
Click the "Choose Source" button.
The "Element Attributes" dialog opens. Scroll it down, set the "Tag name" equal to
gb-widget
then press "Enter" and close the dialog.
Click the "Save" button in the top toolbar, then the "Publish" one.
Congratulations! You've successfully embedded the GeoBooster widget into your website.