=== ThirstyAffiliates - Affiliate Links, Link Branding, Link Tracking & Marketing Plugin ===
Contributors: supercleanse, cartpauj
Donate link: https://thirstyaffiliates.com
Tags: affiliate links, amazon affiliates, link shortner, link tracking, redirects
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.8
Stable tag: 3.11.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

🔗 Affiliate link management & cloaker tool. Easily manage, shrink and track your affiliate links in WordPress. 🔥

== Description ==

## VISIT OUR WEBSITE 🖥️

Click here: [ThirstyAffiliates](https://thirstyaffiliates.com/?utm_source=WordPressorg&utm_medium=Free%20Plugin%20Listing&utm_content=Home)
Check out the [PRO Version](https://thirstyaffiliates.com/pricing/?utm_source=WordPressorg&utm_medium=Free%20Plugin%20Listing&utm_content=PRO)!

## THIRSTYAFFILIATES 💥

***ThirstyAffiliates*** gives bloggers the tools they need to monetize their WordPress website with affiliate marketing.

We’ve made managing your affiliate links as simple as it should be:

1. Install & activate the ThirstyAffiliates plugin
1. Go to Affiliate Links -> Add New
1. Enter the destination URL (your affiliate link) and a title
1. The plugin creates a new shortlink/link redirect to your long ugly affiliate link by making a pretty link with your own website URL
1. You can then use the new “TA” button in your editor to add your affiliate link to your content easily

eg. http://example.com/recommends/some-product

## Features ✔️

**💡 SIMPLE**
No complex setups. It’s just another post type in your admin and another button on your Visual editor.

When you are writing blog posts, you can highlight a word and click the “TA” button. This works just like the built-in link tool, you can search for the affiliate link you created earlier by name.

You can even use the Quick Add button to add affiliate links to ThirstyAffiliates on the fly while you are writing.

**🔗 BUILT-IN AFFILIATE LINK SHORTNER/LINK CLOAKER**
Create pretty links from the affiliate links you've placed on the site. ThirstyAffiliates will use a /recommends/ prefix by default for your pretty links, but this can be easily changed to match your preferences.

**💰 SEAMLESS STRIPE SALES***
Create a branded, one-click path to payment with NEW ThirstyPay™ Links. Share your link and start selling anywhere – instantly.

**⚙️ BETTER LINK MANAGEMENT**
You can group your affiliate links into hierarchical categories. eg. placing all Amazon links within an “Amazon” category, or all software links in a “Software” category.

Managing your links in ThirstyAffiliates means there is only one place to change the destination URL if required rather than having to go back and replace the link in potentially hundreds of articles.

**🔃 SAFE REDIRECTS & SMART UNCLOAKING**
You can choose from 301 (default), 302, or 307 redirects, all of which are safe link redirects.

Link redirects protect your affiliate links from being scraped and replaced by malware in your visitor’s browser.

There is also a smart uncloaking feature so if the affiliate program you are using (such as Amazon Associates) does not like your links behind a redirect, you can still use ThirstyAffiliates. Your links can be conditionally uncloaked on the front end.

**🛡️ NO LINK CLASHES OR DATABASE BLOAT**
Uses proper custom post types to avoid link clashes that can occur with other solutions.

Keeps its database footprint small to ensure you don’t over bloat your database with useless information.

**🖼️ ADD IMAGES TO AFFILIATE LINKS**
You can even add images and banners to your affiliate links and recall them for easy insertion when writing your content.

Simply click the new “TA” affiliate link button on your editor, click the cog to open the Advanced Link Picker, and search & choose the image you want to insert and it will be inserted pre-wrapped in your affiliate link.

**📊 CLICK STATISTICS & REPORTS**
Adds click tracking to your links to track every click.

Comes with built-in reports so you can explore, over time, how much your affiliate links have been clicked and what is popular on your site.

... and so much more! Visit [our site](https://thirstyaffiliates.com/) to learn more about what ThirstyAffiliates can do for you.

\* Pro users benefit from no added payment processing fees, while a small 3% fee is added per-transaction for free users.

## THIRSTYAFFILIATES PRO 💪

We have a PRO add-on for ThirstyAffiliates that bolts on extra functionality that might be interesting to advanced affiliate marketers and bloggers looking to automate parts of their affiliate marketing.

Some of our popular PRO features include:

* **Product Displays (NEW)**
Create beautifully styled and responsive displays for your affiliate links to drive more clicks and interest with ease.

* **Automatic Keyword Linking**
Boost your affiliate income by automatically linking affiliate links to keywords throughout your site, great for monetizing your back catalog of content!

* **Advanced Statistics Reports**
Amazing advanced reports such as performance by category, performance over 24/hr periods (to identify peak click times), Geolocation reports (where people click from), and more!

* **Geolocations**
Geo-target your visitors based on their country of origin and redirect them to geographically appropriate affiliate URLs

* **Google Click Events**
Pushes a click event to your Google Analytics on click

* **CSV Import/Export**
Import and export affiliate links via CSV. Great for managing links across multiple sites

* **Amazon API Importing**
Search and import affiliate links from Amazon’s Product Advertising API

* **High-speed HTAccess redirect**
Loads affiliate link redirects into your htaccess file for faster redirecting, meaning WordPress & even PHP isn’t loaded

* **Link Event Notification Emails**
Get notified about significant events with your affiliate links like when they reach a certain amount of clicks total or a certain amount of clicks in a period of time

* **Automatic Link Health Checker**
Automatically explores your affiliate links for 404’s or broken links and will notify you when it detects problems

[Check out all the ThirstyAffiliates PRO features here](https://thirstyaffiliates.com/pricing/?utm_source=WordPressorg&utm_medium=Free%20Plugin%20Listing&utm_content=PRO)

## INTEGRATIONS ⚡
* [Google Analytics](https://thirstyaffiliates.com/knowledgebase/how-to-set-up-google-click-tracking-analytics) - ThirstyAffiliates has a tight integration with Google Analytics to easily push click events when an affiliate link is clicked.
* [Amazon](https://thirstyaffiliates.com/knowledgebase/retrieve-amazon-product-advertising-api-access-key-secret-key) - Integrates with Amazon's Product Advertising API to allow you to search and import affiliate links within Amazon.

## What's Next 🤩
Enjoying your time with ThirstyAffiliates? Consider checking out some of our other projects:

* [MemberPress](https://memberpress.com/) - Full-featured Membership solution for WordPress. Control who has access to your site and sell content securely through payment gateways such as Stripe, PayPal, and Authorize.net
* [EasyAffiliate](https://easyaffiliate.com/) - Complete Affiliate Program management plugin for WordPress. Start an Affiliate Program to dramatically increase traffic, attention, and sales.
* [Pretty Links](https://prettylinks.com/) - Advanced link cloaking and redirection plugin for WordPress used to shrink, track, cloak, and share links.
* [Buy Now Plus](https://buynowplus.com/) - Easily start accepting Credit Card payments through a simple buy now button on your website or social media accounts using the Stripe gateway.
* [Members](https://members-plugin.com/) - Roles and capabilities management plugin for your WordPress site. This is an excellent plugin to use alongside a Membership solution such as MemberPress.

== Installation ==

1. Upload the `thirstyaffiliates/` folder to the `/wp-content/plugins/` directory
1. Activate the plugin through the “Plugins” menu in WordPress
1. Visit the new “ThirstyAffiliates” menu and click 'Add New' to add an affiliate link.
1. Use the new “TA” button on the Visual editor to link up an affiliate link when writing content.
1. Visit [http://thirstyaffiliates.com/](https://thirstyaffiliates.com/?utm_source=WordPressorg&utm_medium=Free%20Plugin%20Listing&utm_content=Home) for more information, info about the PRO version and support.

== Frequently asked questions ==

Here are some common questions/problems.

For more resources please see our [Knowledge Base](https://thirstyaffiliates.com/knowledge-base/?utm_source=WordPressorg&utm_medium=Free%20Plugin%20Listing&utm_content=KB).

= Who should use ThirstyAffiliates? =
ThirstyAffiliates is aimed at bloggers using WordPress, but really all affiliate marketers of any kind who use WordPress as their CMS can use ThirstyAffiliates to aid in their affiliate marketing monetization.

= Help, my links aren't redirecting! It just brings up a 404 error. =

This is a common issue usually caused by another plugin or theme not flushing redirect rules correctly after setting up another custom post type.

To resolve the problem follow these steps:

1. Deactivate ThirstyAffiliates, don't worry your links are safely stored in the database.
1. Reactivate ThirstyAffiliates
1. Visit the Settings->Permalinks page and click save.
1. Go back to ThirstyAffiliates->All Affiliate Links and view one of the links, it should be redirecting properly.

= Are there any known conflicts? =

WordPress supports a very vibrant ecosystem of themes and plugins so from time to time it's expected that there will be some minor conflicts with other products.

See our [Knowledge Base](https://thirstyaffiliates.com/knowledge-base/?utm_source=WordPressorg&utm_medium=Free%20Plugin%20Listing&utm_content=KB) for an up to date list of known conflicts.

= Is ThirstyAffiliates translatable? =
Absolutely! ThirstyAffiliates is ready for translation and we also include a number of common languages in our plugin as contributed by our lovely users.

= Do I need to have coding skills to use ThirstyAffiliates? =
Definitely not. We have built ThirstyAffiliates to be 100% within the dashboard of your site. Some knowledge of how redirects work might be beneficial, but overall it is a very simple plugin to configure and use.

= Can I use ThirstyAffiliates to run an affiliate program for my store? =
No - ThirstyAffiliates is *not* for running an affiliate program.

ThirstyAffiliates is for affiliates to manage their affiliate marketing efforts from all the programs they belong to.

If you need to run an affiliate program on your store we recommend you check out [Easy Affiliate](https://easyaffiliate.com/).

== Screenshots ==
1. Adding an Affiliate Link
2. Affiliate Link Listing
3. Settings Page
4. Category Page
5. Reports Page

== Changelog ==
= 3.11.6 =
* Updated Growth Tools
* Properly handle media file deletion
* Extended data not importing for new links
* Search columns include Slug and Destination URL
* Add slug column to Links listing table 

= 3.11.5 =
* Transform <ta> tag to link in block content
* Add filter hook to Link Fixer link data (ta_link_fixer_link_data)
* Fix Growth Tools menu display

= 3.11.4 =
* Minor bugfixes

= 3.11.3 =
* New In-plugin Notifications Inbox
* Fix broken attachments

= 3.11.2 =
* Removed pause option from Customer Portal as Stripe has removed that feature
* Return if post_type query var is not set
* Fix Gutenberg Image block not showing on front-end

= 3.11.1 =
* Minor adjustments to the Onboarding Wizard and admin notices

= 3.11.0 =
* Added ThirstyPay™ Links
* Added Welcome Onboarding Wizard to help new users get started faster
* Fixed PHP 8.2+ compatibility issues
* Pro: Added Product Displays add-on

= 3.10.21 =
* Bug Fix: Link inserter not working on WP 6.4.

= 3.10.20 =
* Bug Fix: Scheduling of in-plugin notifications and how empty images are displayed within them.
* Bug Fix: MonsterInsights event tracking with Enhanced JS Redirect.
* Bug Fix: Autolinker not working correctly with WPML (only affects Pro users).

= 3.10.19 =
* Improvement: Add WPML compatibility for thirstylinks inserted via Gutenberg editor.
* Bug Fix: Add preventDefault() call back into Enhanced JS Redirect to fix issue with links opening in new tabs twice.

= 3.10.18 =
* Improvement: Allow links with query parameters to be matched in Link Scanner.
* Improvement: Allow default event action to run with Enhanced JS Redirect option enabled.

= 3.10.17 =
* Improvement: Separate link inserter into its own toolbar group within the Block Editor.
* Bug Fix: Duplicate day showing in Reports when clocks go back.

= 3.10.16 =
* Improvement: Excluded unnecessary development files from deployment.
* Bug Fix: Alt text not being added to TA Image block.

= 3.10.15 =
* Improvement: Added helpful footer links.

= 3.10.14 =
* Bug Fix: 500 errors when using Bot Crawler Blocker.

= 3.10.13 =
* Bug Fix: TA Link Inserter jumping to bottom of page on WP 6.1
* Bug Fix: Warning message being HTML escaped

= 3.10.12 =
* Bug Fix: PHP warning

= 3.10.11 =
* Bug Fix: Security fixes

= 3.10.10 =
* Bug Fix: Security fixes

= 3.10.9 =
* Bug Fix: Security fixes

= 3.10.8 =
* Bug Fix: Security fixes

= 3.10.7 =
* Bug Fix: Fatal error on PHP versions lower than 7.3

= 3.10.6 =
* Bug Fix: Security fixes

= 3.10.5 =
* Bug Fix: Security fixes

= 3.10.4 =
* Bug Fix: Inserting links not working for non-admins
* Bug Fix: Allow uppercase extensions in external image links
* Bug Fix: Fatal error in the stats trimmer on PHP8

= 3.10.3 =
* Bug Fix: User-specific language setting having no effect on plugin translations

= 3.10.2 =
* Bug Fix: TA Link buttons missing in the block editor in WP <5.6

= 3.10.1 =
* Bug Fix: Error with the classic editor in Firefox
* Bug Fix: Duplicate scheduled events queuing up
* Bug Fix: jQuery Migrate warnings
* Bug Fix: The inline link editor jumping around the page on WP 5.6
* Bug Fix: Review notice still showing after leaving review or dismissing

= 3.10.0 =
* Changed: Admin UI tweaks
* Bug Fix: Remove styles affecting WP core image block
* Bug Fix: Notice errors when Elementor is installed

= 3.9.4 =
* Bug Fix: Conflict with the SmartCrawl Pro plugin

= 3.9.3 =
* Improvement: Add an action hook before the enhanced JavaScript redirect
* Bug Fix: Security fix on the link attachment title

= 3.9.2 =
* Feature: Add X-Robots-Tag header to nofollow links
* Improvement: Add indexes to the plugin database columns
* Bug Fix: Fatal error activating the plugin on some WP timezones
* Bug Fix: Reports only showing results for 10 links

= 3.9.1 =
* Bug Fix: Incorrect client IP retrieved from HTTP_X_FORWARDED_FOR header
* Bug Fix: External images not working in TA Image block

= 3.9 =
* Bug Fix: Gutenberg Input affiliate link as shortcode should show the error to admin only
* Bug Fix: Convert to blocks converts images on posts as ThirstyAffiliates Image block
* Bug Fix: UTC-2 and UTC+11 Timezone produces Fatal Error when activating the plugin
* Bug Fix: TA button style for block editor changes in WP 5.2.1

= 3.8 =
* Bug Fix: The "convert to blocks" button is not working with Gutenberg

= 3.7 =
* Feature: ThirstyAffiliates "Affiliate Link Images" Gutenburg block
* Bug Fix: Editor/Author unable to access "Edit Post" when plugin visibility is set to enabled & plugin visibility settings are set to same role or higher (roles below it will be affected)

= 3.6 =
* Feature: Gutenberg integration with core blocks
* Bug Fix: Affiliate links with "Open In New Tab" not working correctly in Instgram's in-app browser
* Bug Fix: Module settings still able to be accessed even if the module was disabled
* Bug Fix: Import/Export settings page could be accessed by non-administrator Dashboard users

= 3.5 =
* Improvement: Gutenberg compatibility: TA Buttons are not showing up anymore on Gutenberg classic editor
* Improvement: Gutenberg compatibility: TA buttons in wp editors present in metaboxes are not working properly.

= 3.4.0 =
* Feature: Support remotely hosted images attached to affiliate links
* Feature: Add Global value for the Redirect type setting in affiliate link editor
* Feature: Click Tracking: track device used
* Feature: Allow adding additional CSS classes
* Feature: Integration with Beaver Builder
* Feature: Integration with Elementor
* Feature: Post edit screen: When using Shortcode link insertion method show link with a special link formatting clickable to an edit screen
* Feature: Add category filter in Add Affiliate Link popup
* Improvement: Add a setting to allow people to turn off the robots.txt blocking
* Bug Fix: Link Fixer issue with query strings
* Bug Fix: Error: Cannot read property 'replace' of undefined
* Bug Fix: Query String issue with Enhanced JS redirect

= 3.3.7 =
* Bug Fix: Make htaccess bots blocker script optional for customers. turn off by default
* Bug Fix: noscript element is sent to ta_click_data_redirect AJAX as the keyword

= 3.3.6 =
* Bug Fix: Disable open new tab as a special case with Facebook Messenger browser which doesn't support it

= 3.3.5 =
* Improvement: Show warning on slug edit to inform users about consequences of editing slug in regards to already inserted links
* Bug Fix: When Statistics module is disabled hide the Enhanced JS Redirect option
* Bug Fix: Uncaught type error on URL splitting in Link Fixer
* Bug Fix: Add jQuery to script dependency list for front end TA script

= 3.3.4 =
* Bug Fix: Saved report shows wrong graph lines placement

= 3.3.3 =
* Improvement: Block bots on stats recording process for non-apache servers
* Improvement: Remove report data query on page first load
* Improvement: Add settings for blocking bots
* Improvement: Ability to turn off IP address collection on stats (GDPR compliance)
* Improvement: Move "Enable Enhanced Javascript Redirect on Frontend" setting to Link Appearance tab
* Improvement: Code improvements
* Bug Fix: Improve reliability of link scanner
* Bug Fix: attachment page can be viewed with link prefix
* Bug Fix: Improve accuracy of link performance report

= 3.3.2 =
* Bug Fix: WP 4.9.6: The post editor won't show TA buttons and shows a JS error

= 3.3.1 =
* Improvement: Add render function for URL input type on settings
* Improvement: Remove Save Changes button on Import/Export setting page
* Bug Fix: Can only click normal links once
* Bug Fix: Exporting CSV produces PHP notice: Undefined index: link_health_issue
* Bug Fix: Fix settings html markup wrapper

= 3.3.0 =
* Feature: Introduce Enhanced JS Redirect Feature
* Bug Fix: Link Fixer: When a link has been inserted with category in url, and it is removed in the backend, link won't be detected
* Bug Fix: Link Fixer: make sure the fetched ID via url_to_postid function for a given link is of "thirstylink" post type

= 3.2.4 =
* Bug Fix: Issues with link fixer for sub-directory installs and with WPML translation

= 3.2.3 =
* Bug Fix: Uncloaker module sometimes stripping away query strings
* Bug Fix: Notice: Undefined variable error

= 3.2.2 =
* Improvement: Allow Force no-cache headers on 301 redirects
* Improvement: Minor codebase improvements
* Bug Fix: Affiliate link can redirect even with invalid category slug
* Bug Fix: Allow valid characters on the slug box pattern match

= 3.2.1 =
* Improvement: Set post type and taxonomy to non-public facing
* Improvement: Rename the Link Performance report to Link Overview
* Improvement: Improve codebase
* Bug Fix: Shortcode issue with WPML
* Bug Fix: Issue with inserting thirsty affiliate link into an existing image and hitting enter key right after
* Bug Fix: Affiliate link category pages are accessible on the front end

= 3.2.0 =
* Feature: Feature to determine what pages the current affiliate link is added to
* Feature: Hide currently attached images from the media box to avoid inserting duplicate image to a thirsty link
* Feature: Ability to set some link appearance settings on a per category level
* Feature: Add ta link picker on Text Editor Widget
* Feature: Ability to add link categories from the Quick Add form of the TA link picker
* Feature: Polylang Support
* Feature: WPML Support
* Improvement: Allow sorting of thirsty links on cpt listing by link category and other headers
* Improvement: Make settings page into a vertical orientation
* Improvement: Set default redirect type to 302
* Improvement: Tidy up code
* Bug Fix: Console errors on inserting image into a thirsty link
* Bug Fix: When editing the cloaked url, the final "/" character is not added back
* Bug Fix: Last 7 days link performance report graph is not accurate
* Bug Fix: Fix php notices on the log

= 3.1.3 =
* Improvement: Add a small "Edit" link on read only fields on the List view
* Bug Fix: When migrated, geolocation URLs still have the &amp;. It needs to be changed to &

= 3.1.2 =
* Bug Fix: Fix link fixer script to detect links with either http or https protocol
* Bug Fix: If all modules requiring ta.js are off dequeue it
* Bug Fix: isThirstyLink should recognize root relative URLs and others
* Bug Fix: Thirstylink CPT publish status is translatable

= 3.1.1 =
* Bug Fix: Change reports content display method to use callback function instead
* Bug Fix: Update migration for new tracking script option for GCT module

= 3.1.0 =
* Feature: Add REST API support
* Feature: Automatically add link prefix in the robots.txt to prevent indexing
* Feature: Exclude known search engine bots from stats
* Feature: Trim stats table on a regular cron
* Improvement: Make sure the insert buttons in link picker popup stay in place
* Improvement: Readd the social links on the settings Help tab
* Improvement: Improve the save click data function
* Bug Fix: Link picker popup starts searching with only 1 character
* Bug Fix: Uncloaker should not HTML encode & ampersand characters
* Bug Fix: Authors and Editors cannot see the ThirstyAffiliates link picker button
* Bug Fix: Htaccess module removes the wrong .htaccess section
* Bug Fix: Various error messages for different user roles

= 3.0.3 =
* Bug Fix: Visual editor breaks on text widgets
* Bug Fix: Conflict with Shortcoder plugin
* Bug Fix: Tour keeps popping up

= 3.0.2 =
* Bug Fix: Link Fixer overrides existing CSS classes on the link
* Bug Fix: Link Fixer removes any query strings from the cloaked link
* Bug Fix: Properly handle special characters on the text in which the link is attached
* Bug Fix: Disabling link CSS and title globally won't work with Link Fixer
* Bug Fix: Fix typo on search placeholder on editor
* Bug Fix: Conflict with OptimizePress theme

= 3.0.1 =
* Bug Fix: Link Fixer overrides existing CSS classes on the link
* Bug Fix: Delete all stats data of a link when its permanently deleted
* Bug Fix: Minor code fixes on data migration ( from V2 to V3 )
* Bug Fix: Properly escape destination urls

= 3.0.0 =

***NOTE: 3.0.0 IS A MAJOR VERSION FULL REWRITE OF THE PLUGIN. WHILE WE HAVE DONE OUR BEST TO ENSURE A SMOOTH MIGRATION, WE HIGHLY RECOMMEND YOU TEST ON A STAGING AREA IF POSSIBLE.***

* Migration Assistant: Migrates your affiliate links to the new 3.0.0 standard on update
* Migration Assistant: You can also downgrade your affiliate links back to the old format if you downgrade back to version 2.
* Feature: Rewrote the entire plugin for massive improvements
* Feature: Implemented new data storage model
* Feature: Introduced modularization so parts of ThirstyAffiliates can be turned on/off
* Feature: New link picker that looks and works exactly like the standard link tool in WordPress
* Feature: New advanced link picker (press the cog icon on the link picker) for advanced searching and insertion modes (like image insertion)
* Feature: Choose your default link insertion mode (standard link or shortcode)
* Feature: Reworked the affiliate link edit screen for clarity
* Feature: Reworked the entire settings area for clarity
* Feature: Added additional link information on list view
* Feature: Introduced Link Fixer - a tool that automatically corrects old/outdated affiliate links on the front end
* Feature: Introduced uncloaking - lets you smartly uncloak links individually or based on their category, great for compatibility with stricter affiliate program terms (such as Amazon Associates Terms of Service)
* Feature: Introduced click tracking & basic reports
* Feature: Introduced keyboard shortcut commands
* Feature: Reworked the quick add button feature
* Feature: Added a plugin tour on activation
* ... plus many other small improvements, tweaks and bug fixes. We hope you love it!

== Upgrade notice ==

There is a new version of ThirstyAffiliates available.
