Skip to main content

FAQ

Common questions about Unity integration, testing, event tracking, and troubleshooting.

Integration

How do I add the Unity SDK?

Download the latest .unitypackage from the releases page, then in the Unity Editor go to Assets → Import Package → Custom Package and select the file.

Add Assets/AdTrace/AdTrace.prefab to your first scene. Configure app token, environment, and log level in the prefab Inspector. See Basic Setup for the full walkthrough.

Should the SDK start automatically or manually?

By default the prefab starts the SDK on the scene Awake event. If you need to control timing — for example after user consent or loading config — enable Start Manually on the prefab and call AdTrace.start(config) from your code when ready:

AdTraceConfig config = new AdTraceConfig("{YourAppToken}", AdTraceEnvironment.Sandbox);
config.setLogLevel(AdTraceLogLevel.Verbose);
AdTrace.start(config);

Use one consistent start path; do not call AdTrace.start more than once per app launch.

What Android setup is required?

The Unity package runs a post-build process for native configuration, but you still need:

  • Google Play Services (including play-services-ads-identifier for recent library versions) in Assets/Plugins/Android.
  • com.google.android.gms.permission.AD_ID in AndroidManifest.xml for Android 12+.
  • Install referrer library AAR in Plugins/Android for reliable campaign attribution.
  • ProGuard keep rules when minification is enabled.

Details are in Basic Setup.

Testing

Why don't I see data in the panel?

CauseFix
Environment mismatchSet prefab or config environment to Sandbox while testing. Switch the panel to sandbox traffic — production is the default view.
Device already trackedUse a fresh device or Forget Device in the panel before retesting install.
Install not recorded yetEvents are stored but not shown in statistics until install succeeds. Confirm install first.
Log level too lowSet log level to Verbose and check the Unity console and device logs after a session.

Follow Test the integration for Testing Console steps.

How do I confirm Google Advertising ID on Android?

Start the app in sandbox with verbose logging. Track a session or event, then search verbose output for gps_adid. If it is missing, Google Play Services is not configured correctly — see Google Play Services in Basic Setup.

Event tracking

How do I track events?

Create event tokens in the panel, then use AdTraceEvent anywhere in your game logic:

AdTraceEvent adtraceEvent = new AdTraceEvent("abc123");
adtraceEvent.addCallbackParameter("key", "value");
AdTrace.trackEvent(adtraceEvent);

Use eventValueParams (or addCallbackParameter / partner parameter APIs) for unlimited custom key-value pairs. See Event Tracking for revenue, deduplication, and callback parameters.

Why do events not appear in the panel?

Install must be recorded on the device first. Adtrace receives and stores events before install, but they will not appear in panel statistics until install is tracked. Confirm install in verbose logs or the Testing Console before validating events.

For in-app purchase revenue, call trackEvent only after the purchase completes, and set a unique transactionId to avoid duplicate revenue.

Troubleshooting

No data or missing device IDs

SymptomFix
No install or sessions in panelVerify prefab is in the first scene, app token is correct, environment is Sandbox for testing, and panel shows sandbox traffic.
gps_adid missing (Android)Add Play Services ads identifier AAR and AD_ID permission. Retest with verbose logs.
Install in sandbox, not productionAdd ProGuard keep rules from Basic Setup.
Post-build warnings in Unity consoleReview output from AdTraceEditor.cs post-build step; fix missing plugins or manifest entries.
Huawei App Gallery installsEnsure OAID/Huawei referrer support per Unity SDK docs and native OAID guidance.

General checklist

  • AdTrace prefab present in the first scene (or manual AdTrace.start called once).
  • Valid app token and correct Sandbox/Production environment.
  • Verbose logging enabled during development.
  • Fresh device or Forget Device before retesting install.
  • Android plugins and permissions configured; iOS post-build steps completed without errors.

For persistent issues, review the example scene at Assets/AdTrace/ExampleGUI/ExampleGUI.unity in the package or contact Adtrace support.