Affiliate Software Documentation
JavaScript API
The Javascript API allows you to show specific affiliate data on external pages using simple Javascript calls. For example:
<script src="http://www.yourdomain.com/affiliates/js/show/primary_email"></script>
Once a user has clicked on an affiliate link, adding that javascript above will show the referring affiilate's email address, like:
user@domain.com
You can show any of the following affiliate fields that you want via Javascript.
- fname - the afiliate's first name
- lname - the affiliate's last name
- primary_email - the affiliate's email address
- username - the affiliate's username
- company - the affiliate's company
- home_phone - affiliate home phone
- work_phone - affiliate work phone
- mobile_phone - affiliate mobile phone
- program_custom_field_1 - affiliate custom field 1
- program_custom_field_2 - affiliate custom field 2
- program_custom_field_3 - affiliate custom field 3
- program_custom_field_4 - affiliate custom field 4
- program_custom_field_5 - affiliate custom field 5
- program_custom_field_6 - affiliate custom field 6
- program_custom_field_7 - affiliate custom field 7
- program_custom_field_8 - affiliate custom field 8
- program_custom_field_9 - affiliate custom field 9
- program_custom_field_10 - affiliate custom field 10
You can also show affiliate data in a hidden field, so that you can add hidden form fields to any web form that you want. Just append the field value to each javascript call, and it will do a javascript: document.write('<input type="hidden" name="fname" value="joe">');
<script src="http://www.yourdomain.com/affiliates/js/show/primary_email/field"></script>
Enabling the Javascript API
To enable this option, you need to first enable it in the affiliate admin area.
- Click on Settings > Global Configuration on the top menu of your affiliate admin area.
- Click on Marketing > Marketing Tools tab and enable the Allow Javascript Info Display option.
- Click Save Changes.