Installation Guide

Integrate Facebook Pixel in Bagisto e-commerce

Anis Ahmad

Last Update 2 个月前

This guide will help you install the Facebook Pixel tracking package in your existing Bagisto e-commerce application. Follow these steps carefully to ensure a successful installation.

Prerequisites

  1. A running Bagisto e-commerce application. (If you don't have it ready yet, we can help.)
  2. Composer installed on your system
  3. Access to your application's root directory
  4. The "Facebook Pixel for Bagisto" package zip file
  5. You have the Pixel ID to track with
Installation Steps

Step 1: Extract the Package

  1. Unzip the received Facebook Pixel package file
  2. Navigate to your Bagisto application's root directory
  3. Create a directory structure if it doesn't exist:
Copy all contents from the unzipped package into the newly created directory.

Now, the package code tree should be like this:

Step 2: Configure Composer Autoload
  1. Open your application's composer.json file
  2. Locate the autoload section
  3. Add the following entry to the psr-4 section:

Note: If there are existing entries in the psr-4 section, add this new line while preserving the others.

Step 3: Update Composer
  1. Open your terminal
  2. Navigate to your Bagisto application's root directory
  3. Run the following command to update the autoloader:
Step 4: Register the Service Provider
  1. Open the configuration file located at config/app.php
  2. Find the providers array
  3. Add the FacebookPixelServiceProvider in the Provider list:
Step 5: Verify Installation
  1. Log in to your Bagisto admin panel
  2. Navigate to the Configure section
  3. Look for "Pixel Integration Settings"
  4. If you can see this section, the installation was successful
Troubleshooting Tips
  • If you don't see the Pixel Integration Settings in the admin panel, try clearing your application cache
  • Ensure all file permissions are correctly set
  • Double-check that the namespace in composer.json exactly matches the provided code
  • Verify that the service provider is properly added to config/app.php
Next Steps
After successful installation:
  1. Configure your Facebook Pixel ID in the admin panel
  2. Enable the desired tracking events
  3. Test the integration using the debugging options provided in the package.


For detailed information about debugging options and available features, please refer to the package documentation.

Was this article helpful?

1 out of 1 liked this article