Skip to content

In-app purchase tracking

GetSocial Sdk supports tracking purchases users make in your application. The gathered data is shown in Revenue Analytics section.

In order to be able to track purchases, Sdk requires some configuration steps.

Android

Configuration

If you are not sure which option you should pick, enable debug logs and start your application and check Logcat:
1. SDK logs Using Billing Library to track purchases. → Go to Option A.
1. SDK logs Using Billing Service to track purchases. → Go to Option B.

Option A: if your app uses Google Play Billing Library:

  1. Login to Google Play Developer Console.
  2. Choose the application you registered on GetSocial Dashboard.
  3. Open Development toolsServices & APIs.
  4. Copy the Base64-encoded RSA public key in Licensing & in-app billing.
  5. Open GetSocial Dashboard and go to App SettingsIAP Tracking.
  6. Enable Google Play, choose Using Google Play Billing Service option and paste the copied license key into the input field.
  7. Press Save to persist your changes.

Option B: if your app uses Google Play Billing Service:

  1. Go to the Google Play Developer Console.
  2. Select SettingsAPI access.
  3. Click the Create New Project button.
  4. Click the Create Service Account button in the Service Accounts section.
  5. In the info box click on the Google Developers Console link.
  6. Now click on Create new Client ID, select Service account from the options and click on Create Client ID button. It will trigger a JSON file download, which contains your API key.
  7. Choose IAM on the left side and click on Add button.
  8. Enter your newly created user’s name and select Android Management User role, then click on Save button.
  9. To finish API access configuration, go back to API access and click on Grant access next to the service account email.
  10. Choose a role, like View financial reports and click on Add user button.
  11. Open GetSocial Dashboard and go to App SettingsIAP Tracking.
  12. Enable Google Play, choose Using Google Play Billing Library option and upload the downloaded JSON file.
  13. Press Save to persist your changes.

Testing

Launch your application and make a purchase (test purchase is also fine). On Android purchases are tracked on each application launch, so after you finished the purchase process, you need to stop and restart your application. Then go to GetSocial Dashboard, you should see your new purchase in Revenue analytics section.

iOS

Configuration

Purchase tracking on iOS requires your App-Specific Shared Secret code.

  1. Login to iTunes Connect.
  2. Select My Apps.
  3. Choose the application you registered on GetSocial Dashboard.
  4. Select Features tab.
  5. Choose on In-app Purchases on the left side.
  6. Click on App-Specific Shared Secret on the right side.
  7. Copy the Shared secret code.
  8. Open GetSocial Dashboard and go to App SettingsIAP Tracking
  9. Enable Apple App Store and paste the copied shared secret into the input field.
  10. Press Save to persist your changes.

Testing

Launch your application and make a purchase (test purchase is also fine). After you finished the purchase process, go to GetSocial Dashboard, you should see your new purchase in Revenue analytics section.

Give us your feedback! Was this article helpful?

😀 🙁