Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Example/Pods

## SPM
.swiftpm
.build

fastlane/*
!fastlane/.env
Expand Down
8 changes: 8 additions & 0 deletions Changelogs/1.12.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
1.12.0 Release notes (2026-03-09)
================================

Improvements to the 'RingPublishingTracking' module.

### Changes

* Added new public method to report Aureus deboosting event
8 changes: 6 additions & 2 deletions Example/RingPublishingTracking.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
7D7D5B9426FCA3DF00B79FDD /* ActionsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D7D5B8726FCA3DF00B79FDD /* ActionsViewController.swift */; };
7D7D5B9526FCA3DF00B79FDD /* PagerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D7D5B8926FCA3DF00B79FDD /* PagerViewController.swift */; };
7D7D5B9626FCA3DF00B79FDD /* TraceableScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D7D5B8A26FCA3DF00B79FDD /* TraceableScreen.swift */; };
7DDC7E362F5AB4D6000F254C /* AureusDeboostingStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DDC7E352F5AB4D6000F254C /* AureusDeboostingStrategy.swift */; };
7DE4453B26E8913900A93431 /* LoggerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DE4453A26E8913900A93431 /* LoggerTests.swift */; };
854F1289D6E3FA4BC790018B /* Pods_RingPublishingTracking_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF2945259492AA544792B04F /* Pods_RingPublishingTracking_Example.framework */; };
A039F65F2DF2D84400B9BD67 /* EffectivePageViewMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = A039F65E2DF2D84400B9BD67 /* EffectivePageViewMetadata.swift */; };
Expand Down Expand Up @@ -361,6 +362,7 @@
7D9F12B82791A15D00F3635A /* RingPublishingTracking.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; name = RingPublishingTracking.podspec; path = ../RingPublishingTracking.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
7D9F12B92791A15D00F3635A /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
7D9F12BA2791A15D00F3635A /* Changelogs */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Changelogs; path = ../Changelogs; sourceTree = "<group>"; };
7DDC7E352F5AB4D6000F254C /* AureusDeboostingStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AureusDeboostingStrategy.swift; sourceTree = "<group>"; };
7DE4453A26E8913900A93431 /* LoggerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggerTests.swift; sourceTree = "<group>"; };
8E2A37C5A1593C87B0EB5A44 /* Pods-RingPublishingTrackingTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RingPublishingTrackingTests.release.xcconfig"; path = "Target Support Files/Pods-RingPublishingTrackingTests/Pods-RingPublishingTrackingTests.release.xcconfig"; sourceTree = "<group>"; };
A039F65E2DF2D84400B9BD67 /* EffectivePageViewMetadata.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EffectivePageViewMetadata.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -845,6 +847,7 @@
7D54DA972E460B99009DA251 /* Aureus */ = {
isa = PBXGroup;
children = (
7DDC7E352F5AB4D6000F254C /* AureusDeboostingStrategy.swift */,
7D54DA982E460BF8009DA251 /* AureusTeaser.swift */,
7D54DA9A2E460C55009DA251 /* AureusEventContext.swift */,
);
Expand Down Expand Up @@ -1299,6 +1302,7 @@
A04E94DD2CB7E6E10048B4AF /* AudioEventsTests.swift in Sources */,
60108E8D2B0515C6005656C1 /* ConsentProvider.swift in Sources */,
60108E702B0515C6005656C1 /* VideoStartMode.swift in Sources */,
7DDC7E362F5AB4D6000F254C /* AureusDeboostingStrategy.swift in Sources */,
60108EBF2B0515C6005656C1 /* VideoAdsConfiguration+ParameterName.swift in Sources */,
204EAF3627294BF7009E2F0D /* EventTests.swift in Sources */,
60108ECA2B0515C6005656C1 /* KeepAliveIntervalsProvider.swift in Sources */,
Expand Down Expand Up @@ -1471,7 +1475,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.11.2;
MARKETING_VERSION = 1.12.0;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.RingPublishingTracking-Example.RingPublishingTracking";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -1495,7 +1499,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.11.2;
MARKETING_VERSION = 1.12.0;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.RingPublishingTracking-Example.RingPublishingTracking";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class ActionsViewController: UIViewController, PagerViewController, TraceableScr
RingPublishingTracking.shared.setOptOutMode(enabled: false)
}

// MARK: Actions (Aureus offers impression)
// MARK: Actions (Aureus)

@IBAction func onReportAureusOffersImpressionActionTouch(_ sender: Any) {
// If you have recomendations delivered by personalization engine (Aureus) you should report
Expand All @@ -199,6 +199,15 @@ class ActionsViewController: UIViewController, PagerViewController, TraceableScr
RingPublishingTracking.shared.reportAureusImpression(for: [teaser, teaser2, teaser3], eventContext: contextNew)
}

@IBAction func onReportAureusDeboostingActionTouch(_ sender: Any) {
let teaser = AureusTeaser(teaserId: "teaserId", offerId: "offerId", contentId: "contentId")
let teaser2 = AureusTeaser(teaserId: "teaserId_2", offerId: "offerId_2", contentId: "contentId_2")
let teaser3 = AureusTeaser(teaserId: "teaserId_3", offerId: "offerId_3", contentId: "contentId_3")

RingPublishingTracking.shared.reportAureusDeboostingEvent(for: [teaser, teaser2, teaser3], strategy: .click)
RingPublishingTracking.shared.reportAureusDeboostingEvent(for: [teaser, teaser2, teaser3], strategy: .view)
}

// MARK: Actions (Video event)

@IBAction func onReportVideoPlaybackStartActionTouch(_ sender: Any) {
Expand Down
2 changes: 1 addition & 1 deletion Example/RingPublishingTracking/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.10.0</string>
<string>1.12.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
Expand Down
33 changes: 23 additions & 10 deletions Example/RingPublishingTracking/Resources/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="RZf-xB-t58">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="24506" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="RZf-xB-t58">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="24504"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
Expand All @@ -28,7 +28,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" fixedFrame="YES" axis="vertical" alignment="center" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="aXC-aI-3mL">
<rect key="frame" x="-4" y="84" width="428" height="502.5"/>
<rect key="frame" x="-4" y="84" width="428" height="548.5"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" alignment="top" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="yYw-mN-t3Q">
<rect key="frame" x="158" y="0.0" width="112" height="30"/>
Expand Down Expand Up @@ -161,8 +161,21 @@
</button>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" alignment="top" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="07o-oX-z29">
<rect key="frame" x="103.5" y="322" width="221" height="30"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mE2-xt-2DQ">
<rect key="frame" x="0.0" y="0.0" width="221" height="30"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="Report Aureus deboosting event"/>
<connections>
<action selector="onReportAureusDeboostingActionTouch:" destination="BDG-lq-n5Z" eventType="touchUpInside" id="TU8-hs-gVm"/>
</connections>
</button>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" alignment="top" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="c2s-FQ-jRo">
<rect key="frame" x="82.5" y="322" width="263" height="30"/>
<rect key="frame" x="82.5" y="368" width="263" height="30"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="j79-Ju-fh9">
<rect key="frame" x="0.0" y="0.0" width="263" height="30"/>
Expand All @@ -175,7 +188,7 @@
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6zB-pX-M3z">
<rect key="frame" x="102" y="368" width="224" height="34.5"/>
<rect key="frame" x="102" y="414" width="224" height="34.5"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="StH-fE-Z47">
<rect key="frame" x="0.0" y="0.0" width="224" height="34.5"/>
Expand All @@ -188,7 +201,7 @@
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="Mjg-Bx-hHb">
<rect key="frame" x="48" y="418.5" width="332" height="84"/>
<rect key="frame" x="48" y="464.5" width="332" height="84"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Report Audio events:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="N91-T3-J9J">
<rect key="frame" x="0.0" y="0.0" width="143" height="18"/>
Expand Down Expand Up @@ -315,7 +328,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="i0Q-uj-vFb">
<rect key="frame" x="0.0" y="48" width="414" height="814"/>
<rect key="frame" x="0.0" y="96" width="414" height="732"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<connections>
<outlet property="dataSource" destination="dKT-N0-4Ci" id="GoI-sZ-a8y"/>
Expand Down Expand Up @@ -347,7 +360,7 @@
<navigationController id="RZf-xB-t58" sceneMemberID="viewController">
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" barStyle="black" translucent="NO" prompted="NO"/>
<navigationBar key="navigationBar" contentMode="scaleToFill" barStyle="black" translucent="NO" id="I7d-tC-daw">
<rect key="frame" x="0.0" y="48" width="414" height="44"/>
<rect key="frame" x="0.0" y="96" width="414" height="54"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
Expand All @@ -363,11 +376,11 @@
<objects>
<viewController storyboardIdentifier="DetailViewController" id="t9l-qS-kSS" customClass="DetailViewController" customModule="RingPublishingTracking_Example" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="JZT-F4-9QQ">
<rect key="frame" x="0.0" y="0.0" width="414" height="886"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="848"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="N2L-wm-aKb">
<rect key="frame" x="0.0" y="0.0" width="414" height="886"/>
<rect key="frame" x="0.0" y="48" width="414" height="800"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<connections>
<outlet property="dataSource" destination="t9l-qS-kSS" id="b8g-rM-KGi"/>
Expand Down
2 changes: 1 addition & 1 deletion RingPublishingTracking.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "RingPublishingTracking"
s.version = "1.11.2"
s.version = "1.12.0"

s.summary = "SDK used to report events from mobile application"
s.license = { :type => 'Copyright. Ringier Axel Springer Polska', :file => 'LICENSE' }
Expand Down
19 changes: 18 additions & 1 deletion Sources/RingPublishingTracking/Private/EventsFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ final class EventsFactory {
eventParameters: parameters)
}

