Skip to content

Commit

Permalink
Tracking pixels for content blocking lookup and fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
studiosutara committed Nov 20, 2024
1 parent 6642b4b commit da8b6bd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Core/ContentBlocking.swift
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,15 @@ public final class ContentBlocking {

case .contentBlockingCompilationTime:
domainEvent = .contentBlockingCompilationTime

case .contentBlockingLookupRulesSucceeded:

Check failure on line 122 in Core/ContentBlocking.swift

View workflow job for this annotation

GitHub Actions / Make Release Build

type 'ContentBlockerDebugEvents' has no member 'contentBlockingLookupRulesSucceeded'

Check failure on line 122 in Core/ContentBlocking.swift

View workflow job for this annotation

GitHub Actions / Make Release Build

type 'ContentBlockerDebugEvents' has no member 'contentBlockingLookupRulesSucceeded'

Check failure on line 122 in Core/ContentBlocking.swift

View workflow job for this annotation

GitHub Actions / Unit Tests

type 'ContentBlockerDebugEvents' has no member 'contentBlockingLookupRulesSucceeded'
domainEvent = .contentBlockingLookupRulesSucceeded

case .contentBlockingFetchRulesSucceeded:
domainEvent = .contentBlockingFetchRulesSucceeded

case .contentBlockingLookupAndFetchFailed:
domainEvent = .contentBlockingLookupAndFetchFailed
}

if let error = error {
Expand Down
6 changes: 6 additions & 0 deletions Core/PixelEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,9 @@ extension Pixel {
component: ContentBlockerDebugEvents.Component)

case contentBlockingCompilationTime
case contentBlockingLookupRulesSucceeded
case contentBlockingFetchRulesSucceeded
case contentBlockingLookupAndFetchFailed

case ampBlockingRulesCompilationFailed

Expand Down Expand Up @@ -1354,6 +1357,9 @@ extension Pixel.Event {

case .contentBlockingCompilationTime: return "m_content_blocking_compilation_time"

case .contentBlockingLookupRulesSucceeded: return "m_content_blocking_lookup_rules_succeeded"
case .contentBlockingFetchRulesSucceeded: return "m_content_blocking_fetch_rules_succeeded"
case .contentBlockingLookupAndFetchFailed: return "m_content_blocking_lookup_and_fetch_failed"
case .ampBlockingRulesCompilationFailed: return "m_debug_amp_rules_compilation_failed"

case .webKitDidTerminate: return "m_d_wkt"
Expand Down

0 comments on commit da8b6bd

Please sign in to comment.