Jump to content

Adding code widget from third party software?

Recommended Posts

So this is the code ive been provided with:

I cant seem to figure out how i should put it on our website...

I think the base script should be injected in the header/footer and the HTML is the widget script? I just dont know where to put my "Widget script"

website url: https://gar-nectarine-yjtx.squarespace.com/

Base script:

                        
<script charset="UTF-8" type="text/javascript" src="https://online.bookvisit.com/Content/flexwidget/FlexWidgetFullScripts.min.js"></script>
                        
                    

Widget script:

                        
<script charset='UTF-8' type='text/javascript'>
(function($) {
$.ajax({
dataType: 'json',
url: 'https://online.bookvisit.com/v2/widget/getwidget?channelId=b0fce848-6879-47dd-917b-17ec23301cbe&culture=sv-SE&containerId=widgetContainer&layout=Standard2ColumnsCompact&openOption=NewWindow&displayPromoCode=False&displayCorpCode=False&displayIATACode=False&jsoncallback=?',
xhrFields: { withCredentials: true },
success: function(json) {
$('#widgetContainer').html(json.Widget);
}
});
})(bvJQuery);
</script>

                    
                

HTML:

                        
<div id='widgetContainer'></div>
                    
           
Link to comment
  • Replies 1
  • Views 303
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.