Would you like to add affiliate id to payments so that you can track referrals?
Let’s say you’re working with affiliates to send prospects to your payment page.
Affiliates send you traffic which includes an affiliate ID in a URL parameter, like this:
You’d need to save the affiliate id as metadata of the payment, so that you can identify payments for which you have to pay an affiliate fee.
If you’d like to add metadata via URL parameters, then you have to do the following:
The following subsections explain these steps in detail.
Add the metadata as URL parameters. In the example below, the affiliate id is passed in the affid URL parameter to demo payment page:
https://demo.paymentsplugin.com/sell-recurring-services-inline/?affid=wds5412
For the sake of security, the plugin doesn’t let anyone set metadata directly without your consent.
You can give consent by implementing a short piece of code in the form of a Wordpress filter, whick picks URL parameters and adds them as metadata. The code needs to be added to the functions.php file of your active Wordpress theme.
Here is an example implementation, see description below:
In the example above, the code checks whether the $pageParams array contains the affid parameter, and if it does then adds it to the $result_meta array which contains the metadata to be added to the transaction.
Depending on your form type, metadata is saved into different Stripe items.
Please refer to our knowledge base article on where are custom fields on the Stripe dashboard, which explains it in detail (custom fields are also saved as metadata).
Our support team is happy to help you.
Contact support
Feature requests are always welcome!
We consider each feature request carefully, and examine how it fits the roadmap for the plugin.