Skip to content

Migration guides

Pierre-Yves B edited this page Sep 6, 2023 · 16 revisions

This page provides instructions for migration between major versions of SRGAnalytics.

Migration to version 9

Commander Acts V5 context

SRGSSR's data analysts use a tagging tool, named Tag Commander, from the Commander Acts company.

SRGAnalytics migration

Update to new major version (WIP)

  • Update the library to branch feature/62-update-to-tag-commander-v5.
  • If using SRGLetterbox, update the player library to feature/283-update-to-commanders-act-version-5.

Breaking changes (WIP)

  • SRGAnalyticsConfiguration:
    • No more container (integer) and environmentMode (boolean), just sourceKey (string).
      • call initWithBusinessUnitIdentifier:sourceKey:siteName: instead of initWithBusinessUnitIdentifier:container:siteName:.
    • Good practice: use two sourceKey values:
      • one for debug (and nighty and beta) builds.
      • one for production builds.
    • Ask sourceKeys to ADI team if you would like custom source keys. Otherwise, use default ones (same for iOS and tvOS):
      • iOS SDK - Debug: 39ae8f94-595c-4ca4-81f7-fb7748bd3f04.
      • iOS SDK - Production: 1b30366c-9e8d-4720-8b12-4165f468f9ae.
  • SRGAnalyticsTracker:
    • Page view type added and mandatory:
      • 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:.
    • No more "hidden event", just "event":
      • call trackEventWithName: instead of trackHiddenEventWithName:.
      • call trackEventWithName:labels: instead of trackHiddenEventWithName:labels:.
  • SRGAnalyticsHiddenEventLabels:
    • Use SRGAnalyticsEventLabels class 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