> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postmetric.io/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub integration

> See GitHub commits driving traffic and revenue

Connect GitHub to see which commits drive traffic and revenue to your website.

## How it works

When GitHub is connected, PostMetric:

1. Tracks when your repository is mentioned
2. Links commits to traffic sources
3. Shows which commits drive the most traffic
4. Attributes revenue to specific commits

## Setup

1. Go to your website settings in the dashboard
2. Click **"Integrations"** in the sidebar
3. Click **"Connect GitHub"**
4. Follow the OAuth flow to authorize PostMetric
5. Select the repository you want to connect

## View commit data

Once connected, you can view:

* **Commits** - Which commits are mentioned
* **Traffic by commit** - Which commits drive traffic
* **Revenue by commit** - Which commits drive revenue
* **Commit performance** - See which commits are most effective

## Link commits to traffic

Commits are linked to traffic when:

1. A commit message or PR description contains a link to your site
2. Someone clicks that link
3. The referrer is identified as GitHub

## Best practices

1. **Link in commit messages** - Include your site URL in relevant commit messages
2. **Link in PR descriptions** - Add your site URL to PR descriptions
3. **Use UTM parameters** - Add UTM parameters to track specific commits

## Privacy

PostMetric only accesses the GitHub data you authorize. We don't access your code or private repositories.

## Next steps

<Card title="Track custom goals" icon="target" href="/get-started/track-goals">
  Learn how to track other custom events
</Card>
