Skip to main content

Best Practices

Privacy & Sensitive Data​

Never track personally identifiable information (PII) or sensitive data such as passwords, credit card numbers, social security numbers, or health information.

// WRONG
B2MAnalytics.shared.logEvent(name: "payment_completed", properties: [
"credit_card_number": AnyCodable("1234-5678-9012-3456") // NEVER!
])

// CORRECT
B2MAnalytics.shared.logEvent(name: "payment_completed", properties: [
"payment_method": AnyCodable("credit_card"),
"last_four_digits": AnyCodable("3456")
])