Documentation
Documentation (JA)
Documentation (JA)
  • Documentation
  • Products
    • Fanplayr Targeting Portal
    • Fanplayr 360
    • PrivacyID
    • SiteSpeed
  • Features
    • Merchandising
    • Security
    • SMS
    • Web Push Notifications
      • Direct Integration Guide
      • Popup Integration Guide
      • Imaging Sizing Guide
    • Data Residency
  • Fanplayr Targeting
    • E-Commerce Integrations
      • BigCommerce
      • CommerceV3
      • Magento 1
        • Getting Started
        • Configuration
      • Magento 2
      • Miva Merchant
      • PrestaShop
      • Salesforce Commerce Cloud
      • Shopify
      • Volusion
      • VTEX
      • VTEX IO
    • Custom Integration
      • Page tracking
        • Apply to cart
        • Session offers
      • Order tracking
      • Data types
        • CartAction
        • Product
      • Data Layer API
      • Enhanced user identification
        • Manual Integration
      • Segmentation as a service
      • Lazy loading
      • Page caching
      • Tag managers
      • Single page apps
      • Custom data for verticals
        • Travel
    • Pixel Integration
    • ESP Integrations
    • Link Decoration
    • User Management
      • User Identity
      • User Properties
  • Other
    • CSP & Domains
Powered by GitBook
On this page

Was this helpful?

  1. Fanplayr Targeting
  2. E-Commerce Integrations

BigCommerce

PreviousE-Commerce IntegrationsNextCommerceV3

Was this helpful?

The integration of Fanplayr into your BigCommerce 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.

All information is sent over SSL (secure HTTPS connection) to the Fanplayr servers.

To add these scripts you will need access to your BigCommerce administration console, including access to your conversion scripts and template files.

Note: In some scripts you will need to replace text that is highlighted.

You may also have to change the currency from “USD” to the currency your store uses if not “USD”. The three character ISO currency code () for your chosen currency should be used.

Also note that your template needs to include jQuery (many already do) for the best tracking.

Track Conversions

The following script should be inserted into your conversion tracking code box. This can be found by going to Settings -> Conversions (top right).

Settings -> Conversions in your administration console

Now simply paste the following code into the box, change ACCOUNT_KEY in the highlighted line and click Save.

<!--FANPLAYR-->
<script>
var fanplayrAccountKey = 'ACCOUNT_KEY';
window.fanplayrGetCookie=function(a){var b=document.cookie,c=b.indexOf(" fanplayr_"+a+"=");if(-1==c&&(c=b.indexOf("fanplayr_"+a+"=")),-1==c)b=null;else{c=b.indexOf("=",c)+1;var d=b.indexOf(";",c);-1==d&&(d=b.length),b=unescape(b.substring(c,d))}return b};
// order total: %%ORDER_AMOUNT%%
(function(d, w, s) {
  if ( !w.fp_sales_orders ) {
    w.fp_sales_orders = {
      accountKey: fanplayrAccountKey ,
      data: {
        orderId: '%%ORDER_ID%%',
        orderNumber: '%%ORDER_ID%%',
        subTotal: %%ORDER_SUBTOTAL%%,
        total: %%ORDER_SUBTOTAL_DISCOUNTED%%,
        discount: %%ORDER_SUBTOTAL%% - %%ORDER_SUBTOTAL_DISCOUNTED%%,
        discountCode: fanplayrGetCookie('couponCode') || '',
        currency: 'USD',
        orderEmail: '%%ORDER_EMAIL%%',
        firstName: fanplayrGetCookie('firstName') || '',
        lastName: fanplayrGetCookie('lastName') || '',
        customerEmail: fanplayrGetCookie('customerEmail') || '',
        customerId: '',
        shipping: 0,
        tax: 0,
        shopType: 'custom',
        version: 3
      }
    };
    var js = d.createElement(s);
    var fjs = d.getElementsByTagName(s)[0];
    js.async = true;
    js.src = 'https://cdn.fanplayr.com/client/production/fp_custom_orders.js';
    fjs.parentNode.insertBefore(js, fjs);
  }
})(document, window, 'script');
</script>
<!--/FANPLAYR-->

https://en.wikipedia.org/wiki/ISO_4217