Nextdoor CAPI

What Is Nextdoor CAPI?

Nextdoor ads are targeted advertisements on the Nextdoor platform, a social networking service for neighborhoods. These ads are designed to reach local audiences, leveraging user data to provide relevant content based on geographical location and community interests. Businesses can use Nextdoor ads to connect with nearby potential customers, promoting services, events, and offers in a trusted, community-centric environment.

Nextdoor CAPI (Conversions API) allows businesses to track and measure the effectiveness of their Nextdoor ads by directly sending conversion data from their server to Nextdoor. This integration helps improve ad targeting and performance tracking by providing more accurate and comprehensive data on user actions, such as purchases or sign-ups, ensuring that businesses can optimize their advertising strategies effectively.

What are the benefits of integrating MetaRouter with Nextdoor CAPI?

  • Reduced Latency: Eliminates client-side tags, resulting in faster page load times.
  • Tag Management: Simplifies the removal and management of Nextdoor tags.
  • Data Accuracy: Ensures accurate and reliable data collection via server-to-server integration.
  • Improved Targeting: Enhances ad campaign optimization for better ROI.

Capabilities and Considerations

  • CAPI Endpoint: Integrates with the Nextdoor CAPI endpoint to send detailed event data.
  • Client and Partner Identification: Enriches events with static identifiers for the partner (metarouter) and client, ensuring each event is properly attributed.
  • Event Identification and Timing: Maps event-specific data, including unique event IDs and timestamps, ensuring accurate tracking of events.
  • Source Information: Captures and maps the source of events, including the URL where the event occurred and the type of source (e.g., app or website).
  • Comprehensive Customer Data Mapping: Utilizes complex transformations to hash and map customer data, including email, phone number, and address details, ensuring customer privacy and data integrity.
  • Event-Specific Data Enrichment: Provides tailored enrichment for specific events, such as marking an order_completed event with a static purchase identifier.
  • Token Expiration: Your Nextdoor access token will expire in a year after it’s been generated. Please mark your calendar to update the token in the MetaRouter integration a year from when the token was generated.

Nextdoor Ads vs Nextdoor CAPI

Nextdoor Ads:

  • Endpoint: https://ads.nextdoor.com/graphql/api/v1
  • Filters: Reject events if the ndclid (Nextdoor Click ID) is missing.
  • Event-Specific Configurations: Static string enrichments for eventName for events like cart_viewed, order_completed, and signed_up

Nextdoor CAPI:

  • Endpoint: https://ads.nextdoor.com/v2/api/conversions/track
  • Filters: Allow events based on their names without extra conditions.
    • This means that any event with a specified name is accepted and processed.
    • No additional conditions or criteria are required for these events to be allowed.
    • The filter list is set to accept events simply if their names match the allowed list.
  • Mappings: Use Lua scripts to hash customer information (email, phone number, address) for increased user matching
  • Event-Specific Configurations
    • For order_completed events:
      • Map order_id, product_context, and order_value with complex transformations
      • Calculate the total order value by summing product prices and adding the currency code

Getting Started - From Your Nextdoor Account

  • Apply for API access: Please follow the instructions here to apply for API access. Once granted, you will be given a client ID that you will need to use for this integration.
  • Access Token: Please follow the instructions here to obtain your access token.

**IMPORTANT NOTE: Your Nextdoor access token will expire in a year after it’s been generated. Please mark your calendar to update the token in the MetaRouter integration a year from when the token was generated.*


Getting Started - From Your MetaRouter Account

Adding a Nextdoor - CAPI integration.

From the integration library, add a Nextdoor - CAPI integration. Then, fill out the Connection Parameters:

Connection ParameterDescription
ACCESS_TOKENAccess token that can be generated once approved for API access. Please note this token expires after a year.
CLIENT_IDProvided by Nextdoor upon API access approval.

Adding a Nextdoor Sync

To gather the ndclid value, you must add a Nextdoor sync.

  1. From the Pipelines page, find the pipeline associated with the web property you’d like to add a sync to. Hover over the three dot dropdown and select “Build AJS File.”
  2. In the Identity Syncs section, select the Nextdoor sync.
  3. Fill out the following fields:
    1. Consent Type - We recommend that you consult with your legal team when determining your consent requirements.
    2. Cookie Lifetime (in days) - 7 days default
  4. Scroll down and click the Save and Build File button.
  5. Deploy your AJS file to propagate changes to your web property.

Event Mappings

MetaRouter provides all of the event mappings that Nextdoor CAPI integrations typically require. You may add custom events, parameters or mappings in accordance with Nextdoor’s API documentation.

Global

Global mappings will be applied to all events. If your parameter names do not match the Expected Inputs provided, you will need to overwrite the Inputs provided with your own.

Output Key

Description

Expected Input

partner_id

String: A unique identifier for the partner.

Enrichment - metarouter

client_id
Required

String: The client ID associated with your Nextdoor Business account.

Enrichment - CLIENT_ID

