Salesforce

How to Install the Page View Script for BigCommerce

« Go Back
Information
pixel-bigcommerce
How to Install the Page View Script for BigCommerce
Article Details

This guide will assist you with implementing the Snap Pixel on BigCommerce. 

Important: Replace xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx with your Pixel ID. Your Pixel ID can be found in the snaptr('init','xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx') portion of your script.

How to Install the Page View Script

  1. Log in to your BigCommerce account at https://login.bigcommerce.com/login.

  2. In the navigation bar on the left-hand sign, select Storefront.

  3. Choose Script Manager.

  4. Click Create a Script.

  5. Configure your script as the following:

    • Name of Script (Required): Enter a name for your script (e.g. Snap Page View Pixel).

    • Description (Optional): A description of your script (e.g. Page View).

    • Location on page: Select Head.

    • Select pages where script will be added: Select All Pages.

    • Script type: Script.

  6. Copy and paste the pixel script example from below into the Scripts Contents box.

    • Remember to Replace xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx with your Pixel ID. Your Pixel ID can be found in the snaptr('init','xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx') portion of your script.

  7. Click Save

Page View Scripts

This script will report a page view event for each page of your store. 
<!-- Snap Pixel Code -->
<script type='text/javascript'>
  (function(e,t,n){if(e.snaptr)return;var a=e.snaptr=function()
  {a.handleRequest?a.handleRequest.apply(a,arguments):a.queue.push(arguments)};
  a.queue=[];var s='script';r=t.createElement(s);r.async=!0;
  r.src=n;var u=t.getElementsByTagName(s)[0];
  u.parentNode.insertBefore(r,u);})(window,document,
  'https://sc-static.net/scevent.min.js');

  snaptr('init','xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
  snaptr('track','PAGE_VIEW');
</script>
<!-- End Snap Pixel Code -->


Powered by