Weebly Tips, Tricks & Tutorials

Learn how to customize and modify your Weebly site with new effects, plugins, and widgets.

Welcome to My Weebly Tricks, a resource for Weebly site owners who want to go beyond the basics. Here you'll find step-by-step guides on adding image effects, slideshows, navigation scripts, text animations, countdown timers, and more — all tailored for the Weebly platform.

"I love inserting new widgets and effects on Weebly templates. I like helping people and I like them more being my subscriber." — Domz (Domingo Tambasacan)

Add a custom cookie consent bar without a plugin

Adding a custom cookie consent bar without a plugin gives Weebly owners direct control over privacy messaging and button placement. It avoids app-directory dependencies, keeps the page lighter, and lets the notice match the design of a small business site rather than a generic template.

The key is to treat the banner as a transparency and consent tool, not decorative text. It should explain what runs on the site, give meaningful choices, remember the decision, and link to a current privacy policy. The code below uses native HTML, CSS and JavaScript in Weebly’s Head Code area.

Why a cookie notice matters for Australian sites

Cookies are not automatically unlawful in Australia. The Office of the Australian Information Commissioner explains that consent is not generally required for ordinary cookie use, but additional rules may apply when cookies support behavioural advertising, targeted marketing or other activities involving personal information.

If the Privacy Act 1988 and Australian Privacy Principles apply to your organisation, document the purpose of each tracking technology and obtain consent where required. A banner cannot repair unclear disclosures, excessive data collection or an outdated privacy policy, so legal review remains important for a commercial operation.

A native solution also suits the Australian market. Australian Weebly stores often advertise GST-inclusive AUD prices, manage postage options and use remarketing to bring shoppers back to product pages. These services should work regardless of a visitor’s privacy choice, and the checkout must never depend on accepting marketing cookies. For further Weebly customisation ideas, My Weebly Tricks provides a useful library of site improvements.

Choose consent categories and clear wording

Begin by separating cookies according to their function rather than lumping everything together. The banner should distinguish cookies required for security, forms, carts and other core functions from optional analytics, advertising, embedded media and audience-measurement technologies.

  • Keep essential cookies enabled because they support the website’s core operation.
  • Make “Reject non-essential” as accessible and obvious as “Accept all”.
  • Identify each optional category and explain its purpose in plain English.
  • Store the consent date and policy version so outdated permission can be renewed.

Good wording removes uncertainty. “Reject non-essential” is clearer than “Reject” because it tells visitors exactly what they are declining. Explain whether data is shared with Google, Meta, an email platform or another named service, and replace vague phrases such as “we use cookies” with a concise account of the actual purposes.

Friendly Australian English can suit the rest of the site, but the legal controls need extra clarity. A phrase such as “no worries” may appear in promotional copy, yet it is not an appropriate label for a recorded permission. Buttons should make their consequences obvious without relying on jokes, slang or small print.

Add the custom code to your Weebly site

In Weebly, open the site editor, select site settings and locate the Head Code field. Paste the following code there so it applies across the site. It creates the interface, stores the visitor’s choice in first-party browser storage and makes an optional analytics script load only after permission.

<style>
  #wcb-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, .45);
    font-family: Arial, sans-serif;
  }

  #wcb-backdrop[hidden],
  .wcb-options[hidden] {
    display: none !important;
  }

  #wcb-panel {
    width: min(680px, 100%);
    padding: 24px;
    color: #222;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
    box-sizing: border-box;
  }

  #wcb-panel * {
    box-sizing: border-box;
  }

  .wcb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .wcb-actions button {
    min-height: 44px;
    padding: 10px 16px;
    color: #222;
    background: #fff;
    border: 1px solid #333;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
  }

  .wcb-actions .wcb-primary {
    color: #fff;
    background: #146b5a;
    border-color: #146b5a;
  }

  .wcb-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
  }

  .wcb-note {
    margin-left: auto;
    font-size: .85rem;
  }

  @media (min-width: 700px) {
    #wcb-backdrop {
      align-items: center;
    }

    #wcb-panel {
      padding: 30px;
    }
  }
