GitBook doesn't run your own scripts, so put the box on your main site and point it at your GitBook docs.
Your main site's HTML, where the box should show
<div data-everypage-site="YOUR-SITE-ID"></div>
<script src="https://askthissite.com/embed.js" async></script>
Add your docs address (e.g. docs.example.com) as the site; the box answers from your GitBook pages.
Your site id is on your site's page after you sign up.