Skip to Content
Embed Buttons

Add a Booking Form to Shopify

Add the Avenue booking form to a Shopify store by pasting the embed script into your theme's theme.liquid. No app to install; it shows on each store page.

Add Avenue's booking form to a Shopify store by pasting the embed script above </head> in your theme's theme.liquid. No app needed; the Book Online button shows on every storefront page except checkout. Stores that also offer a service, like fitting, installation or repairs, use it to take the booking on the same site as the shop.

What you'll need

  • Access to your Shopify admin as the store owner, or as staff who can edit themes.
  • Your Avenue embed code, sent to you by email when your form was set up.

How it works

The embed code is one line of script that goes in your theme's header. Once it's in, the Book Online button and the quick actions appear on every page of your storefront, and they keep working when you change products or pages.

Your embed code looks like this:

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

Shopify doesn't need an app for this. You paste the line into one theme file.

Add the embed code

Open your theme's code

  1. In your Shopify admin, go to Online Store > Themes.
  2. On your current theme, click the … button, then Edit code.

Open the layout file

  1. In the file list on the left, open the Layout folder.
  2. Click theme.liquid.

Paste the embed code

  1. Find the line that reads </head>, usually in the first 50 lines. Press Cmd+F (or Ctrl+F) and search for it.
  2. Paste your Avenue embed code on its own line just above </head>.
  3. Click Save.

Check your store

  1. Open your store in a new tab and refresh the page.
  2. The Book Online button appears in the corner, with the quick actions beside it.
  3. Click it to check the form opens over your page.

What happens next

  • The Book Online button sits in the corner of every storefront page, on desktop and on phones.
  • Open your store 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

  • Your browser is showing a cached page. Refresh with the cache cleared, or open the store in a private window.
  • The code was pasted near </body> or inside a section file instead of just above </head> in theme.liquid. Move it.
  • The script was pasted twice, in two places in the theme or in an app embed as well. Keep one copy and remove the rest.
  • You edited a theme that isn't the one published. Check which theme is live under Online Store > Themes.

Good to know

  • Changing themes. The code lives in the theme, not the store. If you switch to a new theme or publish a fresh copy, paste the code into that theme's theme.liquid as well.
  • The checkout. Shopify's checkout pages don't load your theme's header, so the button isn't shown there. Customers see it on every other page.
  • Your own Book Now button. Any button on your store can open the form. Give it the class open-avenue in the theme editor or the section's custom code. The embed buttons explain how.

Support

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