# Wicket Labs on iOS

[Wicket Labs](https://www.wicketlabs.com/) is an audience insights platform for video, and offers products like the "[Wicket Scoreboard](https://www.wicketlabs.com/wicket-scorecard/)".

To generate these insights, a video player emits playback events to a third-party database service (e.g. Firebase). Wicket Labs provides [guidelines](https://www.wicketlabs.com/resources/knowledge-base/how-to-setup-firebase-for-ott-video-services/) on how to format these playback events. Wicket Labs then pulls the data from the selected third-party database service, and integrates it into their platform.

## Connecting Wicket Labs with THEOplayer

An integration with Wicket Labs can be integrated on top of THEOplayer.

1. As a customer of Wicket Labs, you need to verify that Wicket Labs can ingest data from your selected database solution (e.g. Firebase). *(It should be noted that Wicket Labs does not provide its own database service to store playback events. Instead, Wicket Labs plugs into your database service.)*
2. As a customer of Wicket Labs and THEOplayer, you need to emit the playback events ([as defined per Wicket Labs](https://www.wicketlabs.com/resources/knowledge-base/how-to-setup-firebase-for-ott-video-services/)) to your database service. In other words, you need to hook into certain events emitted by THEOplayer, reformat them, and re-emit them to your database service.

* To facilitate the implementation of Wicket Labs \[related to THEOplayer], Wicket Labs and THEOplayer collaborate on publicly available code samples. These code samples are published as Git repositories on <https://github.com/THEOplayer>.
* Developers are free to do their custom integration of Wicket Labs and THEOplayer, or may modify the publicly available code samples.
  * Wicket Labs' article on [How to Setup Firebase for OTT Video Services](https://www.wicketlabs.com/resources/knowledge-base/how-to-setup-firebase-for-ott-video-services/) is a great starting point if you're interested in customizing.

- Our article on [Custom Analytics Integration](https://docs-preview.optiview.dolby.com/pr-860/theoplayer/how-to-guides/ios/analytics/custom-analytics-integration.md) may help developers out.

THEOplayer and Wicket Labs currently do not host a sample implementation for iOS or tvOS on GitHub.

Developers are encouraged to use our [sample implementation for the Web SDK](https://github.com/THEOplayer/samples-wicket-labs-html5-sdk) as a reference for the order and format of the playback events, together with Wicket Labs' [guidelines on setting up Firebase](https://www.wicketlabs.com/resources/knowledge-base/how-to-setup-firebase-for-ott-video-services/), as a starting point. Additionally, developers are encouraged to reach out to their contacts at THEOplayer and/or Wicket Labs if they need assistance, which could prompt THEOplayer and Wicket Labs into publishing a sample implementation on GitHub.

## Related links

* wicketlabs.com: [How to Setup Firebase for OTT Video Services](https://www.wicketlabs.com/resources/knowledge-base/how-to-setup-firebase-for-ott-video-services/)
