Web App Quick Start

The following information will help you to integrate the ARRIVE SDK with your Web App.

Create an account

You’ll need to create an account to complete the steps below. Already have an account? Sign in

Step 1: Include the library in your Web App

<script src="https://hosted.curbside.com/1.0/curbside.dependencies.js"></script>
<script src="https://hosted.curbside.com/1.0/curbside.sdk.js"></script>

Step 2: Set the unique identifier of the current Web App

This APP ID should uniquely identify the application in use.

eg. MyCompany.Web.Desktop


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 “USER_UNIQUE_TRACKING_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

Start trip

Start a trip tracking the user pickup of “UNIQUE_TRACK_TOKEN” to the site identified by the “SITE_ID”. Call this method when the application thinks it’s appropriate to start tracking the user.

eg. Order is ready to be picked up at the site.

Curbside.startTripToSiteWithIdentifier({ siteID: "SITE_ID", trackToken: "UNIQUE_TRACK_TOKEN" });

Cancel trip

Cancels the trip for the user to the given site identified by the “SITE_ID” with the given “UNIQUE_TRACK_TOKEN”.

If no “UNIQUE_TRACK_TOKEN” is set, then ALL trips to this site are cancelled.

Curbside.cancelTripToSiteWithIdentifier({ siteID: "SITE_ID", trackToken: "UNIQUE_TRACK_TOKEN" });

Step 7: Test your 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!

Next Steps