avenue-logo
Setup

GoDaddy

Add Avenue embed to your GoDaddy website

Add Avenue to GoDaddy

This guide shows how to add the Avenue booking form to a website built with the GoDaddy Website Builder.

Prerequisites

Before you begin, make sure you have:

  • Access to your GoDaddy account
  • A published GoDaddy website you can edit
  • Your Avenue embed code (sent to you via email)

How It Works

The Avenue booking form is added to your site with a small piece of code. GoDaddy lets you drop this code in using its built-in HTML section, and once it's in place the booking button appears on your site automatically.

Your embed code looks like this:

<script src="https://embed.avenue2.au/loader.js" data-public-token="YOUR_TOKEN"></script>

GoDaddy has a built-in HTML section that makes adding it easy.


Adding the Embed Code

Step 1: 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

Step 2: 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

Step 3: 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

Step 4: Paste the Embed 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
<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>

Step 5: Check the Preview

  1. Once the code is added, the Avenue booking button should appear in the editor preview
  2. Click Done to save the section

The Avenue Book Online button showing in the preview

Step 6: Publish and Verify

  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. You should see the Avenue booking button appear — you're all set

Support

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