C++ Build Configuration for AnalyticsBlueprintLibrary

Hi, I’m trying to use the AnalyticsBlueprintLibrary in C++ but can’t get it to link. I’ve enabled the plug in but get linker errors when trying to use a function. This is my build.cs

PublicDependencyModuleNames.AddRange(new string[] {
“AIModule”
, “Analytics”
, “AnalyticsBlueprintLibrary”

});

    // To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
    PrivateDependencyModuleNames.AddRange(new string[] { "Analytics", "AnalyticsBlueprintLibrary", ... } );

Thanks for any help, it would be really convenient to use the Blueprint lib natively as we’re a C++ based game an all of our events are in code.

Hello. Same problem.

Hello. Solve for me is use this code.
FAnalytics::Get().GetDefaultConfiguredProvider()->StartSession()
FAnalytics::Get().GetDefaultConfiguredProvider()->EndSession()

You need add analitycs plugin. Game Analytics for example.Include this header.
#include “Runtime/Analytics/Analytics/Public/Analytics.h”
#include “Runtime/Analytics/Analytics/Public/Interfaces/IAnalyticsProvider.h”

This is not the solution I was looking for, we are doing this. The BlueprintAnalyticsLibrary just wraps everything nicely to interface with code, just like how you can use the GameplayStatics in code or blueprints.

My sad solution has just been to copy and paste it into another library class that is accessible :frowning: