BorgafjallHotell Posted November 14, 2022 Share Posted November 14, 2022 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
Wolfsilon Posted November 14, 2022 Share Posted November 14, 2022 Hi, Normally, the base script will go into the header code injection, the widget script will go in the footer code injection, and the html goes within the code block on the page you want it to be displayed. Hope this helps! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment