For the complete documentation index, see llms.txt. This page is also available as Markdown.

Installation

Installation of Landing SDK in a frontend project.

Installation is easy, whether through NPM or CDN.

Installation with NPM

For installation with npm, the requirement is to have nodejs and npm installed. For more documentation on this aspect, see here:

https://nodesource.com/blog/an-absolute-beginners-guide-to-using-npm/

Once this step is complete, installation is very simple; in the command line of your repository, run:

npm install @facephi/landing-sdk

This will add the SDK to your project for use as follows:

import LandingSDKClient from '@facephi/landing-sdk';

const landingSDK = new LandingSDKClient('YOUR_APIKEY');

Where the API key will be provided by us or generated by you through the Landing Builder.

To invoke the POST, we will use the following command:

landingSDK.callLanding();

For example:

<html>
  <script type="module">
    import LandingSDKClient from './dist/landing-sdk.js';
    const landingSDK = new LandingSDKClient('YOUR_APIKEY');

    const callLanding = () => {
      landingSDK.callLanding();
    }

    window.callLanding = callLanding;

  </script>
  <body>
    <div>
      Landing SDK Client
      <button onclick="callLanding()">Go to the Landing page</button>
    </div>
  </body>
</html>

Installation with CDN

Installation from CDN is very simple, since you don't have to perform any prior installation steps, just add it as follows:


Use via iframe

In case of using the components within an iframe it is recommended to keep the focus within the container that integrates the SDK Web components.

Last updated