Skip to content

Migration guides

Pierre-Yves edited this page Jan 31, 2024 · 16 revisions

This page provides instructions for migration between major versions of SRG Analytics.

Migration to version 9

Version 9 of the SDK, required to support the modern Commanders Act platform, requires some migration work detailed below. We recommend to only use version 9.1.0 and more.

⚠️ Please contact the GD ADI team to validate implementation for your application before submission to the App Store.

History

The SRG SSR uses the tagging tool from Commanders Act:

Migration instructions

SDK update

  • Update the SRG Analytics SDK to version 9.1.0 or above.
  • If you are using SRG Letterbox update the library to version 9.3.0 or above.

Breaking changes

  • SRGAnalyticsConfiguration: The container (integer) and environmentMode (Boolean) parameters have been replaced with a single sourceKey (string):
    • Call initWithBusinessUnitIdentifier:sourceKey:siteName: instead of initWithBusinessUnitIdentifier:container:siteName:.
    • As a good practice you should use two sourceKey values:
      • One for debug, nighty and beta builds.
      • One for production builds.
    • You can request custom sourceKeys from the GD ADI team if needed, otherwise you should use the following standard keys (identical for iOS and tvOS):
      • Debug: 39ae8f94-595c-4ca4-81f7-fb7748bd3f04.
      • Production: 1b30366c-9e8d-4720-8b12-4165f468f9ae.
  • A mandatory type must be provided for page views:
    • Call trackPageViewWithTitle:type:levels: instead of trackPageViewWithTitle:levels:.
    • Call trackPageViewWithTitle:type:levels:labels:fromPushNotification: instead of trackPageViewWithTitle:levels:labels:fromPushNotification:.
    • Call uncheckedTrackPageViewWithTitle:type:levels: instead of uncheckedTrackPageViewWithTitle:levels:.
    • Call uncheckedTrackPageViewWithTitle:type:levels:labels:fromPushNotification: instead of uncheckedTrackPageViewWithTitle:levels:labels:fromPushNotification:.
    • A corresponding mandatory srg_pageViewType property has been added to the SRGAnalyticsViewTracking protocol.
  • SRGAnalyticsTracker: Hidden events are now simply called Events, thus:
    • Call trackEventWithName: instead of trackHiddenEventWithName:.
    • Call trackEventWithName:labels: instead of trackHiddenEventWithName:labels:.
    • Use SRGAnalyticsEventLabels instead of SRGAnalyticsHiddenEventLabels.
Clone this wiki locally