Zum Inhalt

Parallel-Messung pseudonyme Messung und ÖWA

Die IOLib iOS unterstützt den parallelen Betrieb von Sessions unterschiedlicher Mess-Systeme. Im folgenden soll gezeigt werden, wie beide Messungen gleichzeitig betrieben werden können.

Voraussetzung ist eine Integration der IOLib iOS gemäß des Integration Guides.

1. In Xcode: Initialisierung und Start beider Sessions beim Application-Start:

Objective-C:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
@implementation AppDelegate

- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
    [self startSessions];
 // Other code
 return YES;
}

- (void)startSessions {
    // Initialisierung der IOLib; Session-Start
    // privacySetting LIN = Berechtigtes Interesse ist gegeben
    [[IOLSession defaultSessionFor:IOLSessionTypeSZM]    
      startSessionWithOfferIdentifier:@"<SZM-ANGEBOTSKENNUNG>" 
      privacyType:IOLPrivacyTypeLIN];


    [[IOLSession defaultSessionFor:IOLSessionTypeOEWA] 
      startSessionWithOfferIdentifier:@"<OEWA-ANGEBOTSKENNUNG>"  
      privacyType:IOLPrivacyTypeLIN];

Image

Swift:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
func application(_ application: UIApplication, didFinishLaunchingWithOptions
launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
  self.startSessions()
  // Other code
  return true
}
func startSessions() {
  // Initialisierung der IOLib; Session-Start
  // privacySetting LIN = Berechtigtes Interesse ist gegeben
  IOLSession.defaultSession(for: .SZM).start(withOfferIdentifier:„<SZM-
  ANGEBOTSKENNUNG>“, privacyType: .LIN)
  IOLSession.defaultSession(for: .OEWA).start(withOfferIdentifier:„<OEWA-
  ANGEBOTSKENNUNG>“, privacyType: .LIN)
}

Image

2. Messen eines Events

Events können in den View Controllern der App geloggt werden, z.B. der Aufruf eines Views:

Objective-C:

1
2
3
4
5
// Tracking View Appeared
   IOLViewEvent *event = [[IOLViewEvent alloc] initWithType:IOLViewEventTypeAppeared
   category:@"TestCategory" comment:nil];
   [[IOLSession defaultSessionFor:IOLSessionTypeSZM] logEvent:event];
   [[IOLSession defaultSessionFor:IOLSessionTypeOEWA] logEvent:event];

Image

Swift:

1
2
3
4
// Tracking View Appeared
   let event = IOLViewEvent(type: .appeared, category: "TestCategory", comment: nil)
   IOLSession.defaultSession(for: .SZM).logEvent(event) 
   IOLSession.defaultSession(for: .OEWA).logEvent(event) 

Image


Letztes Update: May 10, 2023