</style>

<script>
(function () {
  const key = "wcb-consent-v1";
  let consent = null;

  try {
    const saved = JSON.parse(localStorage.getItem(key));
    if (saved && saved.version === 1) consent = saved;
  } catch (error) {}

  const bar = document.createElement("div");
  bar.id = "wcb-backdrop";
  bar.hidden = Boolean(consent);
  bar.setAttribute("role", "dialog");
  bar.setAttribute("aria-modal", "false");
  bar.setAttribute("aria-labelledby", "wcb-title");

  bar.innerHTML = `
    <div id="wcb-panel">
      <h2 id="wcb-title">Your cookie choices</h2>
      <p>
        We use essential cookies to make this site work. With permission,
        we also use analytics and marketing cookies.
        See our <a href="/privacy">privacy policy</a>.
      </p>

      <div class="wcb-options" hidden>
        <label class="wcb-option">
          <input type="checkbox" checked disabled>
          Essential cookies <span class="wcb-note">Always on</span>
        </label>
        <label class="wcb-option">
          <input type="checkbox" data-category="analytics">
          Analytics cookies
        </label>
        <label class="wcb-option">
          <input type="checkbox" data-category="marketing">
          Marketing cookies
        </label>
      </div>

      <div class="wcb-actions">
        <button class="wcb-primary" data-action="accept">Accept all</button>
        <button data-action="reject">Reject non-essential</button>
        <button data-action="customise">Customise</button>
        <button data-action="save" hidden>Save choices</button>
      </div>
    </div>
  `;

  function mount() {
    if (!document.body) {
      document.addEventListener("DOMContentLoaded", mount);
      return;
    }
    document.body.appendChild(bar);
  }

  function store(value) {
    consent = Object.assign({}, value, {
      version: 1,
      savedAt: new Date().toISOString()
    });

    try {
      localStorage.setItem(key, JSON.stringify(consent));
    } catch (error) {}

    bar.hidden = true;
    window.dispatchEvent(
      new CustomEvent("wcb:consent", { detail: consent })
    );
  }

  function loadOptionalScripts(value) {
    if (value.analytics && !document.querySelector("script[data-wcb-ga]")) {
      window.dataLayer = window.dataLayer || [];
      window.gtag = window.gtag || function () {
        window.dataLayer.push(arguments);
      };

      window.gtag("js", new Date());
      window.gtag("config", "G-XXXXXXXXXX");

      const script = document.createElement("script");
      script.dataset.wcbGa = "true";
      script.async = true;
      script.src =
        "https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX";
      document.head.appendChild(script);
    }

    // Add an approved marketing script here when value.marketing is true.
  }

  bar.addEventListener("click", function (event) {
    const action = event.target.dataset.action;

    if (action === "accept") {
      store({ essential: true, analytics: true, marketing: true });
    }

    if (action === "reject") {
      store({ essential: true, analytics: false, marketing: false });
    }

    if (action === "customise") {
      bar.querySelector(".wcb-options").hidden = false;
      bar.querySelector('[data-action="accept"]').hidden = true;
      bar.querySelector('[data-action="reject"]').hidden = true;
      bar.querySelector('[data-action="customise"]').hidden = true;
      bar.querySelector('[data-action="save"]').hidden = false;
    }

    if (action === "save") {
      store({
        essential: true,
        analytics: bar.querySelector(
          '[data-category="analytics"]'
        ).checked,
        marketing: bar.querySelector(
          '[data-category="marketing"]'
        ).checked
      });
    }
  });

  document.addEventListener("click", function (event) {
    if (!event.target.closest("[data-wcb-settings]")) return;

    bar.hidden = false;
    bar.querySelector('[data-category="analytics"]').checked =
      Boolean(consent && consent.analytics);
    bar.querySelector('[data-category="marketing"]').checked =
      Boolean(consent && consent.marketing);
    bar.querySelector('[data-action="customise"]').click();
  });

  mount();
  if (consent) loadOptionalScripts(consent);
})();
</script>

