Project ID
Learn more about publishing a project using Project ID
This feature allows you to publish projects using project ID generated through the Leap dashboard and initialize it at any instance through code. This is helpful if you want to target the user segments created on any 3rd party analytics platform or your own data warehouse.
Checkout more use-cases of Project ID: - Launch via notification - Launch on button click
Our SDK provides an API to publish a project directly using project ID.
  • To generate a Project ID simply go to publish and click on Publish via project ID. You can now copy the Project ID by clicking on it again.
Once you have generated the Project ID, the next step is to initialize it in the required place. All you need to do is to call Leap.start() with the argument as the projectID as mentioned below:

There are two ways to do this:

a. To start the project at the time of initialization, start Leap Experience with projectId:
a. To start a project in between a deployment that is already live or to change the deployment as per segment change:
Android
Swift
Objective-C
React Native
Cordova(Android)
Cordova (iOS)
Xamarin Android
Xamarin iOS
Ionice
Leap.startProject("PROJECT_ID");
Leap.shared.startProject(projectId: "PROJECT_ID")
[[Leap shared] startProject:@"PROJECT_ID" resetProject:NO];
LeapReactNative.startProject("PROJECT_ID", false)
cordova.plugins.LeapAndroid.startProject("PROJECT_ID");
cordova.plugins.LeapiOS.startProject("PROJECT_ID");
Leap.StartProject("PROJECT_ID");
Leap.Shared.StartProject("PROJECT_ID")
LeapPlugin.startProject({projectId:"<GENERATED_PROJECT_ID>"});
You can initialize the Project ID at every instance where a user needs to see the in-app experience.
b. To start a project by resetting the previous data of Flow termination or Element Termination for the project.
Android
Swift
Objective-C
React Native
Cordova(Android)
Cordova (iOS)
Xamarin Android
Xamarin iOS
Ionic
// Pass `true` to reset previous data of "Flow termination"
// or "Element termination" for the PROJECT_ID
Leap.startProject("PROJECT_ID", true);
// Pass `true` to reset previous data of "Flow termination"
// or "Element termination" for the PROJECT_ID
Leap.shared.startProject("PROJECT_ID", resetProject: true)
// Pass `YES` to reset previous data of "Flow termination"
// or "Element termination" for the PROJECT_ID
[[Leap shared] startProject:@"PROJECT_ID" resetProject:YES];
// Pass `true` to reset previous data of "Flow termination"
// or "Element termination" for the PROJECT_ID
LeapReactNative.startProject("PROJECT_ID", true)
// Pass `true` to reset previous data of "Flow termination"
// or "Element termination" for the PROJECT_ID
cordova.plugin.LeapAndroid.startProject("PROJECT_ID", true);
// Pass `true` to reset previous data of "Flow termination"
// or "Element termination" for the PROJECT_ID
cordova.plugin.LeapiOS.startProject("PROJECT_ID", true);
// Pass `true` to reset previous data of "Flow termination"
// or "Element termination" for the PROJECT_ID
Leap.StartProject("PROJECT_ID", true);
// Pass `true` to reset previous data of "Flow termination"
// or "Element termination" for the PROJECT_ID
Leap.Shared.StartProject("PROJECT_ID", true);
LeapPlugin.startProject({projectId:"<GENERATED_PROJECT_ID>", resetProject:true});
Copy link