Skip to content

Add Latency Analytics Events for SSID Integration#415

Open
EdgarBarocio wants to merge 8 commits into
paypal:feature/app-switchfrom
EdgarBarocio:ebarocio/latency-analytics-ssid
Open

Add Latency Analytics Events for SSID Integration#415
EdgarBarocio wants to merge 8 commits into
paypal:feature/app-switchfrom
EdgarBarocio:ebarocio/latency-analytics-ssid

Conversation

@EdgarBarocio

@EdgarBarocio EdgarBarocio commented Jul 8, 2026

Copy link
Copy Markdown

Reason for changes

Introduce HTTP response timing and FPTI payload support for start_time/end_time, and fire api-request-latency and system-latency events from PayPalWebCheckoutClient createOrder/createSetupToken and checkout presentation paths.

Summary of changes

  • Added Timing tracking for new ssid
  • Added tests
  • Moved tests to an accessible file and deleted old file to avoid duplicated symbols

Checklist

  • Added a changelog entry

Authors

  • EdgarBarocio

Evidence

for paypal-web-payments:system-latency

Screenshot 2026-07-09 at 1 32 26 PM Screenshot 2026-07-09 at 1 32 34 PM Screenshot 2026-07-09 at 1 33 24 PM Screenshot 2026-07-09 at 1 33 01 PM

for paypal-web-payments:api-request-latency
Screenshot 2026-07-09 at 2 18 52 PM
Screenshot 2026-07-09 at 2 19 09 PM

Add testing for new latency logic
Move tests to a single shared file and delete old file to avoild duplicated symbols
This reverts commit be7966f.
@EdgarBarocio EdgarBarocio changed the title Ebarocio/latency analytics ssid Add Latency Analytics Events for SSID Integration Jul 9, 2026
paypalClient.vault(vaultRequest) { result in
paypalClient = client

print("📊 Using vault(createSetupToken:) — emits paypal-web-payments:api-request-latency")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
print("📊 Using vault(createSetupToken:) — emits paypal-web-payments:api-request-latency")

Let's remove this print statement.


state.paypalVaultTokenResponse = .loading

try await withCheckedThrowingContinuation { (continuation: CheckedContinuation<Void, Error>) in

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is deprecated, but also I'm not sure if it's needed since we aren't doing anything with the result.

}
case .success(let vaultResult):
self.state.paypalVaultTokenResponse = .loaded(vaultResult)
print("✅ Vault result: \(String(describing: vaultResult))")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
print("✅ Vault result: \(String(describing: vaultResult))")

Please remove.

print("Canceled")
self.state.paypalVaultTokenResponse = .idle
}
print("Canceled")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
print("Canceled")

Please remove.

…-ios into ebarocio/latency-analytics-ssid

# Conflicts:
#	Demo/Demo.xcodeproj/project.pbxproj
#	Demo/Demo/PayPalVault/PayPalVaultViewModel/PayPalVaultViewModel.swift
#	Demo/Demo/PayPalWebPayments/PayPalWebPaymentsView/PayPalWebCreateOrderView.swift
#	Demo/Demo/PayPalWebPayments/PayPalWebPaymentsView/PayPalWebPaymentsView.swift
#	Demo/Demo/PayPalWebPayments/PayPalWebViewModel/PayPalWebViewModel.swift
#	Demo/Demo/SwiftUIComponents/CommonComponents/UserIdentityFactory.swift
#	Demo/Demo/Vault/VaultViewModel/VaultViewModel.swift
#	Demo/Demo/Vault/VaultViews/CreateSetupTokenView.swift
#	PayPal.xcodeproj/project.pbxproj
#	Sources/CorePayments/AnalyticsEventData.swift
#	Sources/CorePayments/Networking/AnalyticsService.swift
#	Sources/PayPalWebPayments/APIRequests/CreateShopperSessionAPI.swift
#	Sources/PayPalWebPayments/APIRequests/CreateShopperSessionResponse.swift
#	Sources/PayPalWebPayments/PayPalWebCheckoutClient.swift
#	UnitTests/TestShared/MockTrackingEventsAPI.swift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants