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
- A running Bagisto e-commerce application. (If you don't have it ready yet, we can help.)
- Composer installed on your system
- Access to your application's root directory
- The "Facebook Pixel for Bagisto" package zip file
- You have the Pixel ID to track with
Installation Steps
Step 1: Extract the Package
- Unzip the received Facebook Pixel package file
- Navigate to your Bagisto application's root directory
- 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
- Open your application's composer.json file
- Locate the autoload section
- 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
- Open your terminal
- Navigate to your Bagisto application's root directory
- Run the following command to update the autoloader:
Step 4: Register the Service Provider
- Open the configuration file located at config/app.php
- Find the providers array
- Add the FacebookPixelServiceProvider in the Provider list:
Step 5: Verify Installation
- Log in to your Bagisto admin panel
- Navigate to the Configure section
- Look for "Pixel Integration Settings"
- 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:
- Configure your Facebook Pixel ID in the admin panel
- Enable the desired tracking events
- Test the integration using the debugging options provided in the package.