# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.trueplay.io/tech/fnc-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
