algolia_client_insights 0.2.2 copy "algolia_client_insights: ^0.2.2" to clipboard
algolia_client_insights: ^0.2.2 copied to clipboard

A sub-package of the AlgoliaSearch library, offering insights-specific functionalities for enhanced search and discovery in Dart/Flutter apps.

example/example.dart

import 'package:algolia_client_insights/algolia_client_insights.dart';

void main() async {
  // Creating an instance of the Insights client with the provided App ID and API key.
  final insights = InsightsClient(
    appId: 'latency',
    apiKey: '6be0576ff61c053d5f9a3225e2a90f76',
  );

  // Creating an InsightsEvents object with a list of EventsItems objects.
  // Each EventsItems represents an event such as a user viewing a specific item.
  final events = InsightsEvents(
    events: [
      ViewedObjectIDs(
        eventType: ViewEvent.view,
        eventName: 'View event',
        index: 'instant_search',
        userToken: 'anonymous',
        objectIDs: ['5477500'],
      )
    ],
  );
  await insights.pushEvents(insightsEvents: events);

  // Close the client and dispose of all underlying resources.
  insights.dispose();
}
1
likes
0
pub points
69%
popularity

Publisher

verified publisheralgolia.com

A sub-package of the AlgoliaSearch library, offering insights-specific functionalities for enhanced search and discovery in Dart/Flutter apps.

Homepage
Repository (GitHub)
View/report issues

Topics

#search #discovery

License

unknown (license)

Dependencies

algolia_client_core, collection, json_annotation

More

Packages that depend on algolia_client_insights