SparkPay
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).
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">
window.fanplayr.data.customerSegment = '##SESSIONCUSTOMERTYPE##';
window.fanplayr.data.customerGroup = '##SESSIONCUSTOMERTYPEID##';
</script>
Click save.
Now click on Head Tags. Enter the following at the end of the input and click save.
<script src="https://cdn.fanplayr.com/customers/americommerce/americommerce.min.js?ak=ACCOUNT_KEY&c=CURRENCY&atc=ADD_TO_CART_URL"></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 FanplayrCURRENCY
: replace this with the three character ISO currency, i.e.USD
orJPY
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:
https://store.mysite.com/store/shopcart.aspx
- With suffix:
https://store.mysite.com/store/shopcart.aspx#coupon=%c
- URL encoded:
https%3A%2F%2Fstore.mysite.com%2Fstore%2Fshopcart.aspx%23coupon%3D%25c
An tool that can be used to easily URL Encode your string can be found here: https://meyerweb.com/eric/tools/dencoder/
Click save.
Last modified 3yr ago