{"id":25230162,"url":"https://github.com/thomastjdev/attio_email_tracking","last_synced_at":"2025-04-05T15:20:52.055Z","repository":{"id":276633190,"uuid":"929712114","full_name":"ThomasTJdev/attio_email_tracking","owner":"ThomasTJdev","description":"Gmail tracking of open and clicks for Attio CRM","archived":false,"fork":false,"pushed_at":"2025-04-05T04:00:01.000Z","size":988,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T05:18:21.037Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThomasTJdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-09T07:46:22.000Z","updated_at":"2025-04-05T04:00:02.000Z","dependencies_parsed_at":"2025-02-09T15:20:15.380Z","dependency_job_id":"abbb5528-6408-4587-ad1c-9d74cc603dd2","html_url":"https://github.com/ThomasTJdev/attio_email_tracking","commit_stats":null,"previous_names":["thomastjdev/attio_email_tracking"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasTJdev%2Fattio_email_tracking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasTJdev%2Fattio_email_tracking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasTJdev%2Fattio_email_tracking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasTJdev%2Fattio_email_tracking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThomasTJdev","download_url":"https://codeload.github.com/ThomasTJdev/attio_email_tracking/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247354538,"owners_count":20925452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-11T11:58:33.838Z","updated_at":"2025-04-05T15:20:52.048Z","avatar_url":"https://github.com/ThomasTJdev.png","language":"JavaScript","readme":"# attio_email_tracking\n📧 Gmail tracking of opens and clicks for Attio CRM\n\n**UNOFFICIAL** Gmail tracking of opens and clicks for Attio CRM. Attio supports\nsyncing emails, but not tracking opens and clicks.\n\nThis project is a simple server that receives webhooks from a Chrome extension and sends the data to the Attio CRM API. It allows you to see when users open your emails and click on links.\n\nYou can track data on people, companies, and deals objects in Attio.\n\nThe screenshot belows shows a manual inject tracking button, but it can also\nbe fully automated on both sends and schedules.\n\n![alt text](src/assets/screenshot_tracking_gmail.png)\n\n![alt text](src/assets/screenshot_settings.png)\n\n## Requirements\n\n1. A Valkey or Redis server up and running.\n2. A public endpoint to receive the webhooks.\n3. An Attio API key with correct permissions (`record_permission:read-write`, `object_configuration:read`).\n4. The Chrome extension loaded to send the email tracking data to the server.\n\n## Installation\n\n### Preparation\n\nDownload this repository to your private machine for Chrome to load the extension.\n\n```sh\ngit clone git@github.com:ThomasTJdev/attio_email_tracking.git\n```\n\nOr download the zip file and extract it: [Download ZIP](https://github.com/ThomasTJdev/attio_email_tracking/archive/refs/heads/main.zip)\n\n### Chrome extension\n\nYour Attio CRM manager will provide you with an API key and the endpoint to send the email tracking data to.\n\n#### Load the extension\n\n1. Open the `manifest.json` file and replace the `https://your_host_url.com/` with your server URL.\n2. Open Chrome and go to `chrome://extensions/`\n3. Enable Developer mode by toggling the switch in the top right corner.\n4. Click on `Load unpacked` and select the `chrome_extension` folder from this repository.\n5. Reload the Gmail page.\n\n#### Configure extension\n\n1. Click on the extension icon in the top right corner.\n2. Enter the secret key and the endpoint URL from you Attio CRM manager.\n\n#### Warning\n\nIf you use the manual injection button, then you should wait clicking on that\nuntil you are actually sending! From the second you click on it, you have 5\nseconds to send the email, otherwise Google's images cacher will make a \"fake\"\nhas been opened.\n\n\n### Server\n\nI prefer using Podman for running the server, but Docker works too.\n\n#### Start the cache server\n\nI like Valkey, but Redis works too.\n\n```sh\npodman pull docker.io/valkey/valkey:8.0.1\npodman run -d --name valkey -p 6379:6379 docker.io/valkey/valkey:8.0.1\n```\n\n#### Start the attio_email_tracking server\n\nRun the commands below or use the systemd service file in the repository.\n\n**Manually**\n\n```sh\n# Set environment variables first\npodman pull docker.io/thomastjdev/attio_email_tracking:latest\npodman run -d --name attio_email_tracking --network host docker.io/thomastjdev/attio_email_tracking:latest\n```\n\n**Systemd**\n\n```sh\ncp attio_email_tracking.service ~/.config/systemd/user/\n# Open and edit variables in the service file\nnano ~/.config/systemd/user/attio_email_tracking.service\nsystemctl --user daemon-reload\nsystemctl --user start attio_email_tracking\nsystemctl --user enable attio_email_tracking\n```\n\n## Endpoints\n\n```http\nGET /status\nHandler: handlerHealthchecksConnection\n\nGET /healthchecks/connection\nHandler: handlerHealthchecksConnection\n\nPOST /webhook/attio/email\nHandler: handlerWebhookAttioEmail\n\nGET /webhook/attio/email_opened\nHandler: handlerWebhookAttioEmailOpen\n\nGET /webhook/attio/email_clicked\nHandler: handlerWebhookAttioEmailClick\n```\n\n## Environment variables\n\n**Attribute types**\n* email_opened =\u003e Text\n* email_clicked =\u003e Text\n* email_last_action =\u003e Timestamp\n\n```sh\n# Webserver\nexport WEBSERVER_HOST=0.0.0.0\nexport WEBSERVER_PORT=2884\n\n# Cache redis/valkey\nexport REDIS_HOST=localhost\n\n# Attio API key\nexport ATTIO_API_KEY=your_api_key\n\n# Rate limit for the Attio API (1 action per 5 seconds per object type)\nexport ATTIO_API_RATE_LIMIT=5\n\n# Security token for adding new emails\nexport ATTIO_WEBHOOK_SECRET=your_security_token\n\n# People and Company slug for the email tracking data\nexport ATTIO_PEOPLE_SLUG_EMAIL_OPEN=email_opened\nexport ATTIO_PEOPLE_SLUG_EMAIL_CLICK=email_clicked\nexport ATTIO_PEOPLE_SLUG_EMAIL_LAST_ACTION=email_last_action\nexport ATTIO_COMPANY_SLUG_EMAIL_OPEN=email_opened\nexport ATTIO_COMPANY_SLUG_EMAIL_CLICK=email_clicked\nexport ATTIO_COMPANY_SLUG_EMAIL_LAST_ACTION=email_last_action\nexport ATTIO_DEAL_SLUG_EMAIL_OPEN=email_opened\nexport ATTIO_DEAL_SLUG_EMAIL_CLICK=email_clicked\nexport ATTIO_DEAL_SLUG_EMAIL_LAST_ACTION=email_last_action\n\n# Where to send the email tracking data\nexport ATTIO_TRACKER_PEOPLE_ON=true\nexport ATTIO_TRACKER_COMPANY_ON=false\nexport ATTIO_TRACKER_DEAL_ON=false\n\n# Hosting URL pointing to this server\nexport TRACKER_HOST_URL=https://your_host_url.com\n\n# Email caching time in seconds (30 days are 2592000)\nexport EMAIL_CACHE_TIME=2592000\n\n# If caching is expired and user clicks a link, redirect to\nexport EMAIL_CACHE_EXPIRED_REDIRECT=https://your_host_url.com\n```\n\n## Security\n\n1. Only emails in the cache will be managed.\n2. To add new emails, the security token must match.\n\n## Rate limit\n\nThe general rate limit is set to 1 action per email per 5 seconds per object. This allows you to collect both people and company data for the same email while avoiding malicious API spamming.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomastjdev%2Fattio_email_tracking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomastjdev%2Fattio_email_tracking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomastjdev%2Fattio_email_tracking/lists"}