Troubleshooting
Common issues and solutions when integrating AttributeHQ.
Events Not Sending
Symptoms: Events are tracked in the SDK but never appear in the dashboard.
-
Check initialization — All tracking methods are no-ops before
init()/initialize(). Enable debug logging to see warnings. -
Check API key — Verify the key starts with
ak_and matches an active key in your dashboard. -
Check network — Events are queued offline and retried. Open DevTools (Web) or device logs (mobile) to check for HTTP errors.
-
Check batching — Events are batched, not sent immediately. Wait for
flushInterval(default: 5 seconds) or callflush()manually.
Web
// Enable debug mode
init({ apiKey: '...', appId: '...', debug: true })
// Force flush
flush()
// Check DevTools Network tab for /api/v1/eventsInstall Not Tracked
Symptoms: First launch doesn’t show an install in the dashboard.
- Web: Check if
__ahq_installedexists in localStorage. If so, the install was already tracked. Clear it and refresh to re-trigger. - Mobile: The install is tracked on first
initialize()call. Check debug logs for the install request and response. - Check the API response — Look for
POST /api/v1/installsin the network logs. A201response means it was tracked successfully.
Attribution Returns Organic
Symptoms: All installs show as “organic” even when coming from ad clicks.
-
Check click tracking — Verify your ad campaign links use the correct click URL format:
https://api.attributehq.com/v1/clicks?app_id=YOUR_APP_ID&c=campaign&pid=source -
Check attribution window — Clicks expire after 7 days. If the install happens after the window, it’s classified as organic.
-
Check device ID — For deterministic matching, ensure the SDK has access to IDFA (iOS) or GAID (Android). On iOS, ATT must be authorized.
-
Check CTIT — Installs within 10 seconds of a click are rejected as fraud. This is expected behavior.
Page Views Not Tracking in SPA (Web)
The Web SDK patches history.pushState and history.replaceState to detect navigation. If your framework uses a different mechanism:
// Manual page view tracking
import { trackPageView } from '@attributehq/web-sdk'
// In your router's navigation callback
router.afterEach(() => {
trackPageView()
})“SDK Not Initialized” Warning
All tracking methods check for initialization. If you see this warning:
- Web: Ensure
init()is called before anytrack()calls. In frameworks like Next.js, useuseEffect. - React Native:
initialize()is async — you mustawaitit before calling other methods. - Mobile: Ensure
initialize()is called inApplication.onCreate(Android) orAppDelegate.didFinishLaunching(iOS).
CORS Errors (Web)
If you see CORS errors in the browser console:
- The API server (
https://api.attributehq.com) allows all origins by default - Check that your request URL matches the expected API endpoint
- Verify no browser extensions are blocking cross-origin requests
React Native: Native Module Not Linked
If you see: "AttributeHQ native module is not linked. Please install..."
- Standard RN: Run
cd ios && pod install && cd ..then rebuild - Expo: This SDK does not work in Expo Go. Use
eas buildinstead - Autolinking: React Native 0.60+ autolinks native modules. If not working, run
npx react-native link @attributehq/react-native-sdk
Duplicate Installs
The SDK uses idempotency to prevent duplicate installs:
- Same
device_id: Returns cached attribution result - Web: Checks
__ahq_installedin localStorage
If you’re seeing duplicates, check that device_id is consistent across app launches.
High Organic Rate
If your organic rate is unexpectedly high:
- IDFA availability — On iOS 14+, most users deny ATT. Without IDFA, attribution relies on fingerprinting (lower match rate)
- Ad network integration — Ensure your ad campaigns use AttributeHQ click URLs, not direct app store links
- Fingerprint accuracy — Users on the same network (e.g., corporate WiFi) may share IP addresses, reducing fingerprint uniqueness
A 30-50% organic rate is normal for many apps. The actual rate depends on your marketing mix and platform (iOS typically has higher organic due to ATT restrictions).