=== iTunes Link Engine  ===
Contributors: GeoRiot
Tags: apple, itunes, link, engine, localize, globalize, music, movies, TV, affiliate, Geniuslink, ile, javascript
Requires at least: 2.7
Tested up to: 6.5
Stable tag: 1.4.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Download the iTunes Link Engine to automatically localize and affiliate iTunes product links to improve user experience and increase conversions.

== Description ==

Turn every iTunes link across your site into an opportunity for worldwide sales by instantly converting all your links to the iTunes, App Store, iBooks, and Mac App Store, into intelligent globalized links. Whether you are promoting music, TV, movies, books or apps, within the iTunes ecosystem, the iLE is the easiest way to localize every link on your Wordpress site, so that it works across every iTunes Storefront.  This means that all clicks from your international audience are sent to the appropriate item in their own local storefront, improving conversions.

*Note:* You are not required to have a Geniuslink account to use this plugin. However, if you would like to earn affiliate commissions, you must sign up for a Geniuslink Account. [Try it out for free](http://social.geni.us/iLESignup) and check out pricing for the Geniuslink service on [our website](http://social.geni.us/PFCclG).

= How does the iTunes Link Engine plugin work? =

As soon as the plugin is installed and activated, your iTunes product links are instantly localized every time a user loads the page. You can even add new links to your WordPress site and each will be automatically converted without any additional work from you. Nothing else is needed on your part.

= How do I earn commissions from my links? =

To earn affiliate commissions, you first need to [create a Geniuslink account](http://social.geni.us/iLESignup), then connect it to your plugin with your API keys (detailed instructions can be found in the [FAQ](https://wordpress.org/plugins/itunes-link-engine/faq/).  

Once signed up, add your PHG affiliate token to your Geniuslink Dashboard. Once your token has been added, the iTunes Link Engine will automatically add it to each link within your WordPress site. 

* *Note:* The iTunes Link Engine WordPress plugin is free to use. However, in order to earn affiliate commissions and take advantage of the in-depth reporting, **you must have a Geniuslink account**. By default, Geniuslink’s affiliate token will be used until you have connected your account, and added your own via the Geniuslink Dashboard.

= How is Geniuslink different? =

Most link “localization” plugins only translate a link for an international click when the same ADAM (Apple Digital Asset Management) ID exists in both storefronts.  However, due to many factors including Digital Rights licensing and the use of various distributors across different countries, the ADAM ID is not guaranteed to be the same. The iTunes Link Engine plugin uses Geniuslink’s [patented](https://www.google.com/patents/US8838767) five-step algorithm to find the metadata available from each product, and then match the product across storefronts. Our algorithm ensures that the user is sent to the most relevant product instead of sending your users to a non-existent item or an error message. 

In addition, connecting your Geniuslink account to the iTunes Link Engine gives you access to comprehensive reporting on clicks and commissions that no other plugin can offer. Geniuslink’s reports allow you to review performance metrics such as product types, click referrer, browser, device, operating system, geography, and more.


= Key Features: =

* Pick which Geniuslink group this plugin syncs to. Set up the plugin on multiple WordPress sites and track clicks separately, or set up a specific group just for your WordPress site traffic. Instructions can be found under “How do I change the default group?” in the [FAQ](https://wordpress.org/plugins/itunes-link-engine/faq/)
* Automatic localization and translation of all iTunes links based off a visitor’s location.
* Simple, easy setup.
* One time configuration. Simply install the plugin, set up your Geniuslink account, and connect the two with an API key.  We take care of the rest.
* No need to have access to the iTunes API or build links through the iTunes Link Builder in PHG. Just paste normal iTunes links anywhere on your site (even behind images).
* Your workflow remains the same.  No need to learn a new linking syntax, or disrupt your current flow.
* Automatically converts LinkShare, Tradedoubler, and DGM (Pro) formatted iTunes Affiliate links (from before the PHG rollout).
* Brand your globalized links with your own custom domain (Note: this requires a paid [Geniuslink Account](http://social.geni.us/PFCclG))

= What makes the iTunes Link Engine different from other Affiliate WP plugins? =
* Other plugins do not offer support for the new PHG affiliate program.
	* After iTunes made the switch to PHG in late 2013 and early 2014, similar plugins became obsolete.
* Unrivaled support from the Geniuslink team.
* No need to build links manually with a special link format. All of your links are automatically converted to localized links when the page loads.


== Installation ==

There are three easy steps to get the most value from the iTunes Link Engine.

= To install the plugin: =
1. Install the iTunes Link Engine plugin using the WordPress Plugin Installer [here](https://wordpress.org/plugins/itunes-link-engine/).
1. Activate the plugin through the “Plugins” menu in your WordPress Dashboard.
1. That’s it! Once activated, your links will automatically be localized for your international audience.

= To connect your Geniuslink account: =
1. If you don’t have an account already, create a Geniuslink account [here](http://social.geni.us/iLESignup).
1. After signing in, navigate to the Account page to create a new API token. 
1. Access the iTunes Link Engine Settings through the “Settings” tab within your WordPress dashboard. 
1. Copy the API Key and API Secret into your iTunes Link Engine plugin.

*Note:* You are not required to have a Geniuslink account, to use this plugin. However, if you would like to earn affiliate commissions, you must sign up for a Geniuslink Account. [Try it out for free](http://social.geni.us/iLESignup) and check out pricing for the Geniuslink service on [our website](http://social.geni.us/PFCclG).

= To affiliate your links: =
1. If you have already added your affiliate token to your Geniuslink account, you’re good to go.
1. If you haven’t already, sign up for the [PHG affiliate program](https://itunes.phgconsole.performancehorizon.com/login/itunes) (instructions on how to sign up can be found on [our site](http://help.geni.us/support/solutions/articles/3000027495-itunes-phg-affiliate-program-guide)).
1. Once approved, jump into your Geniuslink dashboard and click on the “Affiliate” tab. Then, click “Connect an affiliate program” button and paste in your PHG affiliate token.

Once saved into the dashboard your links will automatically be affiliated with your PHG affiliate token when they are clicked. 

== Frequently Asked Questions ==

= What is Geniuslink =

Geniuslink is the secret sauce behind the iTunes Link Engine that allows you to build the world’s most intelligent links. Improve user experience, and maximize your affiliate earnings and marketing efforts through Geniuslink’s service. For marketers promoting content within the iTunes ecosystem, Geniuslink allows you to build intelligent links that automatically route customers to the correct product within their own local storefront. Geniuslink also allows you to enter your PHG Affiliate Token to earn commissions from all of your clicks. 

= Do I need a Geniuslink Account to use this plugin? =

No, you do NOT need a Geniuslink account to use the iTunes Link Engine plugin.  As soon as you install and activate the free plugin, all of your links will be automatically localized, and your customers will be routed to the correct product in their local storefront.  However, if you want to add your affiliate token, you will need a Geniuslink account. By default, Geniuslink’s affiliate token will be used until you have connected your account, and added your own via the Geniuslink Dashboard. 

= How do I get my API keys? =

To get your Geniuslink API Keys, follow these simple steps:

1.     If you do not have a Geniuslink account, [create an account](http://social.geni.us/iLESignup).
1.     Log into your Geniuslink Dashboard, and navigate to the to the [Tools Tab](https://my.geni.us/tools#api-section).
1.     Click the 'Add an API key' button to create a an API key and secret code
1.     Navigate to the iTunes Link Engine settings under “Settings” in your WordPress dashboard.
1.     Next, simply copy and paste the "Key" and "Secret" codes into the "Enable Reporting and Commissions" area of the plugin. **Please note:** It may take up to 3 minutes for new keys to become available for use after adding them to your dashboard.
1.     Once pasted, your Geniuslink account will be automatically connected.

= Do I have to pay for Geniuslink? =

If you’re only interested in giving your international audience a better experience and improving sales by redirecting them to their local storefront, the iTunes Link Engine is free.

However, if you would like access to advanced reporting features, a custom domain, or the ability to affiliate all of your links, you will need to sign up for a Geniuslink account. [Try it out for free](http://social.geni.us/iLESignup). Learn more about our [fair and transparent pricing](http://social.geni.us/iLEPricing).

Please note: By default, Geniuslink's affiliate token will be used until you have added your own via the Geniuslink dashboard.  Please [contact Geniuslink](mailto:hi@geni.us) if you have any questions.


= How do I affiliate my links? =

First, connect the plugin to your Geniuslink account (see "How do I get my API keys?"). Then, follow the steps below:

1. Add your PHG affiliate token to your Geniuslink dashboard.  Instructions on how to do this can be found [here](http://help.geni.us/support/solutions/articles/3000034945-adding-your-phg-affiliate-token-to-geniuslink).
*Note:* If you’ve already done this within your existing Geniuslink account, you do not need to add your token again.
1. You’re all set! You’ll start earning commissions from anything purchased from iTunes.

**Please Note:** If you are already using affiliated links on your website, they will NOT remain affiliated if you use the iTunes Link Engine Plugin.  In order to affiliate your links, you must [sign up for a Geniuslink account](http://social.geni.us/iLESignup) and add your affiliate token to the dashboard.  Once you have done this, and connected your account using the API keys, each of your links will be automatically affiliated.

= How do I change the default group? =
In order to change the group that the plugin syncs with, you must first connect your Geniuslink account using your API keys. Once you have done this, you can simply select the group you would like to use from the drop down menu under “Using Link Group” in the iTunes Link Engine Settings. If you leave this blank, the “Default” group in your Geniuslink Account will be used.

= Is the iTunes Link Engine compatible with other affiliate tools? =
* **Amazon Link Engine:**
The iTunes Link Engine is fully compatible with the Amazon Link Engine plugin. 

* **Skimlinks:**
The iTunes Link Engine plugin works perfectly with Skimlinks.

* **VigLink:**
The VigLink plugin, however, will overwrite the iLE and not allow your links to be globalized if it has already been installed. If you are currently using this plugin, you simply need to deactivate it from your Wordpress site, download and activate the iTunes Link Engine plugin, and then reactivate the Viglink plugin.  Once this is done, the plugins will work seamlessly together.

* **iTunes Widgets:**
The iTunes Widgets are unfortunately not compatible with this version of the iLE plugin.


== Screenshots ==

1. **iTunes Link Engine Interface.**
1. **Before:** You have links to an item within a single iTunes Storefront
1. **After:** When you install the iTunes Link Engine, we automatically globalize and affiliate all iTunes links on your WordPress site.
1. **The Workflow:** Nothing changes for you once the plugin is installed. You can still add iTunes links for every page, just as you’ve done before. 
1. **The Results:** Each user gets sent to the correct item in their local store. This is an example of a user from Germany clicking your link. They’re sent to [iTunes Germany](https://itunes.apple.com/de/album/id14920526?i=14920531) with your affiliate token attached.
1. **The Results:** Each user gets sent to the correct item in their local store. This is an example of a user from the United States clicking your link. They’re sent to [iTunes US](https://itunes.apple.com/us/album/id46846?i=46803) with your affiliate token attached.

== Changelog ==
= 1.4.1 =
* Update tested value 

= 1.4.0 =
* Removed prompt for user satisfaction rating

= 1.3.9 =
* Updated snippet domain

= 1.3.8 =
* Tested up to WordPress 5.4

= 1.3.7 =
* Link conversion script will not attempt to run if JS snippet is not available/allowed by browser
* Tested to Wordpress 5.2

= 1.3.6 =
* Plugin defaults to "on click" method for easy Associates compliance
* Tested up to WordPress 5.1
* Help content updates
* Enforces jquery dependency for WP installs that don't otherwise have jquery activated

= 1.3.4 =
* Update readme tested up field

= 1.3.3 =
* Update snippet cdn and API instructions

= 1.3.2 =
* Fixed wordpress debug mode issue.

= 1.3.1 =
* Updated FAQ

= 1.3.0 =
* Updated FAQ

= 1.2.9 =
* Added optional feature to convert links only at click-time.

= 1.2.8 =
* Use new, compressed js snippet to make speed tests happier

= 1.2.7 =
* New links to geni.us pricing and join  pages

= 1.2.5 =
* Change priority of plugin so it is included lower in HEAD


= 1.2.4 =
* Update top notice to be clearer about the need for API keys for commissions

= 1.2.3 =
* Defer loading of snippet to improve page speed
* Tested up to 4.7

= 1.2.2 =
* Support custom domains
* Allow this plugin to have separate settings form iTunes Link Engine if it is also installed.
* Other minor improvements to UI.
* Tested up to 4.6

= 1.1.0 =
* Tested up to 4.5.  Updated unclear descriptions.

= 1.0.9 =
* Updated JS comments so they don't break things on hosts that remove line breaks in the HTML.

= 1.0.8 =
* Added error check to test if group ID's are successfully being saved to Wordpress DB after submitting settings.

= 1.0.7 =
* Fixed "No programs connected" showing after PHG was connected.
* Fixed issue where the group ID would persist after switching to a different Genius Link account
* Switched to api.geni.us api URL

= 1.0.6 =
* Fix contributors in Readme

= 1.0.5 =
* Added ability to choose a group

= 1.0.4 =
* Added: “To connect your Geniuslink account” instructions. Tested to 4.3

= 1.0.3 =
* Geniuslink pricing changes and screenshots included

= 1.0.2 =
* Switch to "//" to allow non-https delivery of JS

= 1.0.1 =
* Updated Readme

= 1.0 =
* Initial release
