Skip to main content
Version: 3.x

Unity Survey Wall Preview

Notes on apps in test mode!

If your app is in test mode, you MUST use a test user. These are defined in "Test Devices" on the dashboard.

Support

If you are experiencing issues or need assistance, please reach out to developers@tapresearch.com

danger

Survey Wall Preview is a beta feature in SDK v3.4.1! In order to use this feature, you must be enabled by your TapResearch account rep. If you are interested in this feature, please reach out to developers@tapresearch.com.

Installation

See here for TapResearch SDK Unity integration documentation.

Example apps are available here

Survey Wall Preview

The Survey Wall Preview allows you to:

  • Provide a quicker path into surveys.
  • Create your own native presentation to list surveys. We send 5 surveys maximum.

At its most-basic level: you call the SDK to get the available surveys for a placement, these are returned to you as an array of TRSurvey objects which you can use to feed your native display:

public class TRSurvey
{
[SerializeField] private string surveyIdentifier;
[SerializeField] private string lengthInMinutes;
[SerializeField] private string rewardAmount;
[SerializeField] private string currencyName;

public string SurveyIdentifier { get { return surveyIdentifier; } }
public string LengthInMinutes { get { return lengthInMinutes; } }
public string RewardAmount { get { return rewardAmount; } }
public string CurrencyName { get { return currencyName; } }
}

Before You Begin

  • You must be on Unity 3.4.1 or higher to have access to Survey Wall Preview.
  • The preview feature needs to be enabled and set up by the TapResearch team so please reach out to your account manager when you are ready to get started
  • A new placement must be created that is separate from the standard Survey Wall
  • Profiler survey needs to be displayed first on its own if the user is new to TapResearch
    • The profiler may need to have a different design than the other survey wall preview tiles
      • This is especially true if there is no reward
    • It will say ‘Profiler’ in the survey identifier field in order to differentiate it
Support

Any other questions? Reach out to your account manager or via Slack and we'll be happy to help!

Integration

SDK Interfaces

Checking for available surveys

When you have received notification that the SDK is ready (see here) you should first check if there are surveys available for your placement:

View in context

bool flag = TapResearchSDK.HasSurveys("placementTag");

Getting available surveys

Get the surveys for your placement.

View in context

TRSurvey[] surveys = TapResearchSDK.GetSurveysForPlacement("placementTag");

Showing a survey

Showing a survey works similarly to showContent used for showing TapResearch survey content: after checking if a survey can be shown, call showSurvey with a survey ID, placement tag and a content delegate to receive onTapResearchContentShown and onTapResearchContentDismissed callbacks, for more information about these callbacks see here.

View in context

TapResearchSDK.ShowSurveyForPlacement(survey.SurveyIdentifier, placementTag);

If you need to pass custom parameters you can use ShowSurveyForPlacement and pass a dictionary:

Dictionary<string, object> customParameters = new Dictionary<string,object>();
customParameters["player_attribute"] = "my-vip";
customParameters["data_value"] = "integer";
customParameters["another_number"] = 12;
customParameters.Add("another_string", "it's another string!");

TapResearchSDK.ShowSurveyForPlacement(survey.SurveyIdentifier, placementTag, customParameters);

Callback

Survey Wall Preview adds a required callback that lets you know when surveys have been refreshed.

Setting the callback

Required: You must set the delegate using SetEnableSurveysRefreshedCallback:

View in context

TapResearchSDK.SetEnableSurveysRefreshedCallback(true);

To enable the callback pass true to disable pass false. It is a good practice to disable the callback when it is not needed, for example when the game is no longer in the scene where you display the surveys.

Handling the callback

You will see calls to the callback function when surveys have been completed, after any TapResearch content has been dismissed.

Required: Make sure to set the SDK's TapResearchSurveysRefreshDelegate callback:

The callback is defined as void TapResearchSurveysRefreshDelegate(string placementTag). To set the callback:

TapResearchSDK.TapResearchSurveysRefreshed = TapResearchSurveysRefreshed;

Implement the callback:

View in context

private void TapResearchSurveysRefreshed(string placementTag) {
TRSurvey[] surveys = TapResearchSDK.GetSurveysForPlacement(placementTag);
// Update displayed survey buttons
}