event_id
Required

String: A unique identifier for the event.

messageId

event_time
Required

Integer: The timestamp of the event in Unix time.

receivedAt

action_source
Required

String: The source of the action (e.g., app, website).

N/A - Expression

action_source_url
Required

String: The URL where the action occurred.

context.page.url

customer.click_id
*Required

String: The click ID from Nextdoor.

  • The integration requires at least one or a combination of the following parameters: hashed_email , hashed_phone and / or click_id .

context.providers.nextdoor.ndclid

customer.email
*Required

String: The hashed email address of the customer.

  • The integration requires at least one or a combination of the following parameters: hashed_email , hashed_phone and / or click_id .

Email is the most preferred identifier by Nextdoor.

N/A - Expression

customer.phone_number
*Required

String: The hashed phone number of the customer. Unhashed phone number format should consist of exactly ten digits, devoid of any special characters or international country codes.

  • The integration requires at least one or a combination of the following parameters: hashed_email , hashed_phone and / or click_id .

N/A - Expression

customer.first_name

String: The hashed first name of the customer.

N/A - Expression

customer.last_name

String: The hashed last name of the customer.

N/A - Expression

customer.date_of_birth

String: SHA256 Hash. YYYYMMDD Format

N/A - Expression

customer.street_address

String: SHA256 Hash street address of the customer’s address.

N/A - Expression

customer.city

String: The hashed city of the customer's address.

N/A - Expression

customer.state

String: The hashed state of the customer's address.

N/A - Expression

customer.zip_code

String: The hashed zip code of the customer's address.

N/A - Expression

customer.country

String: The hashed country of the customer's address.

N/A - Expression


Event Specific

Order Completed

Output Key

Description

Expected Input

event_name Required

String: The name of the event (e.g., purchase).

Enrichment - purchase

custom.order_id

String: The order ID of the purchase.

properties.order_id

custom.product_context

Array: The context of the products in the order.

N/A - Expression

custom.order_value
Required

String: The value of the order.

N/A - Expression


Required & Recommended Identifiers

These identifiers must be mapped to Nextdoor CAPI in order for successful user matching to occur. Without the minimum required IDs, any events sent to Nextdoor may not be reflected accurately in reporting. For your convenience, required and recommended IDs are mapped as Global parameters to ensure they are added to every event.

Attribute

Example

Sync Injector Required?

click_id *Required

123abc456def789ghi

Yes

email
*Required

SHA256 Hash (Lowercase): c624921e8d93d491b8b47cb1129d8d9d90b9b9a6e10a8db526b22a709cc0e280

No

phone_number
*Required

SHA256 Hash: 836c1b0b1f3ef6c1c41b67c5c0a05640d5d5e1bcd0339e919c2f1b8a3e54e8f2

No

first_name
Recommended

SHA256 Hash (Lowercase): d53c6d34a40e51011d558ba0cfb46c01ba354baab6587b1b8e7dbaaa5351edc3

No

last_name
Recommended

SHA256 Hash (Lowercase): d0b56f57fa2a8f02bcb573ad81b786cd3f1b21f004f121ac350b2ecf0d7c63b3

No

date_of_birth
Recommended

SHA256 Hash (YYYYMMDD Format): f3b5a5e2c17ad4970cc8d7fc3e4c0f937a8f2a5789ad56b3a7803e48756c20d1

No

street_address
Recommended

SHA256 Hash: 8f8fe511c7a6d5730f6fabb20253f4d2f481b604f9b39d6fc71acb46f8b5f44c

No

city
Recommended

SHA256 Hash (Lowercase, no spaces or special characters): 5e498e48f1dc30ad9f5e07ec3f0a20d21b4e8bcd7073dd0a8ec17d4b8baba17b

No

state
Recommended

SHA256 Hash (Lowercase two-letter ANSI abbreviation): a58f8e32e677139663be8d3b92fc6c9ff1a098f4d3d3768dc542e6e846a237f0

No

zip_code
Recommended

SHA256 Hash (First 5 digits for U.S. zip codes): 5e884898da28047151d0e56f8dc6292773603b3c2d5dc6e40b4cc5d1dcb9f33e

No

country
Recommended

SHA256 Hash (Lowercase 2-letter ISO 3166-1 alpha-2 code): b5d4045c7de9afba8c32d0b0b44cd3ba174bff6f0062d6c1e4f7ab27c43d817d

No

*The integration requires at least one or a combination of the following parameters: hashed_email , hashed_phone and / or click_id . Email is the most preferred identifier by Nextdoor.


Additional Identifiers

These identifiers should be mapped to Nextdoor CAPI whenever possible to ensure the highest user match rates possible. If using these identifiers, they must be added as Global or Event Specific mappings.

AttributeDescriptionExample
client_ip_addressMust be a valid IPV4 or IPV6 address.Example IPV4: 192.168.1.1 Example IPV6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334

Additional Nextdoor CAPI Documentation