Upsight logo Back to top

Getting Started


Token and Secret

Every app on the Upsight Marketing Dashboard has a unique Token and a unique Secret to identify it. These are both alphanumeric strings 32 characters long. The token and secret uniquely identify your application and prevent others from making API requests on your behalf. They are located on the Upsight Dashboard in the App Settings page for your application.

Note Both the Token and the Secret will be required in order to connect your app to the Dashboard.

You may choose to pass these into Upsight as resources by adding them to res/values/strings.xml.

Note If you are using Maven, the path would be src/main/android/res/values/strings.xml.

<string name="token">fedbca9876543210fedbca9876543210</string>
<string name="secret">fedbca98765432100123456789abcedf</string>


Placement Tags

Placements are hooks within your app that can trigger Upsight content such as cross-promotions for your other apps or announcements. To create a Placement in your app you will need a Placement Tag to identify the Placement on the Dashboard. To create a Placement Tag, you will need access to the Upsight Dashboard.

It is recommended that you add as many varied placements as possible to give you the most flexibility to experiment and connect with your users throughout the app experience. These placements will remain invisible to your players until content is assigned to them via the Upsight Marketing Dashboard.

In this example, you will create a Placement that can associate with your app launching.

  1. Click on your app on the Upsight Marketing Dashboard homepage.
  2. Click on the App Settings button.
  3. Click on the Placements link.
  4. Click on the Add Placement button.
  5. In the Placement Tag field, enter app_launch.
  6. In the Description field, enter a relevant description.
  7. Click the Save button.

The Add Placement Screen

For more information on Placements, refer to the Placements Guide for best practices and tips.


Content Units

Although your app can be integrated without any Content Units, you can only full experience and test an integration by having a Content Unit that is linked to a Placement on the Upsight Marketing Dashboard. This will allow you to see what your users will see when a Placement is triggered in your app.

In this example, you will create an Internal Cross-Promotion and associate it to your app_launch placement.

  1. Click on your app on the Upsight Marketing Dashboard homepage.
  2. Click on the Add Content button.
  3. Click on on the Add Internal Cross-Promotion button.
  4. Enter Test Ad for the Internal Cross-Promotion name.
  5. Enter name of app(s) for Internal Cross-Promotion.
  6. Upload image(s) associated with Internal Cross-Promotion.
  7. Under Placement(s), check the box for app_launch placement you created.
  8. Click the Publish button.

Add an Internal Cross-Promotion Screen

Step 1 Add Upsight SDK to the Project

The Upsight SDK is distributed as an Android Library Project, or APKLIB. Unlike a library distributed as a JAR, an APKLIB allows you as an app developer to use Android resources (such as images and strings) from your SDK.

For access to Upsight's Marking SDK, please contact your Customer Success Manager.

Step 2 Make an Open Call

Making an Open Call is required as it assists in collecting accurate data to measure performance and effectiveness of your implementations.

We will require the Token and Secret that we defined in XML earlier on. We can reference them in our Java code to configure the PlayHaven object.

PlayHaven.configure(this, R.string.token, R.string.secret);

Once PlayHaven has been configured, we can create an Open request and send it.

OpenRequest open = new OpenRequest();

We recommend you place this in the method that initializes your activity like the onCreate(Bundle) method.

Important If you are using the Enterprise and regular SDKs, make sure to call the startSession method before making an OpenRequest Open Call.

Step 3 Requesting Content Units

You will need to incorporate content request calls into your application to display content units that are defined in the Upsight dashboard. Content requests are made using your application token, secret, and a placement tag to identify the placement for which you are requesting content.

The example below demonstrates a content request for the placement app_launch. In the example, we'll use the SDK's convenience method to create the appropriate intent. The first parameter is our Content (i.e. this Activity). The second paramter is our placement tag as defined in the Dashboard.

startActivity(FullScreen.createIntent(this, "app_launch"));

Once the ad is closed, the activity passed as this will be resumed.

You can also set additional options or disable the loading overlay, you can view these instructions in the advanced section here.

Step 4 Integration Checklist

To help make the integration process easier, we've created a checklist with troubleshooting tips that you can follow. If you are not getting expected results after integration, consults the checklist to see if there are any steps that you are missing.

Integration Checklist