Groundhogg Integration
Add or update a Groundhogg contact when a form is submitted, with optional tag assignment and funnel entry.
Action type: groundhogg
Handler: Core_Forms\Integrations\IntegrationHandlers::groundhogg
Source: src/integrations/class-integration-handlers.php (registered in src/integrations/class-integration-manager.php)
Requirements
The Groundhogg plugin must be active on the same site. The action only appears in the Add Action list when the Groundhogg\Contact class is available. If Groundhogg is deactivated later, the saved action shows a "Groundhogg must be active" warning and throws an error instead of running.
Setup
- Install and activate Groundhogg.
- In WordPress, edit your form > Actions tab > Add Action > Add to Groundhogg.
- Map the contact fields (the defaults use data variables) and optionally enter tag IDs and a funnel step ID.
Settings Reference
| Setting | Required | Default | Description |
|---|---|---|---|
| Yes | [email] |
Contact email address | |
| First name | No | [first_name] |
Contact first name |
| Last name | No | [last_name] |
Contact last name |
| Phone | No | [phone] |
Collected in the settings UI, but not written to the Groundhogg contact by the current handler |
| Tag IDs | No | -- | Numeric Groundhogg tag IDs, separated by commas or spaces (e.g. 12, 15 33) |
| Funnel entry step ID | No | -- | Numeric ID of the funnel step to add the contact to |
Every text setting supports Core Forms data variables such as [email] or [any_field_name]; they are resolved with cf_replace_data_variables() before the action runs.
Finding Tag and Funnel IDs
- Tag IDs: Groundhogg > Tags -- the ID column (or the
tagquery argument when editing a tag). - Funnel entry step ID: open the funnel in the Groundhogg editor and select the benchmark/step where contacts should enter; its numeric ID is used here. Contacts are queued through Groundhogg's background tasks (
Groundhogg\Background_Tasks::add_contacts_to_funnel).
How It Works
- Creates a
Groundhogg\Contactfrom the email, first name, and last name. Groundhogg matches by email, so an existing contact is updated rather than duplicated. - Applies any tag IDs with
apply_tag(). Non-numeric entries are ignored. - If a funnel step ID is set, the contact is added to that funnel via a background task.
- Logs the result with the new contact ID in the action log.
Idempotency
Like all 4.4 native actions, this action claims a run key of sha256(submission ID | action type | resolved settings) before executing. Re-processing the same submission with unchanged settings is a no-op, so the contact is never tagged or funneled twice for one submission.
Troubleshooting
- "Groundhogg could not create the contact": the resolved email was empty or invalid. Check that the Email setting points at a real email field.
- Tags not applied: Tag IDs must be numeric Groundhogg tag IDs, not tag names.
- Contact not entering the funnel: funnel entry runs as a Groundhogg background task; confirm Groundhogg's background processing (WP Cron) is working.
See also: Integrations overview, Jetpack CRM, SureContact.