Skip to content

Commit

Permalink
missed part of review request
Browse files Browse the repository at this point in the history
  • Loading branch information
popuz committed Aug 27, 2024
1 parent 2ba34fe commit 66262f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,12 @@ public class AnalyticsController : IAnalyticsController
private readonly IAnalyticsService analytics;
public AnalyticsConfiguration Configuration { get; }

public AnalyticsController(IAnalyticsService analyticsService, AnalyticsConfiguration configuration, string launcherAnonymousId, string sessionId)
public AnalyticsController(IAnalyticsService analyticsService, AnalyticsConfiguration configuration, LauncherTraits launcherTraits)
{
analytics = analyticsService;
Configuration = configuration;

analytics.AddPlugin(new StaticCommonTraitsPlugin(new LauncherTraits
{
LauncherAnonymousId = launcherAnonymousId,
SessionId = sessionId,
}));
analytics.AddPlugin(new StaticCommonTraitsPlugin(launcherTraits));

analytics.Track(AnalyticsEvents.General.SYSTEM_INFO_REPORT, new JsonObject
{
Expand Down
8 changes: 7 additions & 1 deletion Explorer/Assets/Scripts/Global/Dynamic/BootstrapContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,13 @@ await bootstrapContainer.InitializeContainerAsync<BootstrapContainer, BootstrapS
appArgs.TryGetValue("launcher_anonymous_id", out string? launcherAnonymousId);
appArgs.TryGetValue("session_id", out string? sessionId);

var analyticsController = new AnalyticsController(service, analyticsConfig, launcherAnonymousId!, sessionId!);
LauncherTraits launcherTraits = new LauncherTraits
{
LauncherAnonymousId = launcherAnonymousId!,
SessionId = sessionId!,
};

var analyticsController = new AnalyticsController(service, analyticsConfig, launcherTraits);

return (new BootstrapAnalyticsDecorator(coreBootstrap, analyticsController), analyticsController);
}
Expand Down

0 comments on commit 66262f7

Please sign in to comment.