Hello @Guseinova,
I have updated the code and use this:
function widget_code() {
if ( !is_page( 1551 ) ) return false; ?>
<div class="ja-gadget-virtual-assistant-inline cleanslate">
<link rel="stylesheet" href="https://components.justanswer.com/css/ja-gadget-virtual-assistant-inline" />
<script type="text/javascript" src="https://components.justanswer.com/js/ja-gadget-virtual-assistant-config,ja-gadget-virtual-assistant-inline">
(function(){
require("ja-gadget-virtual-assistant-inline")(
(function() { var scripts = document.querySelectorAll('script[src="https://components.justanswer.com/js/ja-gadget-virtual-assistant-config,ja-gadget-virtual-assistant-inline"]'); return scripts[scripts.length - 1].parentNode })(),
require("ja-gadget-virtual-assistant-config")({"partner":"US","affiliateId":"ho|7576|1912","profile":"vet","settings":"default","size":"450x400","showCopyright":false,"trackingPixels":{"transition":"https://trk.justanswer.com/aff_c?offer_id=2&aff_id=7576&file_id=1912&source=Fixed VA"}})
).initialize();
})();
</script>
</div><img src="https://trk.justanswer.com/aff_i?offer_id=2&aff_id=7576&file_id=1912&source=Fixed VA" width="1" height="1" />
<?php
}
add_action( 'x_before_site_begin', 'widget_code' );
It is now loaded on the page. The ad on the other hand does not display anything. Please make sure that you have given us the correct ad code:
<div class="ja-gadget-virtual-assistant-inline cleanslate">
<link rel="stylesheet" href="https://components.justanswer.com/css/ja-gadget-virtual-assistant-inline" />
<script type="text/javascript" src="https://components.justanswer.com/js/ja-gadget-virtual-assistant-config,ja-gadget-virtual-assistant-inline">
(function(){
require("ja-gadget-virtual-assistant-inline")(
(function() { var scripts = document.querySelectorAll('script[src="https://components.justanswer.com/js/ja-gadget-virtual-assistant-config,ja-gadget-virtual-assistant-inline"]'); return scripts[scripts.length - 1].parentNode })(),
require("ja-gadget-virtual-assistant-config")({"partner":"US","affiliateId":"ho|7576|1912","profile":"vet","settings":"default","size":"450x400","showCopyright":false,"trackingPixels":{"transition":"https://trk.justanswer.com/aff_c?offer_id=2&aff_id=7576&file_id=1912&source=Fixed VA"}})
).initialize();
})();
</script>
</div><img src="https://trk.justanswer.com/aff_i?offer_id=2&aff_id=7576&file_id=1912&source=Fixed VA" width="1" height="1" />
Regards.