Whitelist Test Devices¶
GetSocial Dashboard provides the option to whitelist devices for testing purposes.
The reason for whitelisting a device is because of the 30-days re-attribution window.
Normally, we won’t attribute the install to the referrer if we have already seen the same device active in the app within the last 30 days.
For Test Devices, all installs from whitelisted devices will be attributed, every time.
Add Google Play Services(Android Only)¶
To have Google Advertising ID (GAID) available on the Android you have to add play-services-ads
Google service to your application.
Android¶
Follow the official guide and add play-services-ads
dependency.
Important
Google Mobile Ads SDK from version 17.0.0 requires to add the following lines to AndroidManifest.xml
:
<meta-data
android:name="com.google.android.gms.ads.AD_MANAGER_APP"
android:value="true"/>
iOS¶
iOS 14.5 and above requires user permission to access the device’s IDFA. Follow these steps to ask for permission:
- add the following key to your app’s Info.plist:
NSUserTrackingUsageDescription
and provide some description. - add
AppTrackingTransparency
framework as a dependency - ask for permission in your app by adding the following code:
ATTrackingManager.requestTrackingAuthorization { status in }
Once the user gave permission, you need to start your app again, because GetSocialSDK initialization runs in the background and does not wait until the permission process is finished.
Unity¶
-
Download and import PlayServicesResolver plugin into your project.
-
Create file
Assets/GetSocial/Editor/GetSocialDependencies.xml
with following content:<dependencies> <androidPackages> <androidPackage spec="com.google.android.gms:play-services-ads:+"/> </androidPackages> </dependencies>
-
Switch platform to Android and go to Assets → Play Services Resolver → Android Resolver →
Resolve.
Important
Google Mobile Ads SDK from version 17.0.0 requires to add the following lines to AndroidManifest.xml
:
<meta-data
android:name="com.google.android.gms.ads.AD_MANAGER_APP"
android:value="true"/>
Adding Test Devices¶
- Navigate to Account Settings in your GetSocial Dashboard
- Select on Test Devices
- Press New Test Device
- Enter Name and Device ID (IDFA for iOS or Google Advertising ID for Android)
- Press Add Device
Finding Your Device Identifier¶
With Code¶
To get device ID and print it somewhere you can use:
Log.d("Device ID: " + GetSocial.Device.getIdentifier());
println("Device ID: ${GetSocial.Device.getIdentifier()}");
NSLog(@"Device ID: %@", [GetSocial deviceIdentifier]);
println("Device ID: \(GetSocial.deviceIdentifier())")
Debug.Log("Device ID: " + GetSocial.Device.Identifier);
Manual¶
Finding your IDFA for iOS¶
You can find your device’s IDFA with any of these apps available in the AppStore:
Finding your Google Advertising ID for Android¶
You can find your device’s Google Advertising ID going to the device’s Settings > Google > Ads.