Skip to Content
Embed Buttons

Add a Booking Form to GoDaddy

Add the Avenue booking form to a GoDaddy Website Builder site: add an HTML section, paste the wrapper code with your token, then publish.

Add Avenue's booking form to a GoDaddy Website Builder site by adding an HTML section to a page and pasting the code below with your token in it. Publish, and the Book Online button appears on your site.

What you'll need

  • Access to your GoDaddy account.
  • A published GoDaddy website you can edit.
  • Your public token, in the Avenue email you were sent when your form was set up.

How it works

The booking form is added to your site with a small piece of code. GoDaddy's Website Builder has a built-in HTML section for custom code, and once the code is in place the button appears on your site. Each step below shows the screen you'll see.

Add the embed code

Open your website

  1. Log in to your GoDaddy account and open your dashboard.
  2. Go to Websites and find the site you want to add Avenue to.
  3. Click Edit Website to open it in the GoDaddy editor.

Open Websites in the GoDaddy dashboard and click Edit Website

Add a new section

  1. Hover between any two sections of the page until the add toolbar appears.
  2. Click the + (plus) button to add a new section.

Hover between sections and click the plus button to add a new section

Choose the HTML section

  1. In the section menu, search for HTML.
  2. Select the HTML / Custom Code option to insert it.

Search for HTML and select the custom code section

Paste the code

  1. In the Title field, enter a name such as "Avenue Embed".
  2. Paste the code below into the Custom Code box.
  3. Replace YOUR_PUBLIC_TOKEN with the token from your Avenue email.

GoDaddy puts custom code in its own box, so this short wrapper puts the Avenue script into the page for you. Replace YOUR_PUBLIC_TOKEN and leave the rest.

<script>
(function() {
    // Only insert the Avenue script once
    if (window.avenue2ScriptInserted) {
        return;
    }
    window.avenue2ScriptInserted = true;

    function insertJS() {
        var head = window.parent.document.head;

        // Skip if the loader is already on the page
        var existingScript = head.querySelector('script[src="https://embed.avenue2.au/loader.js"]');
        if (existingScript) {
            return;
        }

        var jsScriptNode = document.createElement('script');
        jsScriptNode.setAttribute('type', 'text/javascript');
        jsScriptNode.setAttribute('src', 'https://embed.avenue2.au/loader.js');
        jsScriptNode.setAttribute('data-public-token', 'YOUR_PUBLIC_TOKEN');
        head.appendChild(jsScriptNode);
    }

    var start = Date.now();
    var interval = 9;

    function main() {
        var head = document.head;
        if (head) {
            insertJS();
        } else if (Date.now() - start > 10000) {
            return null;
        } else {
            setTimeout(function () {
                main();
            }, interval);
            interval *= 2;
        }
    }

    main();
})();
</script>

Check the preview

  1. Once the code is in, the Book Online button appears in the editor preview.
  2. Click Done to save the section.

The Avenue Book Online button showing in the preview

Publish

  1. Click Publish to push the change live.

Click Publish to push the change live

  1. Open your live website in an incognito or private browser window.
  2. Refresh the page.
  3. The Book Online button appears in the corner.

What happens next

  • The Book Online button sits in the corner of your site, on desktop and on phones.
  • Open your site and make a test booking so you can see it land in your dashboard.
  • The other quick actions, Request a quote, Text us and Call us, come with it wherever your form has them switched on. The embed buttons explain each one.

If the button doesn't show

  • The site hasn't been published since you added the section, or your browser is showing a cached page. Publish again and open the site in a private window.
  • The token is still YOUR_PUBLIC_TOKEN, or was pasted with a space or quote missing. Check it against your Avenue email.
  • The code was pasted twice, in two HTML sections or on two pages. Keep one copy and remove the rest.

Good to know

  • One section is enough. The HTML section sits on one page, but the button it loads shows across your site. You don't need to add it to every page.
  • Your own Book Now button. Any button or link on your site can open the form. Give it the class open-avenue and it works like the Book Online button. The embed buttons explain how.

Support

Contact Avenue support at info@avenue2.au if you need help adding the embed to your GoDaddy site.