Web App Quick Start
The following information will help you to integrate the ARRIVE SDK with your web app.
Create an account
CORS domain whitelisting
For your web app to communicate with ARRIVE, your app's domains need to use SSL and be whitelisted with us. Email support with the domains.
Step 1: Include the library in your web app
Step 2: Set the unique identifier of the current web app
The App ID should uniquely identify your web app.
Step 3: Set the "USAGE_TOKEN" of the app
Get a Usage Token
Step 4: Add a site
A site is a physical location near a road network and is the destination for a trip. It is usually (but not necessarily) a store, a restaurant, or a place of business. To track trips to a site, you must add that site to your account. When you add a site, you create a site ID, which you will use in your app when you add trip tracking.
Step 5: Set the user ID
Set the "USERUNIQUETRACKING_ID" of the user currently logged in your app. This may be null when the app is started, but as the user logs into the app, make sure this value is set. trackingIdentifier needs to be set to use session specific methods for starting trips or monitoring sites. This identifier will be persisted across application restarts.
When the user logs out, set this to null, which will in turn end the user session or monitoring session.
Step 6: Start and cancel trips
To start a user's trip to a given site, call the method below and pass the site ID and track token of the trip. Call this method when you thinks it's appropriate to start tracking the user.
eg. Order is ready to be picked up at the site.
To cancel a user's trip to a given site, call the method below and pass the site ID and track token of the trip.
If no track token is passed, then ALL trips to this site are cancelled.
Step 7: Test your web app
The ARRIVE SDK should now be fully integrated in your app. Run the app and view your dashboard to start seeing trips as they are being tracked. You’re done!