=== Dream Agility - Tracking Pixel ===
Contributors: dreamagility
Donate link: https://dreamagility.com
Tags: Dream Agility, Tracking Pixel, Tracking, Pixel, Conversion, Conversions
Tested up to: 7.1
Requires at least: 5.3.2
Requires PHP: 7.0
Stable tag: 1.0.17
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Support for the Dream Agility Tracking Pixel.

=== Description ===

Tracking Pixel Service: https://dreamagility.com/platform/intelligent-tracking-solution
Privacy Policy: See the Privacy Policy section

*NOTE: This plugin is intended to be used by Dream Agility clients only. While the plugin can still be installed by non-clients, the plugin will only generate a reference code based on the license you enter, which are only generated for clients. For more information about Dream Agility and our services check out our website: https://dreamagility.com/
*NOTE: An EXTERNAL SERVICE is used in this plugin, read more about it in detail in the External Service section.*
*NOTE: This plugin REQUIRES a Dream Agility Tracking Pixel license key, if you do not have one, or are unsure if you received one. Contact clark.calum@dreamagility.com.*
*NOTE: This plugin connects to Dream Agility servers in order to validate the license you enter against our system and to generate the reference code and register it in our system*

This plugin integrates the Dream Agility Tracking Pixel into your WordPress site. Allowing you to track conversions across your site. The widget that this plugin provides generates a unique reference number based on your license key for each visitor to your site and tracks this unique number. When a customer calls to make a purchase they must quote the reference number displayed so that the conversion can be linked with the tracking pixel.

=== Beta Plugin Versions ===

Use Beta Tracking Script (previously Enable Beta Features) selects the external beta tracking script only. Install Beta Version is a separate action under Settings > Dream Agility; installing plugin code does not change the script preference. Existing beta-script users are not automatically opted into beta plugin updates.

On a single-site installation running WordPress 6.3 or newer, an administrator can explicitly install the beta plugin published on WordPress.org, then install later beta updates manually. Return to stable reinstalls the public stable plugin and leaves the beta plugin channel, preserving settings and the script choice. Beta-only features may become unavailable. Both releases must include the version switcher. Multisite and servers requiring interactive FTP/SSH credentials should use administrator-managed manual installations instead.

Release checks read public metadata from api.wordpress.org and plugins.svn.wordpress.org. Plugin ZIPs come only from downloads.wordpress.org. No license keys, booking data or site URLs are sent by these checks. Release information is cached for five minutes; Check for releases refreshes it. A newly published beta ZIP may take time to become available; a version mismatch stops installation before replacing files. Beta plugin automatic updates are disabled; normal stable updates retain the site's policy.

=== Installation ===

Easy Installation
1. Install the plugin through the WordPress plugins screen.
2. Configure the plugin

Manual Installation
1. Create a directory called "Dream Agility - Tracking Pixel" in the "/wp-content/plugins" directory.
2. Upload the plugin files to the '/wp-content/plugins/Dream Agility - Tracking Pixel' directory.
3. Configure the plugin

