=== Addexion Ads ===
Contributors: megatechbj
Tags: ads, advertising, banner, monetization, elementor
Requires at least: 5.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.6.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Earn money from your WordPress site with ads from the Addexion network: shortcode, widget, Elementor or automatic placement.

== Description ==

Addexion is an advertising network for African websites. Advertisers target sites by country, language and topic; publishers earn a share of every billed impression or click.

This plugin connects your WordPress site to your Addexion publisher account and displays the ads of your ad slots, without editing your theme:

* **Shortcode** – `[addexion slot="YOUR_TOKEN"]` in any post, page or text widget.
* **Widget** – "Addexion Ad" in Appearance → Widgets.
* **Elementor widget** – search for "Addexion Ad" in the Elementor panel.
* **Automatic placement** – at the top of every page, inside posts (before or after the content) and in the footer.

Ads are loaded asynchronously and do not slow down the display of your pages. Only ads approved by the Addexion team, and matching your site's topic, country and language, are displayed.

An Addexion publisher account is required (free): [addexion.com/publishers](https://addexion.com/publishers).

== External services ==

This plugin relies on the Addexion advertising service (https://addexion.com), operated by Addexion, to choose and display ads and to count impressions and clicks. It cannot work without it.

* **When:** every time a visitor views a page containing an Addexion ad slot, and every time they click on an ad.
* **Requests sent from the visitor's browser to addexion.com:**
  * `/api/serve` – to get the ad to display. Sends the ad slot token, the address of the current page without its query string (to show the publisher where the slot is installed) and, as with any web request, the visitor's IP address, browser user agent and the page origin (Origin / Referer header).
  * `/api/track/impression` – when the ad is displayed. Sends the ad slot token, the ad ID, a tracking token issued by `/api/serve`, the IP address and the user agent.
  * `/api/track/click` – when the visitor clicks on the ad, before redirecting them to the advertiser's site. Sends the ad slot token, the ad ID, a tracking token issued by `/api/serve`, the IP address and the user agent.
* **Why:** to select an ad suited to the site, to bill advertisers and pay publishers, and to prevent fraud (repeated impressions or clicks from the same IP address, blocked IP addresses).
* **Stored data:** Addexion stores the IP address and user agent attached to each impression and click. No cookie is set by the plugin.

The site ID entered in the plugin settings is written in the pages of your site (in a `<meta name="addexion-site">` tag) so that Addexion can check that the site belongs to your account.

Addexion terms of service: https://addexion.com/conditions-generales
Addexion privacy policy: https://addexion.com/politique-de-confidentialite

== Installation ==

1. Create a free publisher account on [addexion.com](https://addexion.com/publishers) and declare your site. Once approved, create one or more ad slots.
2. In WordPress, go to Plugins → Add New, search for "Addexion Ads", then install and activate the plugin (or upload the zip file with Plugins → Add New → Upload Plugin).
3. Go to Settings → Addexion Ads and paste your **site ID** (shown on your site page in your Addexion dashboard).
4. Place your ads: enable an automatic placement in Settings → Addexion Ads and paste the token of an ad slot, or use the shortcode, the widget or the Elementor widget.

== Frequently Asked Questions ==

= Where do I find my site ID and my ad slot tokens? =

In your Addexion publisher dashboard: My sites → your site. The site ID is shown under the embed code, and each ad slot has its own token.

= No ad is displayed. Why? =

Check that your site and your ad slot are approved and active in your Addexion dashboard, and that the token is correct. An ad is only displayed when an advertiser's campaign matches your site (format, topic, country, language); if none matches, the slot stays hidden.

= Does it work with caching plugins? =

Yes. Ads are loaded in the visitor's browser, so cached pages still show fresh ads. After changing the site ID, clear your cache so that the new `<meta>` tag appears in your pages.

= Does the plugin set cookies? =

No. See "External services" for the data sent to Addexion.

== Screenshots ==

1. The plugin settings page.
2. The "Addexion Ad" widget.
3. The Elementor widget.

== Changelog ==

= 1.6.1 =
* Translations are now loaded by WordPress from translate.wordpress.org.

= 1.6.0 =
* Your Addexion dashboard now shows on which page each ad slot was last seen.

= 1.5.0 =
* Impressions and clicks are now counted with a signed token issued for each ad display, to protect publishers and advertisers against fake views and clicks.

= 1.4.0 =
* The plugin is now in English and translatable, with a French translation included.
* Fixed: the Elementor widget could cause an error on sites where Elementor loads after this plugin.
* Added a "Settings" link on the Plugins screen.
* The settings are removed when the plugin is deleted.

= 1.3.0 =
* New "Site ID" setting, written in your pages so that Addexion can check that the site belongs to you.

= 1.2.0 =
* Elementor widget.
* Automatic placement at the top of the page.

= 1.0.0 =
* First version: shortcode, widget, automatic placement in posts and in the footer.

== Upgrade Notice ==

= 1.6.0 =
Shows in your Addexion dashboard on which page each ad slot is installed.

= 1.5.0 =
Required update: future versions of the Addexion platform will only count impressions and clicks sent by version 1.5.0 or later.

= 1.4.0 =
Fixes an error with Elementor on some sites. Recommended update.
