Skip to content

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.

Migration to version 9

Version 9 of the SDK, required to support the modern Commanders Act platform, requires some migration work detailed below.

History

The SRG SSR uses the tagging tool from Commanders Act:

Migration instructions

SDK update

  • 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.

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.

Server side migration to V2

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.

What change for mapping server side (WIP)

  • 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.
  • No more navigation_environment and media_embedding_environment properties (prod and preprod). Check the sourceKey environment.
  • In page view events (also named screenview in MAPP):
    • use page_name property instead of content_title property.
    • use page_type property instead of content_page_type property.
  • Custom SRGSSR property names transferred throw the SDK don't change.
  • TC properties have new names and they are in the context object:

Other creations and transformations server side from V1 (internal variables or PHP transformations) are now in Data Cleansing V2 feature. Names don't change.

Proposed filters (WIP)

  • 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.
  • 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".
  • events: event_name !IN ("page_view", "play", "pause", "seek", "eof", "stop", "pos", "uptime", "segment") ("isn't" UI comparaison).
Clone this wiki locally