WP Manifestindependent plugin directory
manifest / analytics / pub-ong-tracker

Pub.ong - Instagram Ad Tracker

A professional, privacy-first WordPress plugin that monitors Instagram profiles, tracks advertisements, evaluates compliance with national ad transparency regulations (#pub) using Mistral AI (Pixtral-12B), and enables direct reporting/publishing to Instagram Business.

by Pub.ong · github.com/www-diogo-in/pub-ong-tracker

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/www-diogo-in/pub-ong-tracker/archive/refs/heads/main.zip

Pub.ong - Instagram Ad Tracker & Compliance Monitor

An advanced, privacy-first WordPress plugin that automatically monitors selected Instagram profiles, audits posts for compliance with advertising transparency guidelines, and enables seamless regulatory reports or warnings directly via Instagram Business.

Powered by Mistral AI (Pixtral-12B), the plugin analyzes post captions and images in real-time, detecting undisclosed sponsorships and unregistered parterships (missing #pub, #ad, or partnership declarations).


🚀 Key Features

  • AI-Powered Visual & Text Audit: Performs deep semantic analysis of post captions and images using Pixtral-12B to detect promotional intent and cross-reference it with compliance requirements.
  • Self-Healing AI Assessments: Automatically recovers failed, empty, or corrupted AI analysis inputs to guarantee dataset integrity.
  • Public Transparency Leaderboard: Renders dynamic, responsive rank widgets displaying both top complies ("Mural de Boas Práticas") and top non-compliant profiles ("Mural da Transparência") to encourage clean advertising.
  • Community Auditing System: Empower visitors to vote ("Agree" / "Disagree") on AI compliance decisions, adjusting ranks automatically on community consensus.
  • GD Image Watermarking Engine: Automatically centralizes and watermarks captured images with clean source attribution banners (Fonte: Instagram @user) for professional legal archives.
  • Instagram Business Direct warnings: Let administrators publish notices directly on their own business feeds or DMs over Facebook Graph APIs.
  • Automa Extension REST API: Fully exposed endpoint (/wp-json/pub/v1/alertas-pendentes) secured with configurable secrets to easily integrate with Automa browser automations.
  • Check a live version here: (https://pub.ong/monitorizacao-de-redes-sociais-na-identificacao-de-publicidade-pub/).

🛠️ How It Works (Architecture)

The following diagram illustrates the lifecycle of a post audit from scraping to compliance reporting:

graph TD
    A[WordPress Daily Cron] -->|Trigger Scrape| B[Apify Instagram Scraper]
    B -->|Fetch New Posts| C{Check Local Database}
    C -->|Already Audited| D[Skip Post]
    C -->|New Post| E[Sideload Thumbnail Image]
    E -->|GD Engine| F[Generate Square Canvas + Attribution Source]
    F -->|Visual + Text Audit| G[Mistral AI Pixtral-12B Endpoint]
    G -->|Parse JSON| H{Evaluate Compliance}

    H -->|Organic / Compliant| I[Mark as Compliant / Verified]
    H -->|Undisclosed Ad| J[Mark as Possible Infraction]

    J -->|Community Vote| K{Community Review}
    K -->|Agree| L[Update Top Infractor Leaderboard]
    K -->|Disagree > Agree| M[Automatic Self-Correction to Compliant]

    J -->|Admin Action| N[Direct Report to Authorities / Send IG Business Warning]

⚙️ Configuration & Options

Unlike static instances, Pub.ong Tracker is built to be completely domain-agnostic. All configuration is done dynamically in the WordPress Settings page under Settings > Pub.ong Tracker:

Setting Option Description Recommended Value
Apify API Key Used to authenticate with Apify Instagram post scrapers. Your Apify Token
Mistral API Key Used to connect to the Mistral AI /chat/completions API. Your Mistral Key
Instagram Profiles List of Instagram usernames to monitor (one per line). @cristiano, @neymarjr
Automa REST Secret Configurable token to secure Automa extension requests. A secure random string
Tracker Page URL The URL of the public page containing the [pub_ong_tracker] shortcode. https://yoursite.com/tracker
Failure Alert Email Destination address for scraping or API fail notices. admin@yoursite.com

💻 Technical Prerequisites

To ensure the plugin operates correctly, your web server must support the following:

  • PHP GD Extension: Used by the watermarking engine. If missing, the plugin falls back to using original image attachments gracefully without crashing.
  • WordPress media API: The host must support remote sideloading of images (allow_url_fopen or Curl enabled).
  • SSL Certificates: Required to connect with Facebook Graph APIs and Mistral AI endpoints securely.

📦 Installation & Setup

  1. Upload the Plugin: Clone or download this repository, compress the folder to a .zip file, and upload it in your WordPress Admin panel under Plugins > Add New > Upload Plugin. Alternatively, place the files directly under wp-content/plugins/pub-ong-tracker/.

  2. Activate the Plugin: Go to your Plugins dashboard and click Activate on Pub.ong - Instagram Ad Tracker.

  3. Configure Settings: Navigate to Settings > Pub.ong Tracker, insert your API keys, the usernames of the profiles you wish to track, and configure your REST endpoint secret.

  4. Add to a Page: Create a page in WordPress and insert the following shortcode to render the complete public auditing application:

    [pub_ong_tracker]

📄 License

This project is open-source and licensed under the MIT License. Contributions, bug reports, and pull requests are highly welcome!