explaingit

he4rt/marketing-extension

21JavaScriptAudience · developerComplexity · 3/5ActiveSetup · easy

TLDR

Chrome extension that intercepts X (Twitter) GraphQL responses while you browse, then exports structured JSON of tweets, replies, and likers for a tracked handle.

Mindmap

mindmap
  root((he4rt-marketing-extension))
    Inputs
      X handle
      Live GraphQL responses
      Manual scrolling
    Outputs
      Structured JSON export
      Tracked tweets list
      Favoriters by tweet
    Use Cases
      Track community engagement on X
      Feed He4rt Hub backend
      Cross reference likers
    Tech Stack
      JavaScript
      Chrome extension
      MV3 service worker

Things people build with this

USE CASE 1

Export every reply to a community account on X as a single JSON file

USE CASE 2

Capture which users liked specific tweets and merge with an internal member list

USE CASE 3

Feed engagement data into a Laravel backend like He4rt Hub

USE CASE 4

Audit community manager activity across a handle without paid X APIs

Tech stack

JavaScriptChrome ExtensionMV3

Getting it running

Difficulty · easy Time to first run · 30min

Data only appears for endpoints the page actually loads, so you must manually scroll the profile and click like modals before exporting.

In plain English

He4rt Analytics is a Chrome browser extension that quietly captures the data that X, formerly Twitter, already sends to your browser, and turns it into a structured JSON file. It was built by the He4rt Developers community in Brazil to feed their own backend, called He4rt Hub, with detailed engagement data about a specific account. The README is in Portuguese. The problem it tries to solve is that X does not let community managers export engagement data in bulk. You can see likes and views one tweet at a time, but you cannot list every community member who interacts with you, track replies across posts, or cross reference the people who liked your posts with your own member database. The extension runs in the background while you browse X, intercepts the GraphQL responses the page is already loading, and merges them into one clean export. Internally there are three parts. A script called interceptor.js runs in the main world of the page so it can replace the fetch function and clone every response. A second script, content.js, runs in the isolated extension world and forwards those messages to the background. The background service worker, background.js, filters by the handle you are tracking, deduplicates by tweet id, and consolidates everything. The README explains the split is needed because the X site has a strict content security policy, so the page level patch and the chrome.runtime access have to live in separate worlds and talk through window.postMessage. The endpoints it captures are UserTweets for the timeline of the tracked handle, UserByScreenName for the profile data, Favoriters for the users who liked individual tweets, and TweetDetail for reply threads to the tracked handle. Other GraphQL payloads are saved raw for later use. To install it, you clone the repo, open chrome extensions, turn on developer mode, click Load unpacked, and pick the folder. To use it you click the extension icon, type a handle such as He4rtDevs, click Track, open that profile, and scroll through the tweets. To pull in who liked a tweet, you click the like count and scroll the modal. The popup has an Export JSON button that downloads a file named after the handle and the date. The output groups tracked_account, tweets, community_replies, favoriters_by_tweet, and a summary block with totals and top tweets. The README notes the file is shaped for direct ingestion into the He4rt Hub Laravel backend.

Copy-paste prompts

Prompt 1
Walk me through loading the unpacked he4rt marketing-extension into Chrome with developer mode on
Prompt 2
Explain how interceptor.js, content.js, and background.js split work because of the X content security policy
Prompt 3
Track the He4rtDevs handle, scroll the timeline, and export the JSON with tracked_account, tweets, and favoriters_by_tweet
Prompt 4
Show me how Favoriters data is captured when I click the like count on a tweet and scroll the modal
Prompt 5
Adapt the background filter to track two handles at once and merge them into the same export
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.