Integration Guide

This guide helps developers integrate their applications and websites with Macro Browser. It covers Web3 integration, optimizing for privacy features, and working with the browser's unique capabilities.

Overview


Macro Browser provides several integration points for developers:

Diagram 1

Web3 Integration


Detecting Macro Browser

You can detect if a user is browsing with Macro Browser through the user agent or by checking for the Macro Browser provider:

Connecting to the Wallet

Macro Browser follows the EIP-1193 standard for wallet connections:

Handling Chain Switching

Users may need to switch between different blockchain networks:

Sending Transactions

Transactions in Macro Browser follow standard Web3 patterns with enhanced security:

Best Practices for dApps

When building dApps for Macro Browser:

  1. Always use feature detection rather than user agent sniffing

  2. Handle wallet connection rejection gracefully

  3. Provide clear transaction information to help users make informed decisions

  4. Implement proper error handling for all Web3 interactions

  5. Support multiple chains where appropriate

  6. Consider privacy implications of your dApp's design

  7. Test with Macro Browser during development

Privacy Features Integration


Content Security Policy

Macro Browser enforces strict Content Security Policy (CSP) rules. Ensure your site works with strong CSP headers:

Tracker-Free Design

Design your site to work without trackers and third-party cookies:

  1. Avoid third-party resources when possible

  2. Self-host critical scripts rather than using CDNs

  3. Don't rely on fingerprinting for identification

  4. Use local storage sparingly (it's cleared between sessions)

  5. Implement privacy-respecting analytics if needed

Performance with Ad Blocking

Optimize your site to work well with ad blockers:

  1. Don't use class names that trigger ad blockers (e.g., "ad", "banner", "sponsor")

  2. Avoid DOM structures similar to ads

  3. Don't load content from known ad domains

  4. Test your site with ad blockers enabled

UI Integration


Dark Mode Support

Macro Browser uses dark mode by default. Ensure your site supports dark mode:

Responsive Design

Ensure your site is fully responsive and works well at different viewport sizes:

  1. Use responsive layouts with flexbox or grid

  2. Test on various screen sizes

  3. Implement proper touch support for mobile users

  4. Optimize loading performance for all devices

AI Search Optimization


Optimize your content for Macro Browser's AI-powered search:

  1. Use clear, descriptive page titles

  2. Implement proper semantic HTML (headings, lists, etc.)

  3. Include concise meta descriptions

  4. Structure content logically with clear sections

  5. Use schema.org markup for enhanced understanding

Testing with Macro Browser


Development Environment Setup

To test your site or dApp with Macro Browser during development:

  1. Install Macro Browser for your platform

  2. Configure developer mode in settings

  3. Use the developer tools (similar to Chrome DevTools)

  4. Test with all privacy features enabled

Common Integration Issues

Watch out for these common integration problems:

  1. Reliance on persistent storage across sessions

  2. Assuming availability of third-party scripts that might be blocked

  3. Not handling wallet connection rejections properly

  4. UI issues in dark mode

  5. Performance problems due to blocked resources

Compatibility Checklist

✅ Site works with strict Content Security Policy ✅ All critical functionality works without third-party cookies ✅ Dark mode design is implemented and tested ✅ Web3 connections handle all error cases gracefully ✅ No dependencies on known tracking domains ✅ Semantic HTML is used throughout the site ✅ Site performs well with ad/tracker blocking enabled

Advanced Integration


Extension Development

Macro Browser supports a limited set of extensions focused on privacy and security:

  1. Focus on privacy-enhancing features

  2. Avoid requiring broad permissions

  3. Follow Manifest V3 guidelines

  4. Submit to the Macro Browser extension review process

Custom Protocol Handlers

Register custom protocol handlers for your application:

Support and Resources


Last updated