-
Notifications
You must be signed in to change notification settings - Fork 1
Migration guides
Samuel Défago edited this page Sep 12, 2023
·
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.
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.0.0 or above.
- If you are using SRG Letterbox update the library to version 9.2.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
Commander Acts V5 SDKs (Apple and Android) now send a JSON
payload to the new server V2, instead of multipart/form-data
to previous server V1. New defined objects and property names changed.
- New SDK properties can have type (like integer for timestamps).
-
event_id
is an internal variable for the product: a UUID set by the SDK. -
event_name
is used in every sent events from sources:- page view:
page_view
(defined by the V5 SDK) - media events:
play
,pause
,seek
,eof
,stop
,pos
,uptime
,segment
. - events: the name given my the product which sent.
- page view:
- No more
navigation_environment
andmedia_embedding_environment
properties (prod
andpreprod
). Check thesourceKey
environment. - In page view events (also named screenview in MAPP):
- use
page_name
property instead ofcontent_title
property. - use
page_type
property instead ofcontent_page_type
property.
- use
- Custom SRGSSR property names transferred throw the SDK don't change.
-
TC
properties have new names and they are in thecontext
object:- V1: Mobile Apps event specificity iOS (same for Android).
- V2: Mobile App event specificity.
Other creations and transformations server side from V1 (internal variables or PHP transformations) are now in Data Cleansing V2 feature. Names don't change.
- page view:
event_name = "page_view"
("is" UI comparaison).- SRGSSR usually adds
AND EXISTS(page_unique_name)
("exists" UI comparaison) to have a unique page name to identify the page from all other SRGSSR applications.
- SRGSSR usually adds
- media events:
event_name IN ("play", "pause", "seek", "eof", "stop", "pos", "uptime", "segment")
("is" UI comparaison).- SRGSSR usually adds
AND EXISTS(media_urn)
("exists" UI comparaison) to have a unique id to group media events from the same "visit session" / "install id".
- SRGSSR usually adds
- events:
event_name !IN ("page_view", "play", "pause", "seek", "eof", "stop", "pos", "uptime", "segment")
("isn't" UI comparaison).