Replace /privacy with the actual privacy-policy address and G-XXXXXXXXXX with the correct Google Analytics measurement ID. Remove any analytics or advertising code already hardcoded in the theme, Head Code, embeds or HTML sections; otherwise it may load before the visitor makes a choice.

The example uses localStorage, which keeps the decision in the visitor’s browser without creating another tracking cookie. To let visitors change their decision later, add <button type="button" data-wcb-settings>Cookie settings</button> to the footer or another suitable page area using a Weebly HTML embed.

Fit the banner across Australian devices

Design the banner for the screens your visitors actually use. A Weebly shop may be opened on a phone during a trip through Brisbane, checked on a work laptop in Melbourne and viewed again on a home computer in Sydney. A single-column panel, wrapping buttons and a maximum content width will prevent the notice from covering the whole page.

The styling uses a fixed viewport and a high z-index, but mobile browsers can still behave unexpectedly. Check safe areas around notches, avoid placing important buttons beneath sticky navigation, and keep touch targets large enough for comfortable tapping. The CSS also avoids transitions by default, reducing unnecessary movement for visitors who request reduced motion.

For another fixed or floating element, the sticky sidebar guide offers useful Weebly-specific techniques. Test the two elements together, since overlapping sidebars and consent panels can make a narrow screen unusable. Keep the banner readable without requiring a pinch, zoom or horizontal scroll.

Control analytics, advertising and external destinations

The consent event provides a central point for controlling optional tools. Listen for wcb:consent and load only the services connected to the selected categories. Analytics, advertising pixels, session-recording tools, chat widgets and embedded maps can all create third-party cookies or collect visitor activity, so classify each one according to what it actually does.

An outbound link to another commercial page, such as JeeCity no-deposit codes, takes visitors into a separate environment that your Weebly banner cannot control. The destination may operate its own analytics and place additional cookies after it opens. Gambling-related promotions also require a review of the Interactive Gambling Act, applicable state advertising rules, age restrictions and responsible-gambling requirements.

Keep the privacy policy aligned with the interface. Name the categories shown in the banner, identify relevant third parties and explain how long information is retained. If a vendor changes its data practices, update both the banner text and the policy rather than changing only one of them.

Test the consent journey before publishing

Open the site in a private window and check that the banner appears without previously stored information. Choose each option, refresh the page and confirm that the decision remains recorded. Then clear the browser storage and verify that the notice returns. This prevents a malformed storage value from silently treating a visitor as having accepted everything.

Use the browser’s network panel to inspect requests. Google Analytics, advertising pixels and other non-essential resources should remain absent until the relevant permission is granted. Test Safari, Chrome and Firefox on both desktop and mobile, particularly if the site receives traffic through different Australian devices or browser configurations.

Keyboard and screen-reader testing matters as well. Check that every button can be reached with the Tab key, that the consent panel has a meaningful label and that the privacy-policy link works. If storage is unavailable, the banner should continue appearing rather than assuming permission. Keep a dated record of the version tested, the browsers covered and the person responsible for future reviews.

Publish the notice and maintain control

Add the tested code to Head Code, publish a draft and watch the live site for layout or script conflicts. Ask visitors to use the privacy controls whenever they want to review or withdraw a choice, and explain that changing a preference stops future optional loads after the page reloads. Consent records should be retained in accordance with the site’s documented policy and any legal obligations that apply.

Review the banner whenever analytics, advertising, embedded media or privacy-policy wording changes. Give one person ownership of the code and the review schedule so a Weebly redesign does not accidentally restore an always-on tracking script. Create a draft, paste the tested code into Head Code, add the privacy-policy and settings links, then publish it after confirming one accepted visit and one rejected visit.

A bold charcoal drawing of a clean, minimalist workspace with a notebook, pencil, and coffee cup on a light wooden desk, rendered in dark grey strokes against an off-white paper background, conveying a calm and focused creative mood.

Recent Posts

Get in Touch

Subscribe for regular email updates and get access to new Weebly tips and tutorials.