Last modified January 21, 2019 by Shelly Wolfe

How do I log advertising and vendor IDs?

As of December 2015, it is possible to log advertising and vendor identifiers. This article explains how to configure the iOS and Android SDKs to do so.

iOS

To log IDFA (Identifier for Advertisers), add a constant called SWRVE_LOG_IDFA to the preprocessor macros under App Target > Build Settings > Preprocessing > Preprocessor Macros. This logs a user property called swrve.IDFA to the Swrve system.

To log IDFV (Identifier for Vendors), add a constant called SWRVE_LOG_IDFV to the preprocessor macros under App Target > Build Settings > Preprocessing > Preprocessor Macros. This logs a user property called swrve.IDFV to the Swrve system.

Android

To log GAID (Google Advertising ID), call method SwrveConfig.setGAIDLoggingEnabled(true) before creating the SDK instance. This logs a user property called swrve.GAID to the Swrve system.

To log the Google Android ID, call method SwrveConfig.setAndroidIdLoggingEnabled(true) before creating the SDK instance. This logs a user property called swrve.android_id to the Swrve system.