// MARK: Aureus Impression event
// MARK: Aureus events

func createAureusImpressionEvent(for teasers: [AureusTeaser], eventContext: AureusEventContext) -> Event {
let eventDictionary: [String: AnyHashable] = [
Expand All @@ -192,6 +192,23 @@ final class EventsFactory {
eventParameters: parameters)
}

func createAureusDeboostingEvent(for teasers: [AureusTeaser], strategy: AureusDeboostingStrategy) -> Event {
let eventDictionary: [String: AnyHashable] = [
"type": "deboosting",
"strategy": strategy.rawValue,
"items": teasers.asJsonArray
]

let parameters: [String: AnyHashable] = [
"version": "1.0.0",
"events": [eventDictionary]
]

return Event(analyticsSystemName: AnalyticsSystem.generic.rawValue,
eventName: EventType.aureusEvent.rawValue,
eventParameters: parameters)
}

// MARK: Error

func createErrorEvent(for event: Event, applicationRootPath: String?) -> Event {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ enum EventType: String {
case videoEvent = "VidEvent"
case paid = "PaidEvent"
case effectivePageView = "PolarisEvent"
case aureusEvent = "AureusEvent"
case aureusImpressionEvent = "AureusImpressionEvent"
case error = "ErrEvent"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// AureusDeboostingStrategy.swift
// RingPublishingTracking
//
// Created by Adam Szeremeta on 05/03/2026.
//

import Foundation

/// Aureus deboosting strategy
public enum AureusDeboostingStrategy: String {

/// User was engaged with content
case click

/// User saw content multiple times but never interacted with it
case view
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ public extension RingPublishingTracking {
teaser: teaser,
eventContext: eventContext)
}

/// Report 'Aureus' deboosting event
///
/// - Parameters:
/// - teasers: [AureusTeaser]
/// - strategy: AureusDeboostingStrategy
func reportAureusDeboostingEvent(for teasers: [AureusTeaser], strategy: AureusDeboostingStrategy) {
Logger.log("Reporting 'Aureus' deboosting event for teasers: '\(teasers)'")

let event = eventsFactory.createAureusDeboostingEvent(for: teasers, strategy: strategy)
reportEvents([event])
}
}

// MARK: Private
Expand Down
Loading