> For the complete documentation index, see [llms.txt](https://docs-vnext.kiflo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-vnext.kiflo.com/integrations/website-forms/wordpress-cognito-forms.md).

# WordPress - Cognito Forms

## Overview

The integration relies on 2 WordPress plugins:

* **Kiflo** (<https://cdn.kiflo.com/wordpress/plugins/kiflo_latest.zip>): this plugin allows you to easily connect WordPress with your Kiflo account to track vistors and referred leads
* **Cognito Forms** (<https://wordpress.org/plugins/cognito-forms/>): this plugin is the official Cognito Forms plugin for WordPress

{% hint style="info" %}
**How does it work?**

The Kiflo plugin will track the visitors on your website and inject the tracking code automatically inside any Cognito form configured accordingly.\
The tracking code will become available like the other fields, when the user submits the form.\
Then, you can use it to create a new lead in Kiflo using [Zapier](/integrations/more-integrations/zapier.md) or our [API](https://docs-api.kiflo.com/).
{% endhint %}

## Setup Kiflo WordPress plugin

To download, install and configure Kiflo WordPress plugin, please refer to this article: [https://docs.kiflo.com/article/39-wordpress](/integrations/website-forms/wordpress.md)

## Configure your form

In your form's settings, active the **Developer Mode:**

![](https://3041514930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKkJn82Qo5a0Y4fOsoQzo%2Fuploads%2Fgit-blob-2bc5b49f1632e07ba8a3f5f23bf6dafa4c2a813a%2F600084d32e764327f87beb96.png?alt=media)

Then, add a new field to store the Kiflo tracking code. This field must have the following properties:

* Field Name = **KifloTrackingCode** (remember this name, we will need it later)
* Type = Single Line
* Show This Field = Internally
* Require This Field = Never
* Read-Only = Always

![](https://3041514930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKkJn82Qo5a0Y4fOsoQzo%2Fuploads%2Fgit-blob-c1f0f180c4732b056264573ad1c83c8adc916ba6%2F600085a41c64ad47e4b6f518.png?alt=media)

Once you've done adding all the fields, go to **Publish** tab and copy the **Seamless** integration code:

![](https://3041514930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKkJn82Qo5a0Y4fOsoQzo%2Fuploads%2Fgit-blob-ea657142b37df4a4ecb31348e8380a0a6e340985%2F600085f9cfe30d219ccd7d64.png?alt=media)

That's it for the configuration, now, let's integrate your form into a page.

## Integrate your form into a page

Edit the page or post where you want to display your form.

Then add a **Custom HTML** block, and paste the Seamless integration code you copy in the previous step.

Should be something similar to:

```js
<!-- wp:html -->
<div class="cognito">
  <script src="https://www.cognitoforms.com/s/ycJT8mfbL0mNpNEl1_n_aQ"></script>
  <script>
      Cognito.load("forms", { id: "1" });
  </script>
</div>
<!-- /wp:html -->
```

Please note that the following variables identify your form and will be different from the upper example:

* **ycJT8mfbL0mNpNEl1\_n\_aQ**
* **id: "1"**

Then modify the code, to allow Kiflo plugin to inject the tracking code in your form during initialization:

```js
<!-- wp:html -->
<div class="cognito">
  <script src="https://www.cognitoforms.com/s/ycJT8mfbL0mNpNEl1_n_aQ"></script>
  <script>
    kjs.onLoaded(function() {
      Cognito.load("forms", { id: "1", entry: { "KifloTrackingCode": kiflo('getTrackingCode') } });
    });
  </script>
</div>
<!-- /wp:html -->
```

{% hint style="info" %}
The property name " **KifloTrackingCode**" should match the name of the field you defined in your form!
{% endhint %}

That's it!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs-vnext.kiflo.com/integrations/website-forms/wordpress-cognito-forms.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
