Atlas L6ynztjd84

Posthog

Last updated March 5, 2025

Send events and contacts data to Loops from Posthog.

Posthog's Loops integration lets you send events from your project to Loops, as well as add users to your Loops audience.

Posthog's [data pipelines](https://posthog.com/cdp) add-on or a self-hosted version of Posthog is required for this integration to work.

Here's how to set up a Loops destination in Posthog.

Create a Loops destinations

In your Posthog dashboard go to Date pipelines, click + New destination and search for "Loops".

You will see two options:

  • Send events to Loops.so (use this to trigger  loops )
  • Update contacts in Loops.so (this will create or update contacts in your Loops audience)
Search for Loops in Posthog

Choose the one you want and click + Create.

Add your API key

You need to add a Loops API to each destination so that Posthog can send data to your Loops account.

In Loops, go to  Settings -> API  and generate or copy an API key.

Back in Posthog, paste the API key in the Loops API Key field.

Add Loops API key

Customize the destination

There are a few options available to customize the data that is sent to Loops for both destination types. This helps make sure that you're sending the correct data for your events and contacts.

Send events

In the Send event to Loops.so destination, you can filter which events are sent to Loops from the Filters section. The default is "Pageview" (which is sent with the event name "$pageview" to Loops).

Send events destination

By default pathname is sent with the event as an  event property , making it available in all emails triggered by the event.

If you want to add more event properties you can use the Property mapping option.

If you check the Include all properties as attributes option, all properties from the event will be sent to Loops.

Update contacts

The Update contacts in Loops.so destination lets you sync users to Loops. If a matching contact doesn't already exist in Loops, one will be created.

In this destination you can filter which events are sent to Loops from the Filters section. The defaults are "Identify" and "Set".

Update contacts destination

By default emailuserIdfirstName and lastName are synced to Loops. To add more contact properties you can use the Property mapping option, which allows you to map specific person data to contact properties in Loops. You can see all available contact properties in your account from  Settings -> API . Make sure to use the "API name" when mapping values in Posthog.

If you check the Include all properties as attributes option, all properties from the person record in Posthog will be added to contacts in Loops. This may create a lot of custom contac properties in Loops, so we suggest running a mock test (see below) first to see which data would be sent.

Testing

To test if your configuration is working as expected, expand the Testing section at the bottom of the page.

Testing the integration

You can send real test events to Loops by clicking Test function. Check  Settings -> Events  and your  Audience  pages in Loops to see if data is coming across as you expect.

If you'd rather not send actual data to Loops during testing, select the Mock out HTTP requests option. This will show the expected request data (including all contact and event properties) rather than send a request to Loops.

Was this article helpful?