createConvivaTracker static method
Future<ConvivaTracker>
createConvivaTracker({
- required String appName,
- required String customerKey,
- NetworkConfiguration? networkConfig,
- TrackerConfiguration? trackerConfig,
- SubjectConfiguration? subjectConfig,
- GdprConfiguration? gdprConfig,
- EmitterConfiguration? emitterConfig,
Creates a new tracker instance with the given unique namespace
.
endpoint
refers to the Conviva collector endpoint.
method
is the HTTP method used to send events to collector and it defaults to POST.
customPostPath
is an optional string for custom POST collector paths.
Implementation
/*static Future<ConvivaTracker> createTracker(
{required String namespace,
required String endpoint,
Method? method,
String? customPostPath,
TrackerConfiguration? trackerConfig,
SubjectConfiguration? subjectConfig,
GdprConfiguration? gdprConfig,
EmitterConfiguration? emitterConfig}) async {
final configuration = Configuration(
namespace: namespace,
networkConfig: NetworkConfiguration(
endpoint: endpoint, method: method, customPostPath: customPostPath),
trackerConfig: trackerConfig,
subjectConfig: subjectConfig,
gdprConfig: gdprConfig,
emitterConfig: emitterConfig);
await _channel.invokeMethod('createTracker', configuration.toMap());
return ConvivaTracker(oldConfiguration: configuration);
}*/
/*static Future<ConvivaTracker> createConvivaTracker(
{required String appName,
required String customerKey}) async {
final convivaConfiguration = ConvivaConfiguration(
appName: appName,
customerKey: customerKey);
await _channel.invokeMethod('createConvivaTracker', convivaConfiguration.toMap());
return ConvivaTracker(configuration: convivaConfiguration);
}*/
static Future<ConvivaTracker> createConvivaTracker(
{required String appName,
required String customerKey,
NetworkConfiguration? networkConfig,
TrackerConfiguration? trackerConfig,
SubjectConfiguration? subjectConfig,
GdprConfiguration? gdprConfig,
EmitterConfiguration? emitterConfig}) async {
final configuration = Configuration(
appName: appName,
customerKey: customerKey,
networkConfig: networkConfig,
trackerConfig: trackerConfig,
subjectConfig: subjectConfig,
gdprConfig: gdprConfig,
emitterConfig: emitterConfig);
await _channel.invokeMethod('createConvivaTracker', configuration.toMap());
return ConvivaTracker(configuration: configuration);
}