Setup Socialscale Sales Pixel
What is the Pixel and how does it work?
The Pixel helps you track orders on your website and attribute sales to creators who promote your products.Once installed, the Pixel records visits coming from creator storefronts and tracks customer actions across your site. When a purchase happens, it connects the order back to the original creator referral within your attribution window, so commissions can be calculated accurately.
How to set up the Pixel on your e-commerce Store?
Follow these steps to get started:
- Install the Pixel code Copy the Pixel code and paste it into the
<head>section of your website. This ensures the Pixel loads on every page and can track all visitor activity. - Track creator-driven traffic The Pixel automatically detects visitors coming from creator storefronts or shared links and starts tracking their journey on your site.
- Set up a conversion event Add the conversion event to your order confirmation (thank-you) page. This allows the Pixel to track completed purchases.
```javascript socialscalePixel('track', "Purchase", { id: "ORDER_ID", total_in_cents: "TOTAL_AMOUNT_IN_CENTS", currency: "USD", }) ```
4. Enable attribution and commission tracking Once a purchase is completed, the system attributes the order to the relevant creator (within your attribution window) and applies the corresponding commission.
Tips for accurate tracking
- Make sure the Pixel is installed on all pages of your website
- Ensure the conversion event only fires on the order confirmation page
- Avoid duplicate installations to prevent double tracking
What happens after setup?
After setup, all eligible orders will be automatically:
- Attributed to the correct creator
- Included in commission calculations
- Visible in your order page on Socialscale
How to set up the Pixel on Shopify?
1. Navigate to the `Settings -> Custom events`
2. Click `Add custom pixel`
3. Input Socialscale as a name
4. Configure the customer privacy
5. Copy and paste your custom code snippet from Socialscale backend
6. Copy the script below and pasted under the first code snippet
```javascript
analytics.subscribe("checkout_completed", (event) => {
const checkout = event.data?.checkout
if (!checkout) return
socialscalePixel('track', "Purchase", {
id: checkout.order?.id,
total_in_cents: parseFloat(checkout.totalPrice?.amount) * 100,
currency: checkout.currencyCode,
})
});
```