=== Phone Click Tracking ===
Contributors: contentpowered
Author: Content Powered
Author URI: https://www.contentpowered.com/wordpress-plugins/
Plugin URI: https://www.contentpowered.com
Tags: call tracking, click to call, phone tracking, google ads conversions, local seo
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.2
Stable tag: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

See which pages, traffic sources and campaigns make people call or text you, without Google Analytics, Tag Manager or a paid call tracking service.

== Description ==

Phone Click Tracking logs every click on a tel:, sms:, WhatsApp or mailto: link in your own WordPress database, along with the page it happened on, where on the page it was, where the visitor came from and what device they were on. It's built for local service businesses, where the phone is the conversion and "we got 40 calls this month" means more than a sessions chart.

One limit, up front: it tracks the click, not the completed call. Someone can tap and hang up. It also doesn't swap numbers the way CallRail does, so it can't tie a click to a recorded call. What it answers, for free, is which pages and sources drive calls.

**Tracking**

* Every contact link, automatically: tel:, sms:, mailto:, wa.me and click-to-text links are caught by one listener, so links added later by page builders, menus and popups count too
* Plain-text phone numbers made tappable on phones (your listed numbers, or any number), so visitors stop copying and pasting
* Labelled numbers: Sales, Service, Emergency or a branch, and every report splits by them
* Where on the page: header, footer, menu, sidebar, popup, sticky element, the content, or buttons you name
* Desktop call clicks counted separately: a computer usually can't dial, so they never inflate the call numbers
* Repeat taps by the same visitor within a few minutes count once, and bots, headless browsers and prefetches are ignored

**Attribution**

* Source, medium and campaign from UTM tags and the referring site, with both the first visit and the visit they called from kept, so someone who found you on Google and called after coming back directly still credits Google
* Ad click IDs: gclid, gbraid, wbraid, fbclid and msclkid
* Google Business Profile calls as their own source: the plugin gives you the tagged link to put on your profile
* AI referrals: ChatGPT, Perplexity, Gemini, Claude, Copilot and other assistants are labelled
* The path to the call: the pages a visitor read before they tapped your number

**Reports**

* Calls per page with a contact rate, from the plugin's own pageview counts
* Time-of-day and day-of-week heatmap, with after-hours clicks marked
* This period against the one before, or the same period last year
* Posts and service pages ranked by calls

**Actions**

* Google Ads offline conversion export: a CSV of click IDs and click times in Google's import format, or a feed Google Ads can fetch every day, so campaigns can bid on calls without GA4
* Optional GA4 Measurement Protocol events
* Instant alerts by email, Slack or webhook (Zapier, Make, Discord, Teams), and a daily or weekly digest email
* After hours, call buttons can switch to "Text us" so the lead isn't lost to voicemail
* An optional sticky call and text bar, built only on phones

**For agencies**

* A monthly client report: a clean page to print or save as a PDF, or emailed on the 1st
* A Dashboard widget with the last 30 days
* CSV export and a REST API

**Performance and privacy**

* A tracker under 2 KB gzipped, inline, no jQuery. Clicks are sent with sendBeacon, so the dialer never waits
* Works with page caching: everything goes through a REST endpoint
* Consent-aware: cookieless until visitors agree, through the WP Consent API, so it works with your cookie banner
* Shortened IPs, automatic deletion after the period you choose, and WordPress's privacy export and erase tools

Find it under Content Powered > Phone Click Tracking in the admin menu.

Found a bug or have an idea? Use Content Powered > Report a Bug or Content Powered > Submit Feedback to send it straight to us.

= Credits =

* Icons by [Lucide](https://lucide.dev), used under the ISC License. Icons derived from [Feather](https://feathericons.com) are under the MIT License. The full license text is in `icons/LICENSE`.
* Brand icons by [Simple Icons](https://simpleicons.org), CC0 1.0. Brand names and logos are trademarks of their respective owners.
* Updates delivered by [Plugin Update Checker](https://github.com/YahnisElsts/plugin-update-checker) by Janis Elsts, MIT License.

== Installation ==

1. Upload the `phone-click-tracking` folder to `/wp-content/plugins/`.
2. Activate the plugin through the Plugins screen in WordPress. Tracking starts right away.
3. Go to Content Powered > Phone Click Tracking > Settings, and label your numbers on the Numbers tab.
4. On the Sources tab, copy the Google Business Profile link into your profile's Website field.

Updates arrive through the normal WordPress Updates screen, and you can turn on auto-updates from the Plugins screen.

== Frequently Asked Questions ==

= Does it track completed calls? =

No. It records the tap on a phone, text, WhatsApp or email link: someone tried to reach you. It can't see whether the call connected or how long it lasted. For that you need a call tracking service that gives each visitor its own number.

= Do I need Google Analytics or Tag Manager? =

No. Clicks, pageviews and sources are stored in your own WordPress database and reported in WordPress. GA4 is an optional extra.

= Will it slow my site down? =

No. The tracker is under 2 KB gzipped, printed inline, and does nothing until someone clicks a contact link. Clicks and pageviews go out with sendBeacon, which never holds up the page or the dialer.

= Does it work with page caching and script optimizers? =

Yes. Cached pages track normally, and the tracker tells WP Rocket, LiteSpeed, Cloudflare Rocket Loader, Perfmatters, Autoptimize, Jetpack Boost and "delay JavaScript" plugins to leave it alone, so the first tap is never missed.

= Is it GDPR friendly? =

Nothing is stored in the visitor's browser until they consent through the WP Consent API (or ever, in cookieless mode). IPs are shortened before they're saved, repeat taps are matched with a hash that changes daily, and old clicks are deleted automatically. Clicks made while signed in appear in WordPress's personal data export and erase tools.

= How do Google Ads conversions work? =

Visitors who arrive from a Google ad carry a click ID (GCLID). When they tap your number, the plugin keeps it. Download the conversion file, or give Google Ads the scheduled-upload feed, and Google matches each click ID to the ad that produced it.

== Changelog ==

See https://github.com/jmsprsns/phone-click-tracking/releases for the full release history.
