{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Integrations","type":"markdown"},"seo":{"title":"FAnalyticsProviderTreasureData","description":"Unreal Engine SDK for Treasure AI analytics: real-time event tracking with immediate upload, region-specific configuration, and simple API key integration.","siteUrl":"https://docs.treasure.ai","lang":"en-US","jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.treasure.ai/","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},{"@type":"WebSite","@id":"https://docs.treasure.ai/#website","name":"Treasure AI Documentation","url":"https://docs.treasure.ai/","inLanguage":["en","ja"],"publisher":{"@id":"https://www.treasure.ai/"}}]},"llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"fanalyticsprovidertreasuredata","__idx":0},"children":["FAnalyticsProviderTreasureData"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"class FAnalyticsProviderTreasureData;\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Data Unreal Engine Analytics Provider plugin. This SDK will immediately upload events upon adding them. No local buffer used."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"public-types","__idx":2},"children":["Public Types"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"enum-fanalyticsregion","__idx":3},"children":["enum FAnalyticsRegion"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Enumerator"},"children":["Enumerator"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["US01"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["USA - us01.records.in.treasuredata.com"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["AP01"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Japan - ap01.records.in.treasuredata.com"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["AP02"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Korea - ap02.records.in.treasuredata.com"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["EU01"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Europe - eu01.records.in.treasuredata.com."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Check your organizations settings to verify the correct selection."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"public-functions","__idx":4},"children":["Public Functions"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create","__idx":5},"children":["Create"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"static inline TSharedPtr< IAnalyticsProvider > Create(\n    const FString Key,\n    const FString DBName,\n    FAnalyticsRegion Region\n)\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create Treasure Data Instance. All events will be recorded to two tables, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Sessions"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Events"]},"."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Param"},"children":["Param"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Write only API Key"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["DBName"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Database Name to log data to. Maximum length of 120 characters."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Region"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Treasure Account Region"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Return"]},": TD Analytics Provider Instance"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"destroy","__idx":6},"children":["Destroy"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"static inline void Destroy()\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Remove all configuration data from the Treasure Data instance."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"startsession","__idx":7},"children":["StartSession"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"virtual bool StartSession(\n    const TArray< FAnalyticsEventAttribute > & Attributes\n) override\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Start the session"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Param"},"children":["Param"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Attributes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Additional event attributes"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Return"]},": bool true if session started successfully"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"endsession","__idx":8},"children":["EndSession"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"virtual void EndSession() override\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["End the session"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"setuserid","__idx":9},"children":["SetUserID"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"virtual void SetUserID(\n    const FString & InUserID\n) override\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set the ID of the User"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Param"},"children":["Param"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["InUserID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String representing the User ID. Preferably Unique."]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getuserid","__idx":10},"children":["GetUserID"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"virtual FString GetUserID() const override\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Get the ID of the User"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Return"]},": FString string representing the User ID"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getsessionid","__idx":11},"children":["GetSessionID"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"virtual FString GetSessionID() const override\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Get the current session ID"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Return"]},": FString string representing the current session ID"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"setsessionid","__idx":12},"children":["SetSessionID"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"virtual bool SetSessionID(\n    const FString & InSessionID\n) override\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set the Session ID of the User"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Param"},"children":["Param"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["InSessionID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["session id as a string"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Return"]},": bool true if session id set successfully"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"recordevent","__idx":13},"children":["RecordEvent"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"virtual void RecordEvent(\n    const FString & EventName,\n    const TArray< FAnalyticsEventAttribute > & Attributes\n) override\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Record an event"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Param"},"children":["Param"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["EventName"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Name of Event"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Attributes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Attributes as an array"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"recorditempurchase","__idx":14},"children":["RecordItemPurchase"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"virtual void RecordItemPurchase(\n    const FString & ItemId,\n    const FString & Currency,\n    int PerItemCost,\n    int ItemQuantity\n) override\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Record an item purchase"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Param"},"children":["Param"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ItemId"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string representing ID of item"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Currency"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string representing ID of currency"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["PerItemCost"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["integer cost of item"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ItemQuantity"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["number of items"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"recordcurrencypurchase","__idx":15},"children":["RecordCurrencyPurchase"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"virtual void RecordCurrencyPurchase(\n    const FString & GameCurrencyType,\n    int GameCurrencyAmount,\n    const FString & RealCurrencyType,\n    float RealMoneyCost,\n    const FString & PaymentProvider\n) override\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Record purchase of currency"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Param"},"children":["Param"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["GameCurrencyType"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Type of currency as a string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["GameCurrencyAmount"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Amount of currency as a integer"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["RealCurrencyType"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Currency type as a string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["RealMoneyCost"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cost in Real dollars as a float"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["PaymentProvider"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Payment Provider as a string"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"recordcurrencygiven","__idx":16},"children":["RecordCurrencyGiven"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"virtual void RecordCurrencyGiven(\n    const FString & GameCurrencyType,\n    int GameCurrencyAmount\n) override\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Record the currency given to the user"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Param"},"children":["Param"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["GameCurrencyType"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Type of in-game currency as a string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["GameCurrencyAmount"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Amount of in-game currency as an integer"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"setbuildinfo","__idx":17},"children":["SetBuildInfo"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"virtual void SetBuildInfo(\n    const FString & InBuildInfo\n) override\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set the build information"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Param"},"children":["Param"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["InBuildInfo"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Build information as a string"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"setgender","__idx":18},"children":["SetGender"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"virtual void SetGender(\n    const FString & InGender\n) override\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set the Gender of the User"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Param"},"children":["Param"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["InGender"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String representing the gender"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"setlocation","__idx":19},"children":["SetLocation"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"virtual void SetLocation(\n    const FString & InLocation\n) override\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set the Location of the User"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Param"},"children":["Param"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["InLocation"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String representing the location of the user"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"setage","__idx":20},"children":["SetAge"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"virtual void SetAge(\n    const int32 InAge\n) override\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set the Age of the User"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Param"},"children":["Param"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["InAge"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer representing the age of the user"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"recorditempurchase-1","__idx":21},"children":["RecordItemPurchase"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"virtual void RecordItemPurchase(\n    const FString & ItemId,\n    int ItemQuantity,\n    const TArray< FAnalyticsEventAttribute > & EventAttrs\n) override\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Record the purchase of an in-game item"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Param"},"children":["Param"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ItemId"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID of the item as a string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ItemQuantity"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Number of items as an integer"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["EventAttrs"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Additional event attributes"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"recordcurrencypurchase-1","__idx":22},"children":["RecordCurrencyPurchase"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"virtual void RecordCurrencyPurchase(\n    const FString & GameCurrencyType,\n    int GameCurrencyAmount,\n    const TArray< FAnalyticsEventAttribute > & EventAttrs\n) override\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Record purchase of in-game currency"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Param"},"children":["Param"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["GameCurrencyType"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Type of currency in game as a string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["GameCurrencyAmount"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Amount of currency as an integer"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["EventAttrs"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Additional event attributes"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"recordcurrencygiven-1","__idx":23},"children":["RecordCurrencyGiven"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"virtual void RecordCurrencyGiven(\n    const FString & GameCurrencyType,\n    int GameCurrencyAmount,\n    const TArray< FAnalyticsEventAttribute > & EventAttrs\n) override\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Record currency given to user in-game"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Param"},"children":["Param"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["GameCurrencyType"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Type of currency"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["GameCurrencyAmount"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Amount of currency"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["EventAttrs"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Additional event attributes"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"recorderror","__idx":24},"children":["RecordError"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"virtual void RecordError(\n    const FString & Error,\n    const TArray< FAnalyticsEventAttribute > & EventAttrs\n) override\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When things go wrong, record an error"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Param"},"children":["Param"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Error"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Error event name"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["EventAttrs"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Error event attributes"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"recordprogress","__idx":25},"children":["RecordProgress"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"virtual void RecordProgress(\n    const FString & ProgressType,\n    const FString & ProgressHierarchy,\n    const TArray< FAnalyticsEventAttribute > & EventAttrs\n) override\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Record progress of user"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Param"},"children":["Param"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ProgressType"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Type of progress as a string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ProgressHierarchy"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Hierarchy of progress as a string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["EventAttrs"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Additional event attributes"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"addeventattribute","__idx":26},"children":["AddEventAttribute"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"void AddEventAttribute(\n    const FString & EventName,\n    const FString & EventValue\n)\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add basic event with value"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Param"},"children":["Param"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["EventName"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Name of Event"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["EventValue"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Value of event"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"cleareventattributes","__idx":27},"children":["ClearEventAttributes"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"void ClearEventAttributes()\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Clear event attributes"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getregion","__idx":28},"children":["GetRegion"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"inline FAnalyticsRegion GetRegion()\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Return the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#enum-fanalyticsregion"},"children":["AnalyticsRegion"]}," currently set for the object instance."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getapiurl","__idx":29},"children":["GetAPIURL"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cpp","header":{"controls":{"copy":{}}},"source":"inline FString GetAPIURL()\n","lang":"cpp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Convenience function to transform API Endpoint enumerations into Postback API address string."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Return"]},": string with the Postback API endpoint"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]}]},"headings":[{"value":"FAnalyticsProviderTreasureData","id":"fanalyticsprovidertreasuredata","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"Public Types","id":"public-types","depth":2},{"value":"enum FAnalyticsRegion","id":"enum-fanalyticsregion","depth":3},{"value":"Public Functions","id":"public-functions","depth":2},{"value":"Create","id":"create","depth":3},{"value":"Destroy","id":"destroy","depth":3},{"value":"StartSession","id":"startsession","depth":3},{"value":"EndSession","id":"endsession","depth":3},{"value":"SetUserID","id":"setuserid","depth":3},{"value":"GetUserID","id":"getuserid","depth":3},{"value":"GetSessionID","id":"getsessionid","depth":3},{"value":"SetSessionID","id":"setsessionid","depth":3},{"value":"RecordEvent","id":"recordevent","depth":3},{"value":"RecordItemPurchase","id":"recorditempurchase","depth":3},{"value":"RecordCurrencyPurchase","id":"recordcurrencypurchase","depth":3},{"value":"RecordCurrencyGiven","id":"recordcurrencygiven","depth":3},{"value":"SetBuildInfo","id":"setbuildinfo","depth":3},{"value":"SetGender","id":"setgender","depth":3},{"value":"SetLocation","id":"setlocation","depth":3},{"value":"SetAge","id":"setage","depth":3},{"value":"RecordItemPurchase","id":"recorditempurchase-1","depth":3},{"value":"RecordCurrencyPurchase","id":"recordcurrencypurchase-1","depth":3},{"value":"RecordCurrencyGiven","id":"recordcurrencygiven-1","depth":3},{"value":"RecordError","id":"recorderror","depth":3},{"value":"RecordProgress","id":"recordprogress","depth":3},{"value":"AddEventAttribute","id":"addeventattribute","depth":3},{"value":"ClearEventAttributes","id":"cleareventattributes","depth":3},{"value":"GetRegion","id":"getregion","depth":3},{"value":"GetAPIURL","id":"getapiurl","depth":3}],"frontmatter":{"redirects":{"/s/unreal-sdk":{},"/s/unreal-sdk-en":{}},"seo":{"title":"FAnalyticsProviderTreasureData","description":"Unreal Engine SDK for Treasure AI analytics: real-time event tracking with immediate upload, region-specific configuration, and simple API key integration."}},"lastModified":"2026-06-17T07:22:53.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/int/unreal-engine-sdk-api","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}