The integration of Fanplayr into your SparkPay store is straightforward. It involves inserting JavaScript code similar to many other services such as Google Analytics. The scripts are used to track, capture and analyze user behavior, as well as monitor and analyze conversions.
Note: All information is sent over SSL (secure HTTPS connection) to the Fanplayr servers.
To add these scripts you will need access to your SparkPay administration console, including access to your conversion scripts and template files.
Also note that your template needs to include jQuery (it should already do this).

Track Users

User tracking code needs both an external script to be inserted in the head, as well as multiple template additions. They are as follows:
Click on Themes on the left bar.
Now click Edit below your current theme.
You should now have a menu to the left of your screen where you can edit your theme.
Click Theme / Header, then on HTML Editor.
Enter the below script just below the first line which should read <ac:pagelayout id="HeaderPage">.
<script type="text/javascript"> = '##SESSIONCUSTOMERTYPE##'; = '##SESSIONCUSTOMERTYPEID##';
Click save.
Now click on Head Tags. Enter the following at the end of the input and click save.
<script src=""></script>
Note that the details between the braces must be replaced with your details. Fanplayr will help you with these as necessary.
  • ACCOUNT_KEY: replace this with the Account Key supplied by Fanplayr
  • CURRENCY: replace this with the three character ISO currency, i.e. USD or JPY
  • ADD_TO_CART_URL: replace with a URL encoded version of a link to your shopping cart, with the addition of #coupon=%c.
This last value is a little complicated. Here is an example:
  • URL to cart:
  • With suffix:
  • URL encoded:
An tool that can be used to easily URL Encode your string can be found here:
Click save.
Last modified 3yr ago