Skip to content
Get Started

FirstLook SDK Setup

The FirstLook SDK is an Unreal Engine plugin that will allow you to interface with FirstLook from your Unreal game. The plugin currently supports Steam login, in-game surveys, session tracking, custom events, and custom duration events. The primary access point for the FirstLook SDK is the UFirstLookSubsystem which exposes a number of methods and delegates used to interact with FirstLook.

For this setup guide, we will assume you have an Unreal game project named MyGame.

  1. Acquire the FirstLookSDK from the admin dashboard. Download
SDK

  2. Generate Unreal SDK configs. SDK Config
  3. Setup your Steam game in FirstLook. See the Steam Integration.
  4. Invite a test player to your playtest with their Steam account linked. See the Inviting Players.

Setting up the FirstLookSDK Plugin in Unreal

Section titled “Setting up the FirstLookSDK Plugin in Unreal”

Now that you’ve acquired the FirstLookSDK and set up your game in FirstLook, we can install the plugin into your Unreal project.

  1. Move the FirstLookSDK plugin to MyGame/Plugins/FirstLookSDK. Create the MyGame/Plugins directory if one does not already exist.

  2. Register the FirstLookSDK plugin in the MyGame.uproject file.

    "Plugins": [
    {
    "Name": "FirstLookSDK",
    "Enabled": true
    }
    ]
  3. Add the FirstLookSDK plugin as a dependency in the MyGame.Build.cs file.

    PrivateDependencyModuleNames.AddRange(new string[] {"FirstLookSDK"});
  4. In the Unreal Editor, configure the FirstLookSDK plugin settings for FirstLookApiURL and FirstLookClientURL under:

    Edit > ProjectSettings > Plugins > FirstLook Plugin Settings

    • Alternatively, configure the plugin in the DefaultGame.ini file:

      [/Script/FirstLookSDK.FirstLookSDKSettings]
      FirstLookApiURL="https://api.firstlook.gg"
      FirstLookClientURL="https://<game-slug>.firstlook.gg"

      (Replace <game-slug> with your FirstLook game slug)

    To find your client URL, check your domain from your FirstLook settings: Client URL

  5. Configure OnlineSubsystemSteam in the DefaultEngine.ini file.

    [OnlineSubsystem]
    DefaultPlatformService=Steam
    [OnlineSubsystemSteam]
    bEnabled=true
    SteamDevAppId=<steam-app-id>

    (Replace <steam-app-id> with your Steam app ID)

  6. Setup Unreal CommonUI.

    • Follow Step 1 of this guide to set the default Game Viewport Client Class to CommonGameViewportClient.

Now that the FirstLookSDK Unreal plugin is properly setup, FirstLook Steam login will work out of the box since it is automatically called during the FirstLook subsystem initialization. There are just a few steps we need to take in order to test the integration locally.

  1. In the Unreal Editor, enable logging for Standalone Game mode

    • Under Edit > Editor Preferences, navigate to:

      Level Editor > Play > Play in Standalone Game > Additional Launch Parameters

    • Add -log as a launch parameter

    • Standalone Logging

  2. Play as Standalone Game

  3. In the output log, you should see log line indicating a successful login from the LogFirstLookSDK log category

    • e.g. LogFirstLookSDK: Verbose: Login succeeded.

The FirstLook SDK automatically tracks player sessions without any additional code on your part. A session begins when the UFirstLookSubsystem initializes, and ends when the game client shuts down gracefully. Players who haven’t created a FirstLook account yet are still tracked — they’ll appear as Unlinked players in your dashboard, with their Steam account associated if they’re signed in.

Once sessions are being recorded, you’ll see player activity and session duration data on the Analytics page under the Retention tab, as well as on each individual Player Profile.

Beyond automatic session tracking, you can instrument your own gameplay events to capture whatever matters most to your studio — hero selections, match outcomes, store purchases, and more. Use the PostCounterEvent method on the UFirstLookSubsystem to send a named counter with an integer value:

