Why send GitHub signals to PostHog
PostHog is the open-source product analytics platform used by thousands of developer-focused companies. Sending GitLeads signals to PostHog lets you correlate developer acquisition with product usage — answering questions like: "Do engineers who starred our competitor repo before signing up retain better?" or "Which GitHub signal types predict conversion to paid?"
GitLeads sends webhook events when a developer shows a buying signal on GitHub. You can forward these events to PostHog's capture API to create a custom event stream of developer intent signals alongside your existing product telemetry.
How GitLeads and PostHog integrate
GitLeads supports outbound webhooks. For each new lead (stargazer or keyword match), it POSTs a JSON payload to any URL you configure. You forward that to PostHog's event capture endpoint:
- In GitLeads, go to Settings → Integrations → Webhook and set the destination URL to your bridge function
- Write a small serverless function (Cloudflare Worker, Vercel Edge, or AWS Lambda) that receives the GitLeads payload and reformats it as a PostHog capture event
- PostHog stores the event and you can build funnels, cohorts, and dashboards from GitHub signal data
// Cloudflare Worker: bridge GitLeads webhook → PostHog capture
export default {
async fetch(request: Request, env: { POSTHOG_API_KEY: string }): Promise<Response> {
const lead = await request.json() as {
signal_type: string;
keyword?: string;
repo?: string;
lead: {
github_username: string;
email?: string;
name?: string;
company?: string;
top_languages?: string[];
};
};
const posthogEvent = {
api_key: env.POSTHOG_API_KEY,
event: 'github_signal',
distinct_id: lead.lead.github_username,
properties: {
signal_type: lead.signal_type,
keyword: lead.keyword ?? null,
repo: lead.repo ?? null,
email: lead.lead.email ?? null,
name: lead.lead.name ?? null,
company: lead.lead.company ?? null,
languages: lead.lead.top_languages?.join(', ') ?? null,
source: 'gitleads',
},
};
await fetch('https://app.posthog.com/capture/', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(posthogEvent),
});
return new Response('ok', { status: 200 });
},
};Identifying persons in PostHog from GitHub leads
PostHog's distinct_id is used to merge anonymous and identified users. Using the GitHub username as the distinct ID means that when the same developer later signs up for your product, you can call posthog.identify() with their email and alias it to their GitHub username — creating a full journey from GitHub signal to trial to paid.
// When a GitHub lead signs up in your app, link identities
posthog.identify(userEmail, {
email: userEmail,
name: user.name,
});
// Alias GitHub username → email identity
// Now PostHog connects the github_signal events to the signup
posthog.alias(userEmail, githubUsername);PostHog dashboards you can build with GitHub signal data
- **Signal-to-signup funnel**: github_signal → app_signup → trial_started → paid conversion rates
- **Signal type breakdown**: compare conversion rates from stargazer signals vs keyword mention signals
- **Repo signal quality**: which tracked repos produce leads that actually convert?
- **Company cohorts**: group leads by company size using the company property
- **Language breakdown**: do Go engineers convert faster than Python engineers for your product?
Alternative: use GitLeads direct integrations
If you do not need PostHog-specific analytics, GitLeads natively integrates with HubSpot, Salesforce, Clay, Smartlead, Pipedrive, Slack, n8n, Zapier, and 10+ other tools — no bridge function required. The PostHog integration via webhook is ideal when you want to combine GitHub acquisition signals with product usage data in one analytics platform.