public class LegacyAnalyticsProviderAdapter
- Object
- AbstractAnalyticsProvider
- LegacyAnalyticsProviderAdapter
ImplementsAnalyticsProvider
Bridges a legacy
AnalyticsService subclass into the new
AnalyticsProvider SPI so that custom analytics implementations
written against the deprecated API can participate in the
Analytics facade alongside modern providers. Screen views are routed
to the subclass’s visitPage hook.Constructors
public LegacyAnalyticsProviderAdapter(AnalyticsService delegate) | Wraps a legacy analytics service. |
Methods
public String getName() | A short, stable, human readable name for this provider (used in logs and diagnostics). |
public void trackScreen(String name, String referrer) | Records a screen / page view. |
public boolean supports(AnalyticsCapability capability) | Indicates whether the provider supports a given capability. |
Inherited methods
Constructor details
LegacyAnalyticsProviderAdapter
public LegacyAnalyticsProviderAdapter(AnalyticsService delegate)Wraps a legacy analytics service.
Parameters
delegateAnalyticsService- the legacy analytics service implementation
Method details
getName
public String getName()A short, stable, human readable name for this provider (used in logs and
diagnostics).
Returns
the provider name
trackScreen
public void trackScreen(String name, String referrer)Records a screen / page view.
Parameters
nameString- the screen name
referrerString- the previous screen name, may be null
supports
public boolean supports(AnalyticsCapability capability)Indicates whether the provider supports a given capability.
Parameters
capabilityAnalyticsCapability- the capability to query
Returns
true if supported