The plugin will automatically handle detecting the tncpw_session token that gets passed along when a visitor clicks on of our links. It will store it on the user's session, and if they place an order, that token can be used to trigger a conversion, which releases a payout to the promoter who sent them your way.
It also allows for easy integration of TonicPow display widgets from the WordPress widgets dashboard.
It is open source, and the code is available here:
Before you begin, you need to create a campaign, and configure at least one conversion goal you would like to automatically trigger when an action is completed. In this example, we will be auto-converting whenever a visitor places an order. Of course the conversion will only fire when that visitor was referred by a TonicPow promoter.
You can download the plugin via the button above. To trigger events from wooCommerce, you must have it installed and configured to place orders. You can then trigger conversions on woocommerce order complete. For compiling from source, visit the Github repo.
Log into your wordpress dashboard. Navigate to "Plugins > Add New".
Click "Upload plugin" and provide the tonicpow.zip file you downloaded in the previous step.
Click "Install", and then "Activate Plugin" once installation is complete.
If you run into any trouble with this step,
this guide from WordPress might be helpful.
From the wordpress menu, choose "Settings > TonicPow"
Lets go through each field one at a time.
First, enter an API key. You can get this by creating an "app" from your tonicpow dashboard. You can follow the API Getting Started guide for more information on how to do this.
The API URL field should be set to:https://api.tonicpow.com/v1/ Make sure to include the trailing "/". Once that's done, click "Save Changes"
Once saved, the page reloads. You should now see any campaigns and conversion goals that are accessible with your API key listed at the top of the page. If not, make sure you have completed the pre-requisites above.
Choose the goal name that should be fired when a purchase is complete.
Choose a callback action that will auto-trigger conversions. On our case, we are triggering a payout when an order is completed, so we choose the "woocommerce_payment_complete" hook to trigger conversions.
You can choose to enter a delay (in minutes) to wait before the conversion is executed. You can also choose to include some additional data along with the conversion. In this case, we keep both of these fields ate the defaults, 0 and empty.
Click save again to set the goal name you want to automatically trigger conversions for. Even if it was already selected when the page reloaded, you must save it once for it to take effect.
That's it! Now whenever a promoter shares your campaign, and a visitor makes a purchase, the promoter will receive a payout as determined by your conversion goal configuration.
Access to $_SESSION is a requirement. Make sure your hosting provider has enabled sessions.
This plugin is still early in the development process. It is possible to explore any hook created by another plugin or wordpress itself. If there is a particular hook you're looking for, please contact usand we would love to find and accommodate new use cases.