# FNC Integration

### FNC overview

Our Funnels No Code loyalty widget is created to boost user engagement. Its integration is quick and requires little to no effort from an operator.&#x20;

It features Offline Missions and the Tap to Earn game for attracting and retaining customers. Trueplay handles the content and moderation, ensuring a seamless experience The result? Additional gamification leads to increased player activity.

### How to Add Widget?

Add this iframe in place where widget must be placed:

```
<iframe id="trueplay-widget" frameborder="0" allow="clipboard-write;web-share"></iframe>
```

Add a script just above the closing body tag and widget will load and launch automatically.

```
<script async     
src="https://cdn.trueplay.io/global/trueplay-widget.js?id={operatorId}&userId={userId}&autorun=true">
</script>
```

where `userId` – user identifier in the operator system. The operator needs to send this parameter to authenticate the user on the widget.

`operatorId` - id of operator on the Trueplay side. ID will be added automatically to the script which you should copy from the admin panel.

Or you can set query parameter:

```
autorun=false
```

and run widget programmatically after the script is loaded by running:

```
window.trueplay.init();
```

1. Unauthorised Users:
   * When a user is not authorised, an anonymous widget will be displayed.
   * User progress will be preserved using local storage.
2. User Authorisation:
   * Once the user is authorised, the operator should send the userId to the script to complete the integration.

These steps ensure a smooth experience for users, allowing them to continue where they left off even if they are not logged in.
