Overview
App Tracking Transparency is Apple's privacy framework that requires apps to request user permission before tracking their data across apps or websites owned by other companies. This feature ensures your WeWeb mobile app complies with Apple's privacy guidelines by detecting and respecting the user's tracking preferences.
Prerequisites
-
Install the Despia plugin from WeWeb Marketplace
-
Verify installation: Assets → Library → check for "Despia Provider"
Implementation Steps
Step 1: Add Despia Plugin Component
-
Click Add in WeWeb editor
-
Navigate to Assets panel
-
Find Despia Provider → Despia native
-
Drag the Despia plugin to the top of your page
- Add to every page where tracking logic is needed
Step 2: Access Tracking Status Variable
The Despia plugin automatically exposes a trackingdisabled
variable:
-
false (default): User allows tracking
-
true: User has disabled tracking in iOS settings
Step 3: Create Conditional Logic
-
Select your page or app container
-
Go to Workflows → Trigger page workflows
-
Add new workflow with trigger "On app load" (for multi-page apps) or "On page load" (for single pages)
-
Add action: True/False split
- Condition: Bind to
Despia plugin > trackingdisabled
- Condition: Bind to
Step 4: Configure Tracking Branches
If trackingdisabled = true (User opted out):
-
Do NOT run analytics code
-
Do NOT initialize tracking pixels
-
Do NOT collect behavioral data
-
Optionally: Set a variable to adjust UI/features
If trackingdisabled = false (User allows tracking):
-
Initialize analytics (Google Analytics, PostHog, etc.)
-
Run tracking pixels
-
Enable personalization features
-
Collect permitted analytics data
Testing Your Implementation
-
Test with tracking enabled:
-
Deploy your app
-
Open on iOS device
-
Verify tracking code executes
-
-
Test with tracking disabled:
-
Go to iOS Settings → Privacy & Security → Tracking
-
Toggle "Allow Apps to Request to Track" OFF
-
Reopen your app
-
Verify tracking code does NOT execute
-
Publishing & Compliance
-
Changes deploy via over-the-air updates
-
No app rebuild required for logic changes
-
Updates apply immediately to all users
-
Ensures continuous compliance
What to Track vs Not Track
When Tracking is Disabled, DO NOT:
-
Use third-party analytics (Google Analytics, Mixpanel, etc.)
-
Collect IDFA (Identifier for Advertisers)
-
Share data with third-party advertisers
-
Use tracking pixels from other companies
-
Create user profiles for targeted advertising
When Tracking is Disabled, YOU CAN STILL:
-
Use first-party analytics for app functionality
-
Track crashes and performance metrics
-
Authenticate users
-
Save user preferences locally
-
Provide core app functionality
Best Practices
-
Respect user choice: Never attempt to circumvent tracking preferences
-
Clear communication: Explain why tracking benefits users (if requesting)
-
Graceful degradation: Ensure app works fully without tracking
-
Regular testing: Verify compliance with each app update
-
Documentation: Keep records of your privacy implementation
Common Integration Points
Apply tracking logic to:
-
Analytics services: Google Analytics, PostHog, Amplitude
-
Marketing pixels: Facebook, Google Ads, TikTok
-
Attribution tools: AppsFlyer, Adjust, Branch
-
Crash reporting: Only if it includes user behavior
-
A/B testing tools: When they track across apps
Compliance Benefits
-
App Store approval: Meets Apple's requirements
-
User trust: Respects privacy preferences
-
Legal compliance: Aligns with GDPR, CCPA
-
Reduced liability: Avoids privacy violations
-
Better reputation: Shows commitment to privacy
Troubleshooting
Variable not updating:
-
Ensure Despia plugin is on the page
-
Check iOS tracking settings
-
Restart app after changing settings
Tracking still occurring:
-
Audit all third-party scripts
-
Check for hardcoded tracking
-
Review all API calls
App Store rejection:
-
Verify all tracking respects user preference
-
Review Apple's latest guidelines
For additional support or questions, please contact our support team at support@despia.com