> For the complete documentation index, see [llms.txt](https://docs.adpage.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.adpage.io/extensions/plugins/wordpress-plugin.md).

# Wordpress Plugin

Install and validate AdPage Tagging for your WordPress site.

Use the AdPage Tagging WordPress plugin to track supported form submissions.

<a href="https://is.wordpress.org/plugins/tagging/" class="button primary" data-icon="wordpress">Install from WordPress.org</a>

### Before you start

Have access to your WordPress admin and Google Tag Manager container. Remove duplicate form tracking before testing the plugin.

The plugin supports Contact Form 7 and Gravity Forms.

### Install the plugin

{% stepper %}
{% step %}

#### Install AdPage Tagging

Open the plugin listing and select **Download**. In WordPress, go to **Plugins → Add New → Upload Plugin**. Upload and activate the plugin.
{% endstep %}

{% step %}

#### Complete the plugin setup

Open the AdPage Tagging settings in WordPress. Complete the required setup for your website.
{% endstep %}

{% step %}

#### Publish your changes

Save the plugin settings and publish your Google Tag Manager container. Use preview mode before publishing production changes.
{% endstep %}
{% endstepper %}

### Validate the installation

Use Google Tag Manager Preview to test your website. Submit a supported form during one test session.

Confirm the `trytagging_generate_lead` event appears in the data layer. Check that the event contains the expected form fields.

See [generate\_lead dataLayer (Contactform7 & GravityForms)](https://docs.adpage.io/integrations-websites/woocommerce/generate_lead-datalayer-contactform7-and-gravityforms.md) to turn this event into a GA4 conversion.

### Available WordPress events

The plugin sends this event when a supported form is submitted:

* `trytagging_generate_lead`

The event includes submitted form data in `form_data`. Field names depend on your form configuration.

{% hint style="warning" %}
Do not submit real customer data while testing. Use a test form and test contact details.
{% endhint %}

### Troubleshooting

If the event does not appear, confirm the plugin is active. Then check that the submitted form uses Contact Form 7 or Gravity Forms.

If events duplicate, disable overlapping form or tag-manager integrations. Retest in an incognito window after clearing site data.

### Settings

#### Webhook

This will set the order status trigger for sending the webhook.

#### Google Business Vertical

With this setting you can set a parameter value in the datalayer for a vertical

#### Debug mode

Is used to add logging for debugging

#### Place GTM scripts yourself

This option will not load the GTM script but the other functions will work for the plugin.

#### Use old purchase flow

Purchase flow trigger is based on hook from wooCommerce purchase. This setting will activate another source as trigger for the purchase. Here there are multiple hooks used with ids that fires a purchase when the next possible page gets loaded. We do not recommend activating this settings by default.&#x20;

#### Prevent duplicate script injection

Enable when the GTM container loads more than once per page. This will activate a function to block multiple GTM scripts.

#### Cookie keeper

All pages loads will be cached. In server cookies will be set in cache and in client this will not be cached. This is for deside where the cookies will be set.\ <br>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.adpage.io/extensions/plugins/wordpress-plugin.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
