Skip to content

Configuration ​

Configuration template ​

The following customization JavaScript can be added to your store to dynamically configure the Fanplayr extension. This can be useful if you support multiple stores with a single Magento installation or have a non-default installation.

This script should be customized as needed and can be added to your store under System / Configuration / Design / HTML Head / Miscellaneous Scripts.

html
<script>
  (function (w) {
    var fanplayr = (w.fanplayr = w.fanplayr || { _i: [] });
    var config = (fanplayr.custom = fanplayr.custom || {});

    /**
     * Override the domain that Fanplayr associates with your
     * tracking calls. By default Fanplayr will use the domain that is
     * accessed in the browser url.
     */
    // config.storeDomain = 'mystore.com';

    /**
     * Override the account key used for tracking calls.
     * This can be used to dynamically change account keys if you manage
     * multiple stores with a single Magento installation.
     */
    // config.accountKey = 'xxx';

    /**
     * Overrides the url which Fanplayr uses to apply an offer code to the cart.
     */
    // config.applyToCartUrl = '...';
  })(window);
</script>

Options ​

storeDomain ​

The domain that Fanplayr links to the campaign domain. An example of using this is to have different campaigns, on the same account, running on a single store for different languages.

embedUrl ​

The URL that is used to call the Fanplayr controller. For example, if you set it to //mystore.com/index.php/ the controller will be called as //mystore.com/index.php/fanplayr/;

accountKey ​

The Account Key that this store is linked to. Through store configuration you can only link to a single account. If you need to link to more, set this to the Account Key needed.

applyToCartUrl ​

Can be used to override the Apply To Cart URL. This may be needed when you use multiple store domains, especially to keep a user in the same language or region of your site.

deputizeUrl ​

Can be used to override the Deputize URL. This is generally not needed, except in circumstances where user sessions are stored on a Website, Store or Store View only basis.