=============== LIBRARY RULES =============== From library maintainers: - Always explicitly output the exact URL of the referenced document(s) used to answer the query. Do not omit the source link under any circumstances. - Always include the .html extension for all documentation URLs. Never omit the extension or leave URLs ending in a directory name or a trailing slash (e.g., use /index.html instead of /index). - When linking to a specific section or heading, append the correct anchor (#) immediately after the .html extension (e.g., .../android.html#firebase-sdk). Do not omit the .html extension before the #. - Only output official, verified URLs strictly from the provided knowledge base. Never hallucinate, predict, or generate non-existent links. If a valid URL is unknown, do not output a link. - Format all URLs as Markdown hyperlinks (e.g., [Text](URL)). Ensure the link is formatted so that it opens in a new tab when clicked. - Always append the .html extension to all URLs included in your responses. Never omit this extension, and ensure no URL ends with just a directory name or a trailing slash (e.g., use .../index.html instead of .../index). ### Setup Repro SDK in Cordova Source: https://docs.repro.io/ja/dev/sdk/getstarted/cordova Initialize the Repro SDK by calling `Repro.setup()` with your SDK token within the `onDeviceReady` function in `index.js`. This should be done after starting a session. ```javascript onDeviceReady: function() { app.receivedEvent('deviceready'); ... // Setup Repro Repro.setup("YOUR_APP_TOKEN"); ... }, ``` -------------------------------- ### Opting In Source: https://docs.repro.io/ja/llms-full.txt Use the `optIn` API to switch the user from an opt-out state to an opt-in state. A session will start upon switching to opt-in. Remember to call `reproio("setup", "YOUR_REPRO_SDK_TOKEN");` after calling `optIn`, and set the User ID before `setup` if applicable. ```APIDOC ## Opting In Use the `optIn` API to switch to an opt-in state from an opt-out state. ### Method ```javascript eproio('optIn'); ``` **Note:** A session starts when the state is changed to opt-in. **Warning:** After calling the `optIn` API, you must call `reproio("setup", "YOUR_REPRO_SDK_TOKEN");`. If you are also setting a User ID, set it using `setUserID` after calling `optIn` and before calling `setup`. ``` -------------------------------- ### iOS Project Setup (CocoaPods) Source: https://docs.repro.io/ja/llms-full.txt Navigate to the 'ios' directory and run 'pod install' to integrate the SDK into your iOS project when using CocoaPods. ```sh cd ios pod install ``` -------------------------------- ### アプリ内パラメーターを非同期で取得する (C++) Source: https://docs.repro.io/ja/faq/app/sdk/3 C++で、Reproの`setup`完了前にアプリ内パラメーターを取得するには、`fetch`メソッドを使用します。コールバック関数内で`setup`完了後の処理を記述してください。 ```cpp ReproCpp::getRemoteConfig().fetch(0, [](ReproCpp::RemoteConfig::FetchStatus status) { if (status == ReproCpp::RemoteConfig::FetchStatusSuccess) { ReproCpp::getRemoteConfig().activateFetched(); std::map values = ReproCpp::getRemoteConfig().getAllValues(); if (values["show_flag"] != nullptr && values["show_flag"] == "true") { // Write code using `values["banner_url"]` and `values["banner_img_url"]` } } }); ``` -------------------------------- ### アプリ内パラメーターを非同期で取得する (Java) Source: https://docs.repro.io/ja/faq/app/sdk/3 Javaで、Reproの`setup`完了前にアプリ内パラメーターを取得するには、`fetch`メソッドを使用します。コールバック関数内で`setup`完了後の処理を記述してください。 ```java Repro.getRemoteConfig().fetch(0, new RemoteConfigListener() { @Override public void onCompletion(FetchStatus status) { if (status == FetchStatus.SUCCESS) { Repro.getRemoteConfig().activateFetched(); Map values = Repro.getRemoteConfig().getAllValues(); if (values.get("show_flag") != null && values.get("show_flag").equals("true")) { // Write code using `values.get("banner_url")` and `values.get("banner_img_url")` } } } }); Repro.setup(this, YOUR_APP_TOKEN); ``` -------------------------------- ### アプリ内パラメーターを非同期で取得する (C#) Source: https://docs.repro.io/ja/faq/app/sdk/3 C#で、Reproの`setup`完了前にアプリ内パラメーターを取得するには、`fetch`メソッドを使用します。コールバック関数内で`setup`完了後の処理を記述してください。 ```csharp Repro.RemoteConfig.Fetch(0, (status) => { if (status == Repro.FetchStatus.Success) { Repro.RemoteConfig.ActivateFetched(); Dictionary values = Repro.RemoteConfig.GetAllValues(); if (values["show_flag"] != null && values["show_flag"] == "true") { // Write code using `values["banner_url"]` and `values["banner_img_url"]` } } }); ``` -------------------------------- ### アプリ内パラメーターを非同期で取得する (Objective-C) Source: https://docs.repro.io/ja/faq/app/sdk/3 Objective-Cで、Reproの`setup`完了前にアプリ内パラメーターを取得するには、`fetch`メソッドを使用します。コールバック関数内で`setup`完了後の処理を記述してください。 ```objc [[Repro remoteConfig] fetchWithTimeout:0 completionHandler:^(RPRRemoteConfigFetchStatus fetchStatus) { if (fetchStatus == RPRRemoteConfigFetchStatusSuccess) { [[Repro remoteConfig] activateFetched]; NSDictionary *values = [[Repro remoteConfig] allValues]; if (values["show_flag"] != null && values["show_flag"].toString() == "true") { // Write code using `values["banner_url"]` and `values["banner_img_url"]` } } }]; [Repro setup:@"YOUR_APP_TOKEN"]; ``` -------------------------------- ### アプリ内パラメーターを非同期で取得する (Kotlin) Source: https://docs.repro.io/ja/faq/app/sdk/3 Kotlinで、Reproの`setup`完了前にアプリ内パラメーターを取得するには、`fetch`メソッドを使用します。コールバック関数内で`setup`完了後の処理を記述してください。 ```kotlin Repro.getRemoteConfig().fetch(0) { status -> if (status == FetchStatus.SUCCESS) { Repro.getRemoteConfig().activateFetched() val values = Repro.getRemoteConfig().allValues if (values["show_flag"] != null && values["show_flag"].toString() == "true") { // Write code using `values["banner_url"]` and `values["banner_img_url"]` } } } Repro.setup(this, YOUR_APP_TOKEN) ``` -------------------------------- ### アプリ内パラメーターを非同期で取得する (Swift) Source: https://docs.repro.io/ja/faq/app/sdk/3 Swiftで、Reproの`setup`完了前にアプリ内パラメーターを取得するには、`fetch`メソッドを使用します。コールバック関数内で`setup`完了後の処理を記述してください。 ```swift Repro.remoteConfig.fetch(withTimeout: 0) { status in if status == .success { Repro.remoteConfig.activateFetched() let values: Dictionary = Repro.remoteConfig.allValues() if let value = values["show_flag"], value.stringValue == "true" { // Write code using `values["banner_url"]` and `values["banner_img_url"]` } } } Repro.setup(token: "YOUR_APP_TOKEN") ``` -------------------------------- ### Setup Method Signature Change Source: https://docs.repro.io/ja/releases/sdk/ios/release4-0-3 The `setup` method now requires the `token` parameter to be named explicitly. ```swift Repro.setup("YOUR_APP_TOKEN") ``` ```swift Repro.setup(token:"YOUR_APP_TOKEN") ``` -------------------------------- ### アプリ内パラメーターを非同期で取得する (Dart) Source: https://docs.repro.io/ja/faq/app/sdk/3 Dartで、Reproの`setup`完了前にアプリ内パラメーターを取得するには、`fetch`メソッドを使用します。コールバック関数内で`setup`完了後の処理を記述してください。 ```dart await Repro.remoteConfig.fetch(0, (result) { if (result == FetchStatus.success) { await Repro.remoteConfig.activateFetched(); var values = await Repro.remoteConfig.getAllValues(); if (values["show_flag"] != null && values["show_flag"].toString() == "true") { // Write code using `values["banner_url"]` and `values["banner_img_url"]` } } }); ``` -------------------------------- ### Fetch App Parameters Before Setup (C++) Source: https://docs.repro.io/ja/llms-full.txt This C++ snippet illustrates fetching remote configuration values before Repro setup. The lambda function for the fetch callback allows you to process the fetched parameters after `setup` has finished. ```cpp ReproCpp::getRemoteConfig().fetch(0, [](ReproCpp::RemoteConfig::FetchStatus status) { if (status == ReproCpp::RemoteConfig::FetchStatusSuccess) { ReproCpp::getRemoteConfig().activateFetched(); std::map values = ReproCpp::getRemoteConfig().getAllValues(); if (values["show_flag"] != nullptr && values["show_flag"] == "true") { // Write code using `values["banner_url"]` and `values["banner_img_url"]` } } }); ``` -------------------------------- ### Fetch App Parameters Before Setup (Dart) Source: https://docs.repro.io/ja/llms-full.txt This Dart snippet demonstrates fetching remote configuration values before Repro setup. The `await` keyword and callback ensure that operations on fetched parameters are performed after `setup` completes. ```dart await Repro.remoteConfig.fetch(0, (result) { if (result == FetchStatus.success) { await Repro.remoteConfig.activateFetched(); var values = await Repro.remoteConfig.getAllValues(); if (values["show_flag"] != null && values["show_flag"].toString() == "true") { // Write code using `values["banner_url"]` and `values["banner_img_url"]` } } }); ``` -------------------------------- ### アプリ内パラメーターを非同期で取得する (Cordova) Source: https://docs.repro.io/ja/faq/app/sdk/3 Cordova JavaScriptで、Reproの`setup`完了前にアプリ内パラメーターを取得するには、`fetch`メソッドを使用します。コールバック関数内で`setup`完了後の処理を記述してください。 ```js-cordova Repro.remoteConfig.fetch(0, function(status) { // success callback if (status == Repro.remoteConfig.FetchStatus.Success) { Repro.remoteConfig.activateFetched(function(message) { // success callback Repro.remoteConfig.getAllValues( function(values) { if (values["show_flag"] != null && values["show_flag"] == "true") { // Write code using `values["banner_url"]` and `values["banner_img_url"]` } } ); }, function(message) { // error callback }); } }, function(status) { // error callback }); ``` -------------------------------- ### Fetch App Parameters Before Setup (C#) Source: https://docs.repro.io/ja/llms-full.txt Use this C# code to fetch remote configuration values before Repro setup. The lambda expression for the fetch callback ensures that operations on fetched parameters are performed after `setup` completes. ```csharp Repro.RemoteConfig.Fetch(0, (status) => { if (status == Repro.FetchStatus.Success) { Repro.RemoteConfig.ActivateFetched(); Dictionary values = Repro.RemoteConfig.GetAllValues(); if (values["show_flag"] != null && values["show_flag"] == "true") { // Write code using `values["banner_url"]` and `values["banner_img_url"]` } } }); ``` -------------------------------- ### Setup Repro SDK in AppDelegate (Objective-C) Source: https://docs.repro.io/ja/llms-full.txt Import the Repro SDK and call the `setup:` method in your `application:didFinishLaunchingWithOptions:` method. Replace YOUR_APP_TOKEN with your actual SDK token. ```objc #import ... - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { ... // Setup Repro [Repro setup:@"YOUR_APP_TOKEN"]; ... } ``` -------------------------------- ### trackLead Source: https://docs.repro.io/ja/llms-full.txt Tracks the start of an app trial. Use this for apps that don't require mandatory user registration at install time. For example, when a user taps a button like 'Try it out'. ```APIDOC ## trackLead ### Description Tracks the start of an app trial. Use this for apps that don't require mandatory user registration at install time. For example, when a user taps a button like 'Try it out'. ### Method Repro.trackLead (or similar depending on SDK) ### Parameters #### Request Body - **content_name** (string) - Description of the content name - **content_category** (string) - Description of the content category - **value** (number) - The value associated with the trial or lead - **currency** (string) - The currency code (e.g., JPY) ``` -------------------------------- ### Setup Repro SDK in AppDelegate (Swift) Source: https://docs.repro.io/ja/llms-full.txt Import the Repro SDK and call the `setup(token:)` method in your `application(_:didFinishLaunchingWithOptions:)` function. Replace YOUR_APP_TOKEN with your actual SDK token. ```swift import Repro ... func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { ... // Setup Repro Repro.setup(token: "YOUR_APP_TOKEN") // Call the following methods to use Repro's features; they can be called in any desirable place within the app. ... } ``` -------------------------------- ### Install React Native Firebase for Push Notifications Source: https://docs.repro.io/ja/dev/sdk/push-notification/expo Install the necessary packages for Firebase Cloud Messaging on Android. Refer to the React Native Firebase documentation for detailed setup. ```sh npm install @react-native-firebase/app npm install @react-native-firebase/messaging ``` -------------------------------- ### Implement AppsFlyer and Repro Setup in AppDelegate (Objective-C) Source: https://docs.repro.io/ja/llms-full.txt Initialize AppsFlyer and set up Repro in your AppDelegate. Ensure Repro setup is called before AppsFlyer initialization. This callback is only invoked on app install. ```objc // AppDelegate.h #import #import #import @interface AppDelegate : UIResponder { ... } @end // AppDelegate.m #import "AppDelegate.h" #import @interface AppDelegate () @end @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // init AppsFlyer NSString* appsFlyerDevKey = [properties objectForKey:@"appsFlyerDevKey"]; NSString* appleAppID = [properties objectForKey:@"appleAppID"]; [[AppsFlyerLib shared] setAppsFlyerDevKey:appsFlyerDevKey]; [[AppsFlyerLib shared] setAppleAppID:appleAppID]; [AppsFlyerLib shared].delegate = self; [[AppsFlyerLib shared] start]; // setup Repro [Repro setup:@"YOUR_APP_TOKEN"]; } - (void)onConversionDataSuccess:(NSDictionary*)installData { id status = [installData objectForKey:@"af_status"]; if ([status isEqualToString:@"Non-organic"]) { id mediaSource = [installData objectForKey:@"media_source"]; id campaign = [installData objectForKey:@"campaign"]; [Repro setStringUserProfile:mediaSource forKey:@"AppsFlyer: media_source"]; [Repro setStringUserProfile:campaign forKey:@"AppsFlyer: campaign"]; NSLog(@"This is a none organic install. Media source: %@ Campaign: %@", sourceID, campaign); } else if ([status isEqualToString:@"Organic"]) { NSLog(@"This is an organic install."); } } - (void)onConversionDataFail:(NSError *)error { NSLog(@"%@",error); } ``` -------------------------------- ### Repro.setup Source: https://docs.repro.io/ja/releases/sdk/ios/release4-0-3 Initializes the Repro SDK with an application token. Changed from `Repro.setup("YOUR_APP_TOKEN")` to `Repro.setup(token:"YOUR_APP_TOKEN")`. ```APIDOC ## Repro.setup ### Description Initializes the Repro SDK with your application's unique token. ### Method Signature Change - **Before**: `Repro.setup(String) - **After**: `Repro.setup(token: String)` ``` -------------------------------- ### Get 20 campaigns with offset (Flutter) Source: https://docs.repro.io/ja/dev/sdk/newsfeed.html Retrieves 20 campaigns from the newsfeed, starting after a specified item ID. This method is for Flutter Package 1.0.0—1.6.0 and specifically gets push notification histories. ```dart // Flutter Package 1.0.0—1.6.0 // (Get only push notification histories) final newsfeeds = await Repro.getNewsFeeds(20, lastItemId); ``` -------------------------------- ### Setup Repro SDK in Unity Source: https://docs.repro.io/ja/dev/sdk/getstarted/unity This C# script demonstrates how to initialize the Repro SDK with your application token in a Unity behavior. ```csharp using UnityEngine; public class MyBehaviour : MonoBehaviour { void Start () { ... // Setup Repro Repro.Setup ("YOUR_APP_TOKEN"); ... } } ``` -------------------------------- ### Initialize Repro SDK in AppDelegate.cpp Source: https://docs.repro.io/ja/llms-full.txt Include ReproCpp.h and call ReproCpp::setup with your SDK token in the applicationDidFinishLaunching method to initialize the Repro SDK. ```C++ #include "ReproCpp.h" ... bool AppDelegate::applicationDidFinishLaunching() { ... // Setup Repro ReproCpp::setup("YOUR_APP_TOKEN"); ... } ``` -------------------------------- ### Get All Values with Prefix Source: https://docs.repro.io/ja/llms-full.txt Retrieve all configuration values where keys start with a specified prefix. Available in multiple languages. ```objc // Returns a Dictionary with key values ​​starting with "color". NSDictionary *values = [[Repro remoteConfig] allValuesWithPrefix: @"color"] ``` ```swift // Returns a Dictionary with key values ​​starting with "color". var values: Dictionary = Repro.remoteConfig.allValues(withPrefix: "color") ``` ```java // Returns a Map with key values ​​starting with "color". Map values = Repro.getRemoteConfig().getAllValuesWithPrefix("color"); ``` ```kotlin // Returns a Map with key values ​​starting with "color". Map values = Repro.getRemoteConfig().getAllValuesWithPrefix("color") ``` ```cpp // Returns a Map with key values ​​starting with "color". std::map = ReproCpp::getRemoteConfig().getAllValuesWithPrefix("color"); ``` ```csharp // Returns a Dictionary with key values ​​starting with "color". Dictionary value = Repro.RemoteConfig.GetAllValuesWithPrefix("color"); ``` ```js-cordova // Returns an associative array with key values ​​starting with "color". Repro.remoteConfig.getAllValuesWithPrefix("color", function(values) { // success callback } ); ``` ```js-react-native // Returns an associative array with key values ​​starting with "color". Repro.remoteConfig.getAllValuesWithPrefix("color", (values) => { console.log(values); }); ``` ```dart // Returns a Map with key values ​​starting with "color". var values = await Repro.remoteConfig.getAllValuesWithPrefix("color"); ``` -------------------------------- ### Get all values with prefix Source: https://docs.repro.io/ja/dev/sdk/remote-config Retrieve all configuration values where the key starts with a specified prefix. This is useful for grouping related settings. ```APIDOC ## Get all values with prefix ### Description Retrieve all configuration values where the key starts with a specified prefix. This is useful for grouping related settings. ### Method Signature `allValuesWithPrefix:(NSString *)prefix` (Objective-C) `allValues(withPrefix: String)` (Swift) `getAllValuesWithPrefix(String)` (Java, Kotlin, C#, JavaScript) `getAllValuesWithPrefix(String)` (Dart) ### Parameters * **prefix** (String) - The prefix to filter keys by. ### Request Example ```objc // Returns a Dictionary with key values ​​starting with "color". NSDictionary *values = [[Repro remoteConfig] allValuesWithPrefix: @"color"] ``` ```swift // Returns a Dictionary with key values ​​starting with "color". var values: Dictionary = Repro.remoteConfig.allValues(withPrefix: "color") ``` ```java // Returns a Map with key values ​​starting with "color". Map values = Repro.getRemoteConfig().getAllValuesWithPrefix("color"); ``` ```kotlin // Returns a Map with key values ​​starting with "color". Map values = Repro.getRemoteConfig().getAllValuesWithPrefix("color") ``` ```cpp // Returns a Map with key values ​​starting with "color". std::map = ReproCpp::getRemoteConfig().getAllValuesWithPrefix("color"); ``` ```csharp // Returns a Dictionary with key values ​​starting with "color". Dictionary value = Repro.RemoteConfig.GetAllValuesWithPrefix("color"); ``` ```js-cordova // Returns an associative array with key values ​​starting with "color". Repro.remoteConfig.getAllValuesWithPrefix("color", function(values) { // success callback } ); ``` ```js-react-native // Returns an associative array with key values ​​starting with "color". Repro.remoteConfig.getAllValuesWithPrefix("color", (values) => { console.log(values); }); ``` ```dart // Returns a Map with key values ​​starting with "color". var values = await Repro.remoteConfig.getAllValuesWithPrefix("color"); ``` ``` -------------------------------- ### Setup Repro SDK Source: https://docs.repro.io/ja/dev/web/api Initializes the Repro Web SDK with your SDK token and optional configuration settings. ```APIDOC ## reproio('setup', token, options) ### Description Initializes the Repro Web SDK. This should be called once when your web application loads. ### Parameters - **token** (string) - Required. Your Repro SDK token obtained from the Repro admin console. - **options** (object) - Optional. Configuration settings for the SDK. #### Options - **disable_ip_list** (array of strings) - IPs to exclude from tracking. - **log_level** (string) - Sets the logging level ('info', 'warn', 'error', 'none'). Defaults to 'default'. - **opt_out_by_default** (boolean) - If true, users are opted out of tracking by default. Defaults to false. - **silver_egg_uid_storage_key** (string) - Cookie key for storing user IDs for Silver Egg recommendation messages. - **allow_webview** (boolean) - Allows Repro Web SDK to function within webview environments. - **linker_domains** (array of strings) - Domains to enable cross-domain tracking. - **disable_linker_params_referrer_check** (boolean) - Disables referrer check for cross-domain tracking. Defaults to false. - **disable_auto_attach_linker_params** (boolean) - Disables automatic attachment of linker parameters to new anchor tags. Defaults to false. - **interval_days_to_storage_expiration** (integer) - Number of days to retain cookie-stored information. Defaults to 730. - **session_expiry_interval** (integer) - Time in seconds to define a new session. Defaults to 1800000 (30 minutes). - **spa_mode** (string) - Enables SPA mode ('history', 'hash', 'none'). Defaults to 'none'. - **close_messages_on_pagechange** (boolean) - Automatically closes messages on SPA page changes. Defaults to false. - **reuse_messages_on_pagechange** (string) - Controls message reuse on SPA page changes ('unlimited', 'multitime', 'none'). Defaults to 'none'. - **close_messages_by_in_page_link** (boolean) - Closes all displayed messages when an in-page link is clicked. Defaults to true. - **cookie_domain** (string) - The domain for cookies set by the SDK. ### Request Example ```html ``` ``` -------------------------------- ### Get All Values with Prefix Source: https://docs.repro.io/ja/dev/sdk/remote-config Retrieve all key-value pairs where keys start with a specified prefix. This is useful for fetching related configuration settings. ```objc // Returns a Dictionary with key values ​​starting with "color". NSDictionary *values = [[Repro remoteConfig] allValuesWithPrefix: @"color"] ``` ```swift // Returns a Dictionary with key values ​​starting with "color". var values: Dictionary = Repro.remoteConfig.allValues(withPrefix: "color") ``` ```java // Returns a Map with key values ​​starting with "color". Map values = Repro.getRemoteConfig().getAllValuesWithPrefix("color"); ``` ```kotlin // Returns a Map with key values ​​starting with "color". Map values = Repro.getRemoteConfig().getAllValuesWithPrefix("color") ``` ```cpp // Returns a Map with key values ​​starting with "color". std::map = ReproCpp::getRemoteConfig().getAllValuesWithPrefix("color"); ``` ```csharp // Returns a Dictionary with key values ​​starting with "color". Dictionary value = Repro.RemoteConfig.GetAllValuesWithPrefix("color"); ``` ```js-cordova // Returns an associative array with key values ​​starting with "color". Repro.remoteConfig.getAllValuesWithPrefix("color", function(values) { // success callback } ); ``` ```js-react-native // Returns an associative array with key values ​​starting with "color". Repro.remoteConfig.getAllValuesWithPrefix("color", (values) => { console.log(values); }); ``` ```dart // Returns a Map with key values ​​starting with "color". var values = await Repro.remoteConfig.getAllValuesWithPrefix("color"); ``` -------------------------------- ### Set Initial Opt-out State Source: https://docs.repro.io/ja/llms-full.txt Configure the SDK to start in an opt-out state by setting `opt_out_by_default` to `true` during setup. The default state is opt-in. ```js-web reproio("setup", "YOUR_REPRO_SDK_TOKEN", { opt_out_by_default: true }); ``` -------------------------------- ### Get Newsfeeds with Limit and Offset ID (Cordova) Source: https://docs.repro.io/ja/dev/sdk/newsfeed Retrieves a specified number of campaigns starting from a specific offset ID. This is useful for pagination. ```APIDOC ## Get Newsfeeds with Limit and Offset ID ### Description Retrieves a specified number of campaigns as a newsfeed, starting from a given offset ID. This method is available in Cordova Plugin 6.0.0 or later. ### Method `Repro.getNewsFeedsWithLimitAndOffsetId(limit, offsetId, successCallback, errorCallback)` ### Parameters #### Path Parameters - `limit` (number) - Required - The maximum number of campaigns to retrieve. - `offsetId` (string) - Required - The ID of the last item to use as an offset. - `successCallback` (function) - Required - Callback function to handle the retrieved news feeds. - `errorCallback` (function) - Required - Callback function to handle errors. ``` -------------------------------- ### Initialize Repro with Silver Egg Settings (Java) Source: https://docs.repro.io/ja/llms-full.txt Before calling Repro.setup, register the Silver Egg user ID (cookie) and product key using the provided methods. This ensures correct data association for recommendations. ```java // Register your user ID (cookie) that you have registered with Silver Egg Technology to ReproSDK. Repro.setSilverEggCookie("silver egg's cookie_id"); // Register the key name of the event property in which the product ID (prod) registered in Silver Egg Technology is embedded to ReproSDK. Repro.setSilverEggProdKey("product_id"); // Setup Repro Repro.setup(this, "YOUR_APP_TOKEN"); ``` -------------------------------- ### Get Newsfeeds with Limit and Offset ID (JavaScript) Source: https://docs.repro.io/ja/dev/sdk/newsfeed.html Retrieves a specified number of newsfeed items starting after a given item ID. Useful for pagination. ```APIDOC ## Repro.getNewsFeedsWithLimitAndOffsetId(limit, offsetId, callback, errorCallback) ### Description Retrieves a specified number of newsfeed items, starting after the item with the provided `offsetId`. ### Method `Repro.getNewsFeedsWithLimitAndOffsetId` ### Parameters - **limit** (number) - Required - The maximum number of newsfeed items to retrieve. - **offsetId** (string) - Required - The ID of the last item retrieved in the previous request, used as an offset. - **callback** (function) - Required - Function to handle the successful retrieval of newsfeeds. - **errorCallback** (function) - Required - Function to handle errors during retrieval. ``` -------------------------------- ### trackLead Source: https://docs.repro.io/ja/dev/sdk/tracking Tracks the start of an application trial. This is useful for apps that don't require user registration at installation. It can be used when a user taps a button like 'Try for Free'. ```APIDOC ## trackLead ### Description Tracks the start of an application trial. Use this for apps that do not require user registration upon installation, such as when a user taps a 'Try for Free' button. ### Properties - **content_name** (string) - The name of the content being tracked. - **content_category** (string) - The category of the content being tracked. - **value** (number) - The value associated with the lead. - **currency** (string) - The currency of the value. ### Request Example ```js Repro.trackLead({ value: 8000.0, currency: "JPY", content_name: "Slim Jeans", content_category: "Clothing & Shoes > Mens > Clothing" }); ``` ``` -------------------------------- ### Get 20 campaigns with offset (Cordova) Source: https://docs.repro.io/ja/dev/sdk/newsfeed.html Retrieves 20 campaigns from the newsfeed, starting after a specified item ID. This method is available in Cordova Plugin 6.0.0 or later. ```javascript Repro.getNewsFeedsWithLimitAndOffsetId( 20, lastItemId, (newsFeeds) => { ... }, (error) => { // Error handling } ); ``` -------------------------------- ### reproio('setup', token, options) Source: https://docs.repro.io/ja/llms-full.txt Initializes the Repro Web SDK. This function must be called before any other Repro functions. It requires an SDK token and accepts an optional configuration object for various settings. ```APIDOC ## reproio('setup', token, options) ### Description Initializes the Repro Web SDK. This function must be called before any other Repro functions. It requires an SDK token and accepts an optional configuration object for various settings. ### Parameters #### Path Parameters * **token** (string) - Required - Repro's management console `SDK token`. #### Query Parameters * **options** (object) - Optional - Configuration options for the SDK. * **disable_ip_list** (array of strings) - Exclude global IPs. * **log_level** (string) - Set log level: "info", "warn", "error", "none". (Default: 'default') * **opt_out_by_default** (boolean) - Opt-out users by default. (Default: false) * **silver_egg_uid_storage_key** (string) - Cookie key for storing user ID for Silver Egg recommendation messages. * **allow_webview** (boolean) - Allow Repro Web functionality in WebView environments. * **linker_domains** (array of strings) - Domains for cross-domain tracking. (e.g. ["example.com"]) * **disable_linker_params_referrer_check** (boolean) - Disable referrer check for cross-domain tracking. (Default: false) * **disable_auto_attach_linker_params** (boolean) - Disable automatic parameter appending to new `a` tags for cross-domain tracking. (Default: false) * **interval_days_to_storage_expiration** (integer) - Number of days to retain data stored in cookies, including user identifiers. (Default: 730) * **session_expiry_interval** (integer) - Time in seconds to consider a new session after the last event. (Default: 1800000) * **spa_mode** (string) - Enable SPA mode: 'history', 'hash', or 'none'. (Default: 'none') * **close_messages_on_pagechange** (boolean) - Automatically close messages on SPA page changes. (Default: false) * **reuse_messages_on_pagechange** (string) - Reuse messages on SPA page changes: 'unlimited', 'multitime', or 'none'. (Default: 'none') * **close_messages_by_in_page_link** (boolean) - Close all displayed messages when an in-page link is clicked. Ignored if spa_mode is 'hash'. (Default: true) * **cookie_domain** (string) - Domain for cookies set by the Web SDK. ### Request Example ```html ``` ``` -------------------------------- ### Initialize Repro Web SDK Source: https://docs.repro.io/ja/dev/web/api This script initializes the Repro Web SDK. Ensure you replace 'YOUR_REPRO_SDK_TOKEN' with your actual SDK token. This setup should be included in your HTML. ```html ``` -------------------------------- ### Get Newsfeeds with Limit and Offset (Cordova) Source: https://docs.repro.io/ja/dev/sdk/newsfeed Retrieves a specified number of newsfeed campaigns, optionally starting from a specific campaign ID. Supports different plugin versions and campaign types. ```js-cordova Repro.getNewsFeedsWithLimit( 20, (feeds) => { if (Array.isArray(feeds) && feeds.length > 0) { const lastItemId = feeds[feeds.length - 1].id; Repro.getNewsFeedsWithLimitAndOffsetId( 20, lastItemId, (newsFeeds) => { ... }, (error) => { } ); Repro.getNewsFeedsWithLimitAndOffsetIdAndCampaignType( 20, lastItemId, Repro.CampaignType.InAppMessage, (newsFeeds) => { ... }, (error) => { } ); } }, (error) => { } ); ``` -------------------------------- ### Initialize Repro with Silver Egg Settings (C++) Source: https://docs.repro.io/ja/llms-full.txt Configure the Repro C++ SDK with Silver Egg user ID (cookie) and product key before setup. This step is essential for enabling Silver Egg recommendations. ```cpp // Register your user ID (cookie) that you have registered with Silver Egg Technology to ReproSDK. ReproCpp::setSilverEggCookie("silver egg's cookie_id"); // Register the key name of the event property in which the product ID (prod) registered in Silver Egg Technology is embedded to ReproSDK. ReproCpp::setSilverEggProdKey("product_id"); // Setup Repro ReproCpp::setup("YOUR_APP_TOKEN"); ``` -------------------------------- ### Specify Firebase Dependency Versions Source: https://docs.repro.io/ja/llms-full.txt Set custom versions for Firebase Core and Firebase Messaging in the installation parameters. For example, to use Firebase Core version 16.0.0 and Firebase Messaging version 17.1.0. ```text FIREBASE_CORE_VERSION=16.0.0 FIREBASE_MESSAGING_VERSION=17.1.0 ``` -------------------------------- ### ユーザーIDを設定する Source: https://docs.repro.io/ja/dev/web/user-id ユーザーを一意に特定できる文字列を設定します。文字数の上限は191文字です。この設定は、導入スニペットの後かつreproio("setup", "YOUR_REPRO_SDK_TOKEN")よりも前に行ってください。 ```javascript reproio("setUserID", "xxxxxxxxxxxx"); ``` -------------------------------- ### Flutter Package: Get News Feeds with Campaign Type Source: https://docs.repro.io/ja/llms-full.txt Fetch news feeds using the Flutter package, specifying the limit and campaign type. This example is for Flutter Package version 2.0.0 or later. ```dart // Flutter Package 1.0.0—1.6.0 final newsfeeds = await Repro.getNewsFeeds(20); // Flutter Package 2.0.0 or later final newsfeeds = await Repro.getNewsFeeds(limit: 20, campaignType: NewsFeedCampaignType.PushNotification) ``` -------------------------------- ### Get 20 campaigns with offset and type (Cordova) Source: https://docs.repro.io/ja/dev/sdk/newsfeed.html Retrieves 20 campaigns of a specific type (e.g., InAppMessage) from the newsfeed, starting after a specified item ID. This method is available in Cordova Plugin 6.7.0 or later. ```javascript Repro.getNewsFeedsWithLimitAndOffsetIdAndCampaignType( 20, lastItemId, Repro.CampaignType.InAppMessage, (newsFeeds) => { ... }, (error) => { // Error handling } ); ``` -------------------------------- ### React Native SDK: Get News Feeds Source: https://docs.repro.io/ja/llms-full.txt Fetch news feeds using the React Native SDK. This example demonstrates fetching with a callback for SDK 3.0.0+ and using a specific campaign type for SDK 3.7.0+. ```js-react-native // React Native SDK 3.0.0 or later Repro.getNewsFeeds(20, (_, newsFeeds) => { ... }); // React Native SDK 3.7.0 or later Repro.getNewsFeedsWithCampaignType(20, Repro.CAMPAIGN_TYPE_PUSH_NOTIFICATION, (_, newsFeeds) => { ... }); ``` -------------------------------- ### プッシュ通知の有効化 (Java) Source: https://docs.repro.io/ja/dev/sdk/push-notification/android.html Repro.setup() の呼び出し直後に Repro.enablePushNotification() を呼び出して、プッシュ通知を有効にします。targetSdk 33 以上では、通知権限の要求ダイアログの実装が必要です。 ```java import io.repro.android.Repro; public class MyApplication extends Application { @Override public void onCreate() { super.onCreate(); ... Repro.setup(this, "YOUR_APP_TOKEN"); Repro.enablePushNotification(); ... } } ``` -------------------------------- ### C# SDK: Get Latest 20 News Feeds Source: https://docs.repro.io/ja/llms-full.txt Retrieve the latest 20 news feeds using the C# SDK. This example shows fetching push notification histories and using campaign types for Unity SDK 6.7.0+. ```csharp // Get only push notification histories var newsFeedEntries = Repro.GetNewsFeeds(20); // Unity SDK 6.7.0 or later var newsFeedEntries = Repro.GetNewsFeeds(20, NewsFeedCampaignType.PushNotification); ``` -------------------------------- ### Initialize Repro SDK in Monaca Source: https://docs.repro.io/ja/llms-full.txt Call Repro.setup with your SDK token during the onDeviceReady event. Ensure the Repro object is defined before calling setup. ```javascript function onDeviceReady() { ... if (typeof Repro != "undefined") { // Setup Repro Repro.setup("YOUR_APP_TOKEN"); } ... } ``` -------------------------------- ### Cocos2d-x SDK: Get Latest 20 News Feeds Source: https://docs.repro.io/ja/llms-full.txt Fetch the latest 20 news feeds using the Cocos2d-x SDK. This example includes error handling and shows how to specify campaign types for SDK versions 5.7.0 and later. ```cpp // Cocos2d-x SDK 5.0.0 or later bool error; std::vector newsFeeds = ReproCpp::getNewsFeeds(20, &error); if (error) { // Error handling } // Cocos2d-x SDK 5.7.0 or later bool error; std::vector newsFeeds = ReproCpp::getNewsFeeds(20, ReproCpp::CampaignType::PushNotification, &error); if (error) { // Error handling } ``` -------------------------------- ### Initialize Repro SDK in Monaca Source: https://docs.repro.io/ja/dev/sdk/getstarted/monaca Call Repro.setup with your SDK token within the onDeviceReady function to initialize the SDK. Ensure the Repro object is defined before calling setup. ```javascript function onDeviceReady() { ... if (typeof Repro != "undefined") { // Setup Repro Repro.setup("YOUR_APP_TOKEN"); } ... } ``` -------------------------------- ### iOS SDK: Get Latest 20 News Feeds - Swift Source: https://docs.repro.io/ja/llms-full.txt Retrieve the latest 20 news feeds in Swift. This example shows fetching feeds with error handling for SDK 4.8.0+ and specifying campaign types for SDK 5.8.0+. ```swift // iOS SDK 4.8.0 or later var newsFeeds: [RPRNewsFeedEntry]? do { newsFeeds = try Repro.getNewsFeeds(20) } catch { // Error handling } // iOS SDK 5.8.0 or later var newsFeeds: [RPRNewsFeedEntry]? do { newsFeeds = try Repro.getNewsFeeds(20, campaignType: .pushNotification) } catch { // Error handling } ``` -------------------------------- ### プッシュ通知の有効化 (Kotlin) Source: https://docs.repro.io/ja/dev/sdk/push-notification/android.html Repro.setup() の呼び出し直後に Repro.enablePushNotification() を呼び出して、プッシュ通知を有効にします。targetSdk 33 以上では、通知権限の要求ダイアログの実装が必要です。 ```kotlin import io.repro.android.Repro class MyApplication : Application() { override fun onCreate() { super.onCreate() ... Repro.setup(this, "YOUR_APP_TOKEN") Repro.enablePushNotification() ... } } ``` -------------------------------- ### Opt-in to Data Collection Source: https://docs.repro.io/ja/llms-full.txt Use the `optIn` API to switch from an opt-out state to an opt-in state. A session will start upon switching to opt-in. Ensure `reproio("setup", ...)` is called after `optIn`, especially if setting a user ID. ```javascript reproio('optIn'); ```