ClassesBigCommerceContainerAnalytics

Analytics

Handles the registration and configuration of analytics services and events for BigCommerce.

This class provides integration for popular analytics platforms like Facebook Pixel, Google Analytics, and Segment. It also manages the registration of event tracking for actions such as adding to cart and viewing products.

  • Full name: \BigCommerce\Container\Analytics
  • Parent class: Provider

Constants

ConstantVisibilityTypeValue
FACEBOOK_PIXELpublicstring’analytics.facebook’
GOOGLE_ANALYTICSpublicstring’analytics.google’
SEGMENTpublicstring’analytics.segment’
ADD_TO_CARTpublicstring’analytics.events.add_to_cart’
VIEW_PRODUCTpublicstring’analytics.events.view_product’

Methods

register

Registers analytics services and events into the container

public register(\Pimple\Container $container): void

This function registers all necessary analytics providers (Facebook Pixel, Google Analytics, Segment) and event listeners for tracking various interactions such as add-to-cart and product views.

Parameters:

ParameterTypeDescription
$container\Pimple\ContainerThe dependency injection container.


Automatically generated on 2025-01-21