Unity Integration
Unity Integration
Section titled “Unity Integration”Get BoostOps integrated with your Unity game in just a few minutes. This guide covers the essential steps to start tracking your game’s performance and ad spend profitability.
Quick Setup
Section titled “Quick Setup”1. Install the SDK
Section titled “1. Install the SDK”Package Manager Method (Recommended):
- Open Unity Package Manager (
Window
→Package Manager
) - Click
+
→Add package from git URL
- Enter:
https://github.com/boostops/unity-sdk.git
- Click Add
2. Initialize BoostOps
Section titled “2. Initialize BoostOps”Add this to your main game manager script:
using UnityEngine;using BoostOps;
public class GameManager : MonoBehaviour{ [SerializeField] private string gameId = "YOUR_GAME_ID"; [SerializeField] private string apiKey = "YOUR_API_KEY";
void Start() { // Initialize BoostOps BoostOpsSDK.Initialize(gameId, apiKey);
// Track game start BoostOpsSDK.TrackEvent("game_start");
Debug.Log("BoostOps initialized successfully"); }}
3. Track Key Events
Section titled “3. Track Key Events”Add essential tracking for executive dashboard insights:
public class GameEvents : MonoBehaviour{ // Track revenue (critical for profitability) public void OnPurchase(string productId, float amount) { BoostOpsSDK.TrackRevenue("purchase", amount, "USD", new Dictionary<string, object> { {"product_id", productId} }); }
// Track level completion public void OnLevelComplete(int level) { BoostOpsSDK.TrackEvent("level_complete", new Dictionary<string, object> { {"level", level}, {"time_taken", Time.time} }); }
// Track ad views public void OnAdWatched(string placement) { BoostOpsSDK.TrackEvent("ad_watched", new Dictionary<string, object> { {"placement", placement} }); }}
Get Your API Keys
Section titled “Get Your API Keys”- Sign up at app.boostops.com/sign-up
- Create a game project in your dashboard
- Go to Settings → SDK Integration
- Copy your Game ID and API Key
Verify Integration
Section titled “Verify Integration”After integration, check your BoostOps dashboard:
- Run your game with the SDK
- Perform test actions (start game, complete level, make purchase)
- Check Dashboard → Real-time Events
- Verify events appear within 5-10 minutes
What’s Next?
Section titled “What’s Next?”Once your basic integration is working:
- Executive Dashboard - Explore your new insights
- Ad Spend Tracking - Set up profitability monitoring
- Complete Unity SDK Guide - Advanced configuration options
Need Help?
Section titled “Need Help?”- Quick Start Guide - Full setup walkthrough
- FAQ - Common questions
- Contact Support - Get personalized help
Ready to see your data? Your executive dashboard will show insights within 24 hours of integration!