UCLASS()
class FIRSTLOOKSDK_API UFirstLookSubsystem : public ULocalPlayerSubsystem
{
public:
// ...
UFUNCTION(BlueprintCallable, Category = FirstLook)
void PostCounterEvent(FString CounterName, int32 Count);
// ...
}

Below is an example of posting a counter event from a UCommonActivatableWidget. In this case, we’re recording that a player selected a hero from the loadout screen:

void UMainMenu::HandleSendCounterEventClicked()
{
if (ULocalPlayer* OwningLocalPlayer = GetOwningLocalPlayer();
OwningLocalPlayer != nullptr)
{
if (UFirstLookSubsystem* FirstLookSubsystem =
OwningLocalPlayer->GetSubsystem<UFirstLookSubsystem>())
{
FirstLookSubsystem->PostCounterEvent("loadout.hero-a-selected", 1);
}
}
}

Event names follow a <category>.<event-type> convention. When you use this pattern, FirstLook will automatically group related events together on the Analytics page and on Player Profiles, making it easy to browse metrics by category.

Choose a category namespace that reflects where the event occurs in your game — for example, match, lobby, menu, store, or in-game. You’re free to define as many categories as you need.

Counter events record that something happened, but sometimes you need to know how long something took. Duration events let you measure elapsed time between two explicit points in your game — a match, a loading screen, time spent in a menu, or any other span you want to track.

The SDK exposes a StartDurationEvent / EndDurationEvent pair on the UFirstLookSubsystem:

UCLASS()
class FIRSTLOOKSDK_API UFirstLookSubsystem : public ULocalPlayerSubsystem
{
public:
// ...
UFUNCTION(BlueprintCallable, Category = FirstLook)
void StartDurationEvent(FString DurationName);
UFUNCTION(BlueprintCallable, Category = FirstLook)
void EndDurationEvent(FString DurationName);
// ...
}

Call StartDurationEvent when the activity begins and EndDurationEvent when it finishes. The SDK handles timing and delivery — you just provide a name.

Below is an example that tracks how long a player spends in a match. StartDurationEvent is called when the match begins, and EndDurationEvent when it ends:

void AMyGameMode::OnMatchStart()
{
for (APlayerController* PC : GetWorld()->GetPlayerControllerIterator())
{
if (ULocalPlayer* LP = PC->GetLocalPlayer())
{
if (UFirstLookSubsystem* FirstLook = LP->GetSubsystem<UFirstLookSubsystem>())
{
FirstLook->StartDurationEvent("match.round");
}
}
}
}
void AMyGameMode::OnMatchEnd()
{
for (APlayerController* PC : GetWorld()->GetPlayerControllerIterator())
{
if (ULocalPlayer* LP = PC->GetLocalPlayer())
{
if (UFirstLookSubsystem* FirstLook = LP->GetSubsystem<UFirstLookSubsystem>())
{
FirstLook->EndDurationEvent("match.round");
}
}
}
}

Duration event names follow the same <category>.<event-type> convention as counter events. FirstLook automatically groups them by category prefix on the Analytics page.

Now that you are able to successfully login to FirstLook, you will be able to use the FirstLook subsystem to trigger in-game surveys.

  1. Create a survey with game client distribution enabled. See the Creating a Survey

  2. Setup a trigger for your newly created survey. See the Setting Up Triggers.

  3. Register the survey delegates in Unreal:

    UFirstLookSubsystem::OnNewNativeSurveyAvailable:

    • The WBP_Survey_Screen widget should be displayed when this delegate is called. This widget can be found under: MyGame/Plugins/FirstLookSDK/Content/UI_Survey/Widgets/WBP_Survey_Screen.uasset

    UFirstLookSubsystem::OnNewBrowserSurveyAvailable:

    • Hooked up by default to show a Steam browser overlay using UFirstLookSubsystem::ActivateSurveyBrowserOverlay

  4. Make a call to UFirstLookSubsystem::PostEvent with the trigger you created for your survey. If the trigger condition is met, this will trigger one of the delegates that we setup in the previous step depending on the configured survey distribution channel.