Configuration
1. Activate Dream Agility - Tracking Pixel on the "Plugins" screen in your WordPress site.
2. Go to the "Appearance/Widgets" screen and add the "Dream Agility Tracking Pixel" widget somewhere on your page (it doesn't really matter where as the widget relocates to the top of the page).
3. One of the widget's settings is "license", enter your license key here. (If you have not been sent a license key, contact clark.calum@dreamagility.com.)
4. You can then customise the widget's appearance, or leave it as it is.
5. Save (or "Publish") the changes (which option you see depends on where you customised the widget).
6. Follow the Final Steps to ensure the Tracking Pixel widget is working.

Final Steps
1. Navigate to any page on your WordPress site (NOTE: You will have to log out in order to see the Tracking Pixel, otherwise it may be hidden underneath the Word Press header).
2. If you can see the Tracking Pixel widget and it has generated a call reference number, you have completed the installation. If not, take a look in the FAQs section below, if your issue still isn't resolved, contact clark.calum@dreamagility.com.


=== Privacy Policy ===

Your data will be utilised and stored in accordance with the contract you have with Dream Agility, as displayed below.

Over writing section 3 of the Master Terms: The only personal/sensitive data we will gather from the tracking pixel is the email address, unless we’re expressly asked in writing by the Client to collect any other data.


3. Client hereby grants to Dream Agility a non-exclusive, worldwide, royalty free license to link to, store, reproduce, reformat, transmit, display (publicly or privately), perform, provide access to, use, distribute, and to license to third parties Client Data for the purposes of providing the Services and to create, own and use, in any manner, Dream Agility Data.  “Client Data” means all information, data and materials provided directly or indirectly by Client in connection with this Agreement or through access to the Service, including but not limited to data associated with any order or purchase through a Client website or online transactional system, Client’s product list(s), products and pricing data, shipping costs, sales tax information, product specifications, graphics, in-stock/availability information, including all updates thereto, and all other materials needed to perform or which may be used in connection with the Services. “Dream Agility Data” means data which (i) is created by Dream Agility, and (ii) incorporates Client Data without direct or indirect reference to Client, its customers or customer orders.  


=== External Services ===

There is one external service that is used in this plugin, it is one of our APIs. Below is a detailed explanation of what the API does.

Data sent to the external service:
-License
-Origin (url of the WordPress Site)
-Unique Identifier

1. Validate license
	1.1. Searches for the license in our Database of Tracking Pixel Licenses and returns the license and origin (the url of the site the license is valid for).
		1.1.a. Fails if the license is invalid (not found in our database).
	1.2. Checks that the origin of the WordPress site is the same as the origin stored with the license from step 1.1.
		1.2.a. Fails if the origins do not match.
2. Generate Reference Number
	2.1. Generates a hash from your license and uniqueId.
	2.2. Find the item in our database that contains the license-uniqueId hash.
		2.2.a. If the item does not exist then:
			2.2.a.1. Check to see if the license-uniqueId hash has converted (the user has already made the purchase)
				2.2.a.1.a. Fails if the license-uniqueId hash has already converted
				2.2.a.1.b. If the license has not already converted then generate a new reference code for the license-uniqueId hash
					2.2.a.1.b.1. Store the new reference code with the license-uniqueId hash, license and uniqueId in the database (for future tracking).
		2.2.b. If the item exists then return the reference code contained in the item from our database
3. Return Reference Number to the plugin

=== Changelog ===

= 1.0.16 =
* Prevent direct execution of plugin include files outside WordPress.

= 1.0.15 =
* Added separate stable and beta release versions so tested beta changes can be promoted directly to stable.
* Publish beta packages automatically when the Beta branch is updated, preserving the public stable release and explicit installation opt-in.
* Added explicit opt-in installation of WordPress.org-hosted beta plugin releases and a return-to-stable action.
* Renamed Enable Beta Features to Use Beta Tracking Script and kept it independent of plugin version switching.
* Added compatibility and package-version checks; retained settings when switching versions.
* Corrected the minimum PHP requirement to 7.0.

= 1.0 =
*Release

=== Upgrade Notice ===

= 1.0.16 =
Adds direct-access guards to plugin include files. PHP runtime security updates must still be applied by your hosting provider.

= 1.0.15 =
Adds separate opt-in beta plugin installations and a return-to-stable action. The existing script preference is retained.

= 1.0 =
First Release of the Dream Agility - Tracking Pixel Plugin

=== Screenshots ===

1. Dream Agility - Tracking Pixel Widget Settings

=== Frequently Asked Questions ===

= What if I do not have a license key? =

Contact clark.calum@dreamagility.com.

= Why can't I see the Tracking Pixel widget? =

Ensure you have logged out of Word Press (by hovering over your account name in the top right of the window) and clicking "log out". Then navigate back to your site, you should be able to see the Tracking Pixel widget now. If there is another issue take a look at some of the other questions in this section. If the Tracking Pixel is still not visible contact clark.calum@dreamagility.com.

= Why does the Tracking Pixel widget display "Invalid License"? =

If the Tracking Pixel widget is displaying "Invalid License" instead of a call reference code, it means that the license you entered was not found on our system or the origin of your Word Press site does not match the origin associated with the license you entered. Double check that the license you entered is correct. If you have double checked that the license entered is correct but "Invalid License" is still displayed, contact clark.calum@dreamagility.com.

= The Tracking Pixel widget is stuck on "fetching..", what should I do? =

If the Tracking Pixel widget is stuck displaying "fetching..", it means there was an issue on our end, try refreshing your cache by pressing Ctrl+F5 (on Windows), CMD+R or Apple+R (on Mac) or F5 (on Linux). If this has not solved the issue, contact clark.calum@dreamagility.com.

=== Support ===

If the FAQs section has not answered your question. Contact clark.calum@dreamagility.com.