Repro - Mobile Analytics for growth
日本語
Sign Up Back to Dashboard
  • System Requirements
  • Dashboard Guide
  • Development Guide
    • Signup
    • iOS/Android SDK
      • Get Started
        • Install SDK
          • iOS
          • Android
          • Unity
          • Cordova
          • Monaca
          • Cocos2d-x
          • React Native
          • React Native (Expo)
          • Flutter
      • Session Lifecycle
      • User ID
      • Device ID
      • User Profile
      • Event Tracking
      • Push Notification
      • NewsFeed
      • In-App Message
      • Silver Egg Recommendation Messages
      • Remote Config
      • WebView
      • Opt-out feature
      • Settings regarding the collection of advertiser IDs
      • Registering an user device into a specific audience with the help of a QR code
      • Set attribution data from Adjust to Repro
      • Set attribution data from AppsFlyer to Repro
      • Registering LINE User ID to Repro (iOS/Android SDK)
      • Log Level
      • Verification Method
    • Web
    • Audience API
    • Audience Import(β)
    • Push API
    • Event Bulk Tracking (β)
    • User Profile API
    • User Profile Bulk Import
    • NewsFeed API
    • Deletion Targeted User Registration API
    • Mail
  • Release Notes
  • FAQ

js

Get Started: Cordova¶

Install Cordova plugin¶

Cordova CLI (or PhoneGap CLI) 6.5 or above with Cordova Android 6.4 or above is required to install the latest cordova plugin. Please confirm your versions and execute the command below.

# cordova
$ cordova plugin add cordova-plugin-repro

# phonegap
$ phonegap plugin add cordova-plugin-repro

Note

In order to change the Firebase version, an option must be set when installing the Cordova Plugin. See Option: change the depending version of Firebase for details.

Setup¶

Start a new session at onDeviceReady in index.js

You can find the YOUR_APP_TOKEN at SDK Token in SETTINGS > PROJECT SETTINGS > Credentials on the management screen.

onDeviceReady: function() {
    app.receivedEvent('deviceready');

    ...

    // Setup Repro
    Repro.setup("YOUR_APP_TOKEN");

    ...
},

Information collected by the SDK will be uploaded to the server periodically.

Track event¶

Targeting the right group of users is critical to effectively make analyses or marketing campaigns. By keeping track of user behavior as events, you will be able to choose the right group of users according to your purpose from the dashboard.

Example of targeting user group with events:

  • Specify the target group of users for the campaign using event and/or user profile filters

If you don’t exactly know which events to track in your app, we recommend you to start from tracking the event when each view is displayed.

Example:

@implementation MainViewController

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    [Repro track:@"MainViewController" properties:nil];

    ...
}
class MainViewController: UIViewController {

    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        Repro.track(event: "MainViewController", properties: [:])

        ...
    }
public class MainActivity extends AppCompatActivity {

    @Override
    protected void onResume() {
        super.onResume();
        Repro.track("MainActivity");

        ...
    }
}
class MainActivity : AppCompatActivity() {

    override fun onResume() {
        super.onResume()
        Repro.track("MainActivity")

        ...
    }
}
#include "ReproCpp.h"

...

ReproCpp::track("Initialized");
Repro.Track ("Initialized");
// Will be written later
class MainScreen extends React.Component {

    componentDidMount() {
        Repro.track("MainScreen", {});
    }

    ...
 }
import Repro from 'react-native-repro';

...

Repro.track("MainScreen", {});
import 'package:repro_flutter/repro.dart';

...

await Repro.track("Initialized");

Set User ID¶

The analytics results you will see in Repro are aggregated per each user. By setting the User ID, you gain the advantages below:

  • Identify the same user across multiple devices

  • Target campaigns more accurately

Please see here for more details.

Send push notifications¶

You can send push notifications from Repro’s dashboard as well as using the API. Please refer to this document when implementing push notification.

Next…¶

For more details of other available features, please see below.

  • Session Lifecycle

  • Event Tracking

  • User ID

  • Device ID

  • User Profile

  • WebView

  • Opt-out feature

  • In-App Message

  • Push Notification

  • Set attribution data from Adjust to Repro

  • Set attribution data from AppsFlyer to Repro

  • « Get Started: Unity
  • Get Started: Monaca »

Repro Service Site About Us Careers Terms of Service Privacy Policy Cookie Policy

© 2022 Repro Inc.