Commit fd28655
authored
Enqueue free trial vpn activation pixel (#7721)
Task/Issue URL:
https://app.asana.com/1/137249556945/task/1213218785316169
### Description
This PR fixes the issue where sending a pixel shortly after enabling VPN
may fail.
### Steps to test this PR
- [x] Apply patch on
https://app.asana.com/1/137249556945/task/1210448620621729
- [x] Fresh install
- [x] Purchase a test subscription (Free Trial)
- [x] Before it expires activate VPN
- [x] Check in logcat that `subscription_free_trial_vpn_activation`
pixel is fired with the new `platform` parameter
### No UI changes
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Small, localized change to pixel delivery behavior; risk is limited to
analytics event timing/delivery for pixels using the new `enqueue` flag.
>
> **Overview**
> Adds an `enqueue` flag to `SubscriptionPixel` and updates
`SubscriptionPixelSenderImpl.fire` to *conditionally* send pixels via
`pixelSender.enqueueFire` instead of immediate `fire`.
>
> Marks `FREE_TRIAL_VPN_ACTIVATION` to use the queued send path,
reducing the chance the pixel is lost when VPN is enabled and network
conditions are transient.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
daeb405. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent a9f946c commit fd28655
File tree
2 files changed
+9
-2
lines changed- subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/pixels
2 files changed
+9
-2
lines changedLines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
265 | 266 | | |
266 | 267 | | |
267 | 268 | | |
| 269 | + | |
268 | 270 | | |
269 | 271 | | |
270 | 272 | | |
| |||
273 | 275 | | |
274 | 276 | | |
275 | 277 | | |
276 | | - | |
| 278 | + | |
| 279 | + | |
277 | 280 | | |
278 | 281 | | |
279 | 282 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
316 | 320 | | |
317 | 321 | | |
318 | 322 | | |
0 commit comments