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.

Installation

See here for TapResearch SDK Unity integration documentation.

Example apps are available here

Before You Begin

  • You must be on SDK v3.4.1+ to have access to Survey Wall Preview.
  • The wall 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
  • Survey wall preview should be on a dedicated placement, separate from the standard Survey Wall (if applicable)
  • Always wait until the SDK is ready (via the TapResearchSdkReady callback or by checking TapResearchSDK.IsReady()) before calling any survey wall preview interfaces
Support

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

Introduction

Survey wall preview allows you to provide users with available surveys, directly inside your app. Some benefits of this include:

  • Custom UI — Create your own UI presentation with survey tiles/cards
  • Direct survey access — Provide users with direct entry into surveys they choose

Key Considerations & UI Design

When designing your survey tiles/cards, consider these elements:

1. The Profile Survey

New users must complete the introductory profile survey before they can access other surveys. For these new users, the SDK will return only this survey until they have completed it.

  • Only shown to users that are new to TapResearch
  • Will always be returned by itself, with survey_identifier: 'profile'
  • Display example:
Profile tile preview

2. Survey Details

After completing the profile survey, users should then start receiving real surveys. Surveys will have the following attributes:

public class TRSurvey {
// Primary attributes
[SerializeField] private string surveyIdentifier; // Unique identifier, will be used when a user taps on a survey
[SerializeField] private string currencyName; // The name of the reward currency
[SerializeField] private int lengthInMinutes; // The estimated time to complete the survey
[SerializeField] private double rewardAmount; // The reward amount for taking the survey
[SerializeField] private bool isHotTile; // Whether the survey should be designated as a "hot tile"

// Sale attributes
[SerializeField] private bool isSale; // Whether a currency sale is currently active
[SerializeField] private double saleMultiplier; // The multiplier being applied to the sale
[SerializeField] private double preSaleRewardAmount; // The pre-multiplier reward amount, for enhancing UI during a sale
[SerializeField] private string saleEndDate; // If a sale is active, the UTC date it will end


public string SurveyIdentifier { get { return surveyIdentifier; } }
public string CurrencyName { get { return currencyName; } }
public int LengthInMinutes { get { return lengthInMinutes; } }
public double RewardAmount { get { return rewardAmount; } }
public bool IsHotTile { get { return isHotTile; } }
public bool IsSale { get { return isSale; } }
public double SaleMultiplier { get { return saleMultiplier; } }
public double PreSaleRewardAmount { get { return preSaleRewardAmount; } }
public string SaleEndDate { get { return saleEndDate; } }
}
  • We recommend displaying all primary data points to allow users to choose which survey length/reward they want
  • Display example:
Tiles preview

3. "Hot" Tiles

Hot tiles are surveys with exceptional scores, typically offering the best time-to-reward ratio. Displaying a special UI highlight for these surveys is recommended, as they tend to increase user engagement and click-through rates.

  • Display example:
Hot tile

4. Currency Sales

When running promotional currency sales, the relevant sale attributes of the survey object will populate, allowing you to show enhanced UIs and CTAs to users. We recommend using this data to display the extra rewards boost on the individual tiles.

  • Display example:
Currency Sale Preview

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
}