Vue.js

Steps to integrate the Web SDK into Vue application.

1. Installation

To install the Preventor Web SDK, add the following to your project’s:

  1. Add https://sdk.preventor.com/pvtid/verifyme/verifyme.esm.js in your public/index.html.

<script
    type="module"
    src="https://sdk.preventor.com/pvtid/verifyme/verifyme.esm.js"
></script>

2. Ignore the custom tag pvt-button in your main.js file

Vue.config.ignoredElements = [/pvt-button/]; // ignore the pvt-button tag

new Vue({
  render: h => h(App)
}).$mount("#app");

3. Setup the button in your component file

<template>
  <div id="app">
    <pvt-button></pvt-button>
  </div>
</template>

<script>
export default {
  name: "App",
  mounted: function () {
    window.PvtVerifymeConfig = YOUR_CONFIGURATION;
  },
};
</script>

You have successfully installed the Preventor Web SDK!

Last updated