How to implement Repute Digital plugin on your site


1. Create new app

In menu select option "Create new App", fill out the form with Name of your app, and allowed domains that can access our plugin. After this you will be redirected to app settings, note the keys section (public / private keys) further you will need them.

2. Copy / Paste code to your site

In menu select your app, and then "Code" submenu. There you are able to see example how to implement code on your site. <repute-digital></repute-digital> can be placed inside <form> since it generating hidden input that contains token. This token gives you access to data that we retrieved from user.

You can customize input name in the SDK init section:
<script>
    window.reputeDigitalInit = function() {
        ...
        ReputeDigital.UUIDInputName = 'custom_uuid_input_name';
        ...
    };
    ...
    

Also if you want to specify your own UUID instead of randomly generated (for example if you want to use ID's from your DB) you can predefine UUID (token) like this:
<script>
    window.reputeDigitalInit = function() {
        ...
        ReputeDigital.UUID = 'some_user_uid';
        ...
    };
    ...
    

Another way to retrieve uuid (instead of putting element inside form) is data attributes.
List of <repute-digital> data attributes :
socials: "facebook,instagram, ..."  // List of connected socials by user at the moment
token: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    

3. Done!