Skip to main content

FAQ

Common questions about TWA integration, device ID handoff, and install attribution.

Why is gps_adid empty on the web side?

CauseFix
TWA launched before Ad ID returnedWait for getGoogleAdId callback, then call launchTwa(). Keep shouldLaunchImmediately() as false.
Key mismatch native vs webUse the same key (for example gps_adid) in appendQueryParameter and getQueryParam.
initSdk runs after URL changedRead query params on the first document load, before login redirects or client-side routing.
Login redirect on launchIf unauthenticated users redirect to /login, query params on the launch URL are lost. Persist gps_adid (sessionStorage / localStorage) on first load, or delay redirect until params are saved and passed to initSdk.
Opted out of adsUser may receive a zero ID; this is expected Google behavior.
Non-mobile test deviceUse a physical mobile phone or an emulator with Google Play support.

Why does a login redirect drop gps_adid?

A frequent pattern that breaks TWA:

  1. Native opens https://app.example.com/?gps_adid=UUID.
  2. Web app immediately redirects unauthenticated users to https://app.example.com/login without preserving query params.
  3. gps_adid is lost; initSdk gets null.

Fix: On the landing URL, save device IDs to sessionStorage before any redirect:

const gpsAdid = getQueryParam('gps_adid');
if (gpsAdid) {
sessionStorage.setItem('gps_adid', gpsAdid);
}
const stored = sessionStorage.getItem('gps_adid') || gpsAdid;
Adtrace.initSdk({ /* ... */, gps_adid: stored });

Apply the same pattern on /login if that is where initSdk runs.

Why is install not appearing in the panel?

  • Confirm testing on a physical mobile phone or Google Play emulator.
  • Confirm install was sent before events (Web SDK sends install on first open).
  • Use sandbox + verbose logs and search for errors.
  • Clear storage and retest with a fresh install.
  • Follow Test the integration for Testing Console steps.

Why do events work but install does not?

Install must succeed first. Events are stored but not shown in panel statistics until install is recorded. See Web layer (Web SDK).