Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/tabaix/tabaix-amazon-click-event/archive/refs/heads/main.zipA WordPress plugin that sends a Google Analytics 4 event named amazon_click whenever a visitor clicks an outbound Amazon affiliate link, so the click can be used as a Key Event (conversion) in Google Analytics. Tiny, dependency-free, no data stored.
Built for tabaix.com. Free to use and share.
Features
- One event — every click on an outbound Amazon affiliate link fires
amazon_clickin GA4. - Key Event ready — mark
amazon_clickas a Key Event in GA4 and Amazon clicks count as conversions, with no other setup. - Tiny — a single small file, no settings page, no database writes, no data stored.
Requirements
- WordPress with Google Analytics 4 already installed on the site (for example via Site Kit). No extra libraries — the plugin only uses core WordPress functions.
Installation
- Download the latest release (or clone this repo).
- Upload the
tabaix-amazon-click-eventfolder to/wp-content/plugins/, or in WP Admin go to Plugins > Add New > Upload Plugin and install the ZIP. - Activate Tabaix Amazon Click Event. There is no settings page — it works as soon as it is active.
Usage
- In GA4, open Admin > Data display > Events, find
amazon_click, and mark it as a Key Event. - Click an Amazon link on the site and check Reports > Realtime — the
amazon_clickevent appears with the link as its parameter.
FAQ
Clicks are not showing in GA4. What do I check first? Check that GA4 itself is firing on the page (a debug view or Realtime report with any event). This plugin only adds the click listener — if the GA4 tag is missing, there is nothing to send the event to.
Does it track non-Amazon links? No. Only outbound Amazon affiliate links fire the event.
Links
Changelog
1.0.0
- Initial public release:
amazon_clickGA4 event on outbound Amazon affiliate link clicks.
License
GPL-2.0-or-later — see https://www.gnu.org/licenses/gpl-2.0.html