-
Notifications
You must be signed in to change notification settings - Fork 1
Migration guides
Pierre-Yves edited this page Jan 31, 2024
·
16 revisions
This page provides instructions for migration between major versions of SRG Analytics.
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.
The SRG SSR uses the tagging tool from Commanders Act:
- Since 2016 the iOS V4 SDK was used client side. Commander Acts server V1 was used server side.
- Since November 2019 a fork of SDK V4 was created at SRG SSR to support tvOS and corresponding binaries were hosted on the SRG SSR GitHub (TCCore and TCSDK).
- In 2023 SRG SSR had to move to a new major version 5 of the iOS SDK. The corresponding Commander Acts server V2 is now used.
- 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.
-
SRGAnalyticsConfiguration
: Thecontainer
(integer) andenvironmentMode
(Boolean) parameters have been replaced with a singlesourceKey
(string):- Call
initWithBusinessUnitIdentifier:sourceKey:siteName:
instead ofinitWithBusinessUnitIdentifier: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
sourceKey
s from the GD ADI team if needed, otherwise you should use the following standard keys (identical foriOS
andtvOS
):- Debug:
39ae8f94-595c-4ca4-81f7-fb7748bd3f04
. - Production:
1b30366c-9e8d-4720-8b12-4165f468f9ae
.
- Debug:
- Call
- A mandatory type must be provided for page views:
- Call
trackPageViewWithTitle:type:levels:
instead oftrackPageViewWithTitle:levels:
. - Call
trackPageViewWithTitle:type:levels:labels:fromPushNotification:
instead oftrackPageViewWithTitle:levels:labels:fromPushNotification:
. - Call
uncheckedTrackPageViewWithTitle:type:levels:
instead ofuncheckedTrackPageViewWithTitle:levels:
. - Call
uncheckedTrackPageViewWithTitle:type:levels:labels:fromPushNotification:
instead ofuncheckedTrackPageViewWithTitle:levels:labels:fromPushNotification:
. - A corresponding mandatory
srg_pageViewType
property has been added to theSRGAnalyticsViewTracking
protocol.
- Call
-
SRGAnalyticsTracker
: Hidden events are now simply called Events, thus:- Call
trackEventWithName:
instead oftrackHiddenEventWithName:
. - Call
trackEventWithName:labels:
instead oftrackHiddenEventWithName:labels:
. - Use
SRGAnalyticsEventLabels
instead ofSRGAnalyticsHiddenEventLabels
.
- Call