2

Debugging Bagisto Pixel Tracking

Console logging for effortless verification

Anis Ahmad

Last Update 2 months ago

This Bagisto package has been developed with considering developers workflow in mind. As a result, it supports 3mode of debugging levels.

The debugging is implemented by logging tracking information in browser console. It will also log additional information of event when available. 

Debugging stages

Debugging stage is automatically selected based on 2 factors. 


  1. The value of `APP_DEBUG` environment variable
  2. The selection of "Debug Only" option in admin panel

Based on these 2 points, here is how the package which mode is active now:

`APP_DEBUG` value"Debug Only" optionActive mode
AnyONDebug Only
TRUEOFFTrack and Debug
FALSEOFFTrack Only (silent)

Logging behaviour of modes

Here is the impact of the current debug mode on logging tracking data. 


Debug Only Mode:


  • Perfect for development environments
  • Logs tracking data to browser console
  • No actual data sent to Facebook ⚠️ 
  • Ideal for testing and development environment

Track and Debug Mode:


  • Simultaneous tracking and debugging
  • Real data transmission to Facebook
  • Console logging for verification
  • Suitable for staging environments

Track Only / Silent Mode:


  • Clean, performance-optimized tracking
  • No debug information displayed
  • Ideal for live websites

Clue of current tracking pixel

Additionally, independent of debug mode (which is most common in production environments), the Pixel Tracking ID will be available in the HTML source of any shop page as a commented text. It'll help to verify if the package is enabled and the right pixel ID is in action.

It'll look something like this:

Was this article helpful?

0 out of 0 liked this article