Get Started: Monaca¶
Integrate Repro¶
Select Config > Service Integration... in Monaca IDE.
Click Details button in Repro.
Click Install.
Then you're done setting up for Repro.
Setup¶
Start a new session at onDeviceReady
in index.html
You can find the YOUR_APP_TOKEN
at SDK Token in SETTINGS > PROJECT SETTINGS on the management screen.
function onDeviceReady() {
...
if (typeof Repro != "undefined") {
// Setup Repro
Repro.setup("YOUR_APP_TOKEN");
}
...
}
You need to run your app on a real device in order to use Repro with Monaca.
To run an app on a real device, click Build and build your app according to this documentation: Building Monaca App
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:
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");
...
}
}
#include "ReproCpp.h"
...
ReproCpp::track("Initialized");
Repro.Track ("Initialized");
// Will be written later
class MainScreen extends React.Component {
componentDidMount() {
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.