Skip to Content
Examples

Examples

Explore real-world Miniback integrations across different platforms and frameworks.

Static HTML

<!DOCTYPE html> <html> <head> <title>My Website</title> </head> <body> <h1>Welcome to my website</h1> <p>This is a simple example.</p> <!-- Miniback Widget --> <script src="https://miniback.io/widget.js" data-project="my-website" ></script> </body> </html>

Website Builders

Wix

  1. Access Code Settings:

    • Go to your Wix Editor
    • Click Settings > Custom Code
    • Select Add Custom Code
  2. Add the Widget:

    <script src="https://miniback.io/widget.js" data-project="your-project-slug" ></script>
  3. Configure Placement:

    • Choose All Pages or specific pages
    • Set Place Code in to Body - end
    • Click Apply

Squarespace

  1. Access Code Injection:

    • Go to Settings > Advanced > Code Injection
    • Or navigate to Settings > Website > Website Tools > Code Injection
  2. Add to Footer:

    <script src="https://miniback.io/widget.js" data-project="your-project-slug" ></script>
  3. Save Changes:

    • Paste the code in the Footer section
    • Click Save

Webflow

  1. Project Settings:

    • Open your Webflow project
    • Go to Project Settings > Custom Code
  2. Add to Footer Code:

    <script src="https://miniback.io/widget.js" data-project="your-project-slug" ></script>
  3. Publish:

    • Click Save and Publish your site

WordPress.com

  1. Business Plan Required:

    • Custom code requires WordPress.com Business plan or higher
  2. Add via Customizer:

    • Go to Appearance > Customize
    • Navigate to Additional CSS
    • Add the script in a HTML block or use a plugin like “Insert Headers and Footers”
  3. Alternative - Plugin Method:

    • Install “Insert Headers and Footers” plugin
    • Go to Settings > Insert Headers and Footers
    • Add script to Scripts in Footer section

Shopify

  1. Access Theme Editor:

    • Go to Online Store > Themes
    • Click Actions > Edit code
  2. Edit theme.liquid:

    • Find theme.liquid in the Layout folder
    • Add before the closing </body> tag:
    <script src="https://miniback.io/widget.js" data-project="your-project-slug" ></script>
  3. Save Changes:

    • Click Save to apply changes

Framer

  1. Custom Code Component:

    • Add a Custom Code component to your page
    • Or use Site Settings > General > Custom Code
  2. Add Widget Script:

    <script src="https://miniback.io/widget.js" data-project="your-project-slug" ></script>
  3. Position:

    • Place the Custom Code component where you want it
    • Or add to site-wide custom code for all pages

Ghost

  1. Code Injection:

    • Go to Settings > Code Injection
    • Or Settings > Advanced > Code Injection
  2. Site Footer:

    <script src="https://miniback.io/widget.js" data-project="your-project-slug" ></script>
  3. Save:

    • Add to Site Footer section
    • Click Save

Notion (with Super.so or similar)

  1. Custom Code Block:

    • Add a Code block to your Notion page
    • Set language to HTML
  2. Widget Code:

    <script src="https://miniback.io/widget.js" data-project="your-project-slug" ></script>
  3. Publish:

    • Publish your Notion page through your chosen platform

React/Next.js

Simple Component

import { useEffect } from "react"; export function MinibackWidget({ projectSlug }) { useEffect(() => { const script = document.createElement("script"); script.src = "https://miniback.io/widget.js"; script.setAttribute("data-project", projectSlug); document.body.appendChild(script); return () => { // Cleanup when component unmounts const existingScript = document.querySelector( `script[data-project="${projectSlug}"]` ); if (existingScript) { document.body.removeChild(existingScript); } }; }, [projectSlug]); return null; } // Usage <MinibackWidget projectSlug="your-project-slug" />;

Context Provider Pattern

import React, { createContext, useContext, useEffect } from "react"; const FeedbackContext = createContext(); export function FeedbackProvider({ children, projectSlug }) { useEffect(() => { const script = document.createElement("script"); script.src = "https://miniback.io/widget.js"; script.setAttribute("data-project", projectSlug); document.body.appendChild(script); return () => { const existingScript = document.querySelector( `script[data-project="${projectSlug}"]` ); if (existingScript) { document.body.removeChild(existingScript); } }; }, [projectSlug]); return ( <FeedbackContext.Provider value={{ projectSlug }}> {children} </FeedbackContext.Provider> ); } // Usage in your app export default function App() { return ( <FeedbackProvider projectSlug="my-react-app"> <div> <h1>My App</h1> <p>Your content here...</p> </div> </FeedbackProvider> ); }

Vue.js

<template> <div></div> </template> <script> export default { props: { projectSlug: { type: String, required: true, }, }, mounted() { const script = document.createElement("script"); script.src = "https://miniback.io/widget.js"; script.setAttribute("data-project", this.projectSlug); document.body.appendChild(script); }, beforeDestroy() { const existingScript = document.querySelector( `script[data-project="${this.projectSlug}"]` ); if (existingScript) { document.body.removeChild(existingScript); } }, }; </script>

CMS Platforms

WordPress (Self-hosted)

function add_miniback_widget() { ?> <script src="https://miniback.io/widget.js" data-project="my-wordpress-site" ></script> <?php } add_action('wp_footer', 'add_miniback_widget');

Drupal

function mymodule_page_attachments(array &$attachments) { $attachments['#attached']['html_head'][] = [ [ '#tag' => 'script', '#attributes' => [ 'src' => 'https://miniback.io/widget.js', 'data-project' => 'my-drupal-site', ], ], 'miniback_widget', ]; }

Website Builder Tips

General Guidelines

  1. Footer Placement: Most builders work best when the script is placed in the footer
  2. All Pages: Enable the widget on all pages for consistent feedback collection
  3. Test Mode: Use a test project slug initially to verify the widget appears correctly
  4. Mobile Responsive: The widget automatically adapts to mobile devices

Common Issues

  • Widget Not Appearing: Check if custom code is enabled in your plan
  • Multiple Widgets: Ensure you’re not adding the script multiple times
  • Caching: Clear your site cache after adding the widget
  • Preview Mode: Some builders don’t show widgets in preview mode

Plan Requirements

PlatformCustom Code Access
WixPremium plans
SquarespacePersonal plan and above
WebflowPaid plans
WordPress.comBusiness plan and above
ShopifyAll plans
FramerPro plan and above

Production Deployment

When deploying to production:

  1. Update Script URL: Change from localhost to your production domain
  2. Configure Domains: Set up allowed domains for security
  3. Test Thoroughly: Verify the widget works across all pages
  4. Monitor Performance: Check that the widget doesn’t impact page load times

Advanced Use Cases

  • Conditional Loading: Load widget based on user roles or page types
  • Custom Form Integration: Integrate with existing feedback forms
  • Analytics Hooks: Track widget interactions with your analytics platform

Last updated on