web3modal icon indicating copy to clipboard operation
web3modal copied to clipboard

[bug] Duplicate analytics HEAD requests even if analytics is disabled in config

Open kr4chinin opened this issue 3 months ago • 2 comments

Link to minimal reproducible example

See "Steps to Reproduce"

Steps to Reproduce

  1. Upgrade to @reown/appkit and @reown/appkit-adapter-wagmi version 1.8.7 or higher
  2. Configure AppKit with:
    createAppKit({
      // ... other config
      enableCoinbase: false,
      features: {
        analytics: false,
        // ... other features
      },
    });
    
  3. Open browser DevTools Network tab
  4. Load the application
  5. Observe 2-3 duplicate HEAD requests being sent despite analytics: false
  6. Observe Coinbase analytics requests being sent despite enableCoinbase: false

Analytics and enableCoinbase options not working in 1.8.7+ - duplicate HEAD requests sent

Description

In version 1.7.20, setting analytics: false successfully prevented Reown AppKit from sending analytics HEAD requests. However, after upgrading to version 1.8.7+, the library now sends 2-3 duplicate HEAD requests even when analytics: false is explicitly set. This is particularly problematic for Next.js applications, which interpret these HEAD requests as prefetch requests.

Similarly, enableCoinbase: false appears to have no effect in version 1.8.7+, with Coinbase still making analytics requests despite the option being disabled.

Expected Behavior

  • When features.analytics is set to false, no analytics HEAD requests should be sent
  • When enableCoinbase is set to false, no Coinbase Wallet SDK requests should be made

Actual Behavior

  • Even with analytics: false, 2-3 duplicate HEAD requests are being sent
  • Next.js intercepts these HEAD requests and treats them as prefetch, causing unnecessary network traffic
  • enableCoinbase: false does not prevent Coinbase Wallet SDK requests (e.g., https://cca-lite.coinbase.com/metrics)

Environment

  • @reown/appkit version: 1.8.7+ (regression introduced compared to 1.7.20)
  • @reown/appkit-adapter-wagmi version: 1.8.7+
  • Framework: Next.js 16.0.0
  • React version: 19.2.0
  • Browser: Any (tested on Chrome, Firefox, Safari)

Workaround

Currently downgrading to version 1.7.20 is the only known workaround, but this prevents users from benefiting from newer features and bug fixes.

Additional Context

  • This issue was not present in version 1.7.20
  • The regression appears to have been introduced in some 1.8.* version

Summary

In version 1.7.20, setting analytics: false successfully prevented Reown AppKit from sending analytics HEAD requests. However, after upgrading to version 1.8.7+, the library now sends 2-3 duplicate HEAD requests even when analytics: false is explicitly set. This is particularly problematic for Next.js applications, which interpret these HEAD requests as prefetch requests.

Similarly, enableCoinbase: false appears to have no effect in version 1.8.7+, with Coinbase still making analytics requests despite the option being disabled.

List of related npm package versions

@reown/appkit @reown/appkit-adapter-wagmi

Node.js Version

v22.17.0

Package Manager

[email protected]

kr4chinin avatar Nov 05 '25 14:11 kr4chinin

APKT-4181

linear[bot] avatar Nov 05 '25 14:11 linear[bot]

Related

https://github.com/reown-com/appkit/issues/5318

kr4chinin avatar Nov 05 '25 14:11 kr4chinin