TapResearch only supports Unity v2017.4.0f1 and above.
You can download the latest version of the TapResearch Unity SDK on GitHub.
Inside the TapResearchSDK directory, you will find Tapresearch.unitypackage. You can import the package by selecting Assets > Import Package > Custom Package... through the Unity menu.
The SDK uses External Dependency Manager for Unity to integrate the native library dependencies.
If the dependency manager is already installed on your app, you can remove the Dependency Manager files when importing the SDK.
For the Android build, make sure the dependencies have been resolved by going to
External Dependency Manager =>
Android Resolver =>
For iOS, the plugin will add CocoaPods to the project and will import the dependencies in the Xcode project.
- Ensure you have the following inside the Assets > Plugins > iOS folder:
The TapResearchSDK includes a post-process script that runs after compilation to add required frameworks and linker flags for iOS. If you're using a Windows machine to generate the Xcode project or if the script fails, you'll need to add the frameworks and set the linker flags manually.
- Add the following frameworks to Target > Build Phases > Link Binary With Libraries:
- Select the build settings tab and type in Other Linker Flags in the search field.
- Add the following flag.
- Ensure you have the following inside the Assets > Plugins > Android folder:
Initialize the TapResearchSDK as early as possible. Please note that the
Configure() method only needs to be called once on app launch.
Also, your iOS and Android apps have different API tokens. Use pre-processor directives so Unity knows which API token to use when you build your app.
The next step will be to set a unique user identifier. Please note that without a unique identifier, the survey wall won't be available.
Our system only accepts User IDs with ASCII characters. If necessary, you can convert it to BASE64 before sending the User ID to us.
Placement is an object that should be attached to the app's call to action that will direct the users to TapResearch.
To view the available placements or creating a new one, navigate to the app settings in the Supplier Dashboard, and copy the placement's identifier.
Placement is encapsulated in the
TRPlacement object which contains metadata and the method to display the survey wall.
To initialize a placement, it is best practice to call the SDK as late as possible before displaying the placement in the app. For example, you can initialize it in the
of the scene where the placement will be visible.
The survey wall may or may not be available to a specific user and it's important to check survey availability before displaying the call to action.
A placement can only show the survey wall one time. Once the survey wall is dismissed, you'll have to initialize a new
TRPlacementobject if you wish the user to go back to TapResearch.
To display the survey wall, call the
ShowSurveyWall on your
Learn how to take the app live.
hasHotSurvey is a placement attribute that indicates a special high-yield survey is available for this user. When this attribute is true,
the user should be shown a special call to action to encourage them to take advantage of this opportunity.
These special survey opportunities may only be available for a few minutes, so
initPlacement should be called whenever the parent view is loaded.
If you want to use Hot Surveys, please contact firstname.lastname@example.org.
You can read more about server to server callbacks.
A new delegate has been added which is used by the SDK to let the app know a placement is ready or not available.
You no longer need to initialize a placememt manually. When implementing the delegate, you callbacks will alert you of a new placement for you to store its status. Placements are now passed at the time of showSurveyWall() with a new method overload.
When implementing the delegate, you callbacks will alert you of a new placement for you to store its status. Placements are now passed at the time of showSurveyWall() with a new method overload.
The SDK will check if the user has unredeemed rewards in the following events:
- On SDK initialization
- When the user exits TapResearch
RewardListener interface is the reward listener that will handle the new rewards that the player earned in a session. The object that implements the interface should be passed to
TapResearchSDK.getInstance().setRewardListener to get activated.
The reward information will be encapsulated in the
TRReward object with the following methods:
|TransactionIdentifier||String||The reward unique identifier|
|CurrencyName||String||The virtual currency name|
|PlacementIdentifier||String||The placement that started the session identifier|
|RewardAmount||int||The reward amount in virtual currency. The value will automatically be converted to your virtual currency based on the exchange rate you specified in the app settings.|
|PayoutEvent||int||The action that the user was rewarded for. 0 - Profile Complete, 3 - Survey Complete.|
It is important to note that
onReceiveReward will be called back-to-back if the player completed multiple surveys in one session.
Assign a delegate if you want to be notified when the survey wall status changes.
If you wish to customize the look of the survey wall modal to fit with the rest of your game, use the following:
To force the application to render in landscape mode only, it would be better to use the following screen orientation guide instead of disabling the portrait orientation in the player settings. TapResearch works better in portrait mode so using the player settings may result in some problems rendering the surveys.
To output debug info to logcat when generating an Android build, use the following:
- Exposed version string as public.
- Fixed a bug affecting Nav bar color customization.
- iOS race condition during init rarely affecting rewards and offers.
- Relocated TestButtonClick.cs to Plugins/TapResearch/TRExamples directory.
- Note: you can remove the old mainscene/TestButtonClick from Assets directory.
- A new Delegate has been added for handling the readiness of all placements. The SDK will fetch placements for you and alert you of their readiness.
- A new method was added for passing placements at the time of showing your SurveyWall.
- In every file that will reference the SDK, add
using TapResearch. All the SDK classes are under the
- The SDK API class was changed from
- Delete the following files from the previous SDK
- Check the library dependency manager section for more info about library dependencies.
Before you are ready to go live, the SDK can only work with a test device. Navigate to your dashboard and click the Add Devices button. Add a device name and a unique user identifier or a Google Advertising ID / Apple IDFA. Now, when you enter our survey flow through your app, you will be able to complete a test survey and receive a test reward when you re-open your app.
Please send all questions, concerns, or bug reports to email@example.com