Skip to content

Commit 1a5eb83

Browse files
committed
Use auxia for 100% of consented Ireland traffic
1 parent de78bb6 commit 1a5eb83

File tree

3 files changed

+26
-214
lines changed

3 files changed

+26
-214
lines changed

src/server/signin-gate/libPure.ts

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -458,14 +458,12 @@ export const getTreatmentsRequestPayloadToGateType = (
458458

459459
if (
460460
payload.countryCode === 'IE' &&
461-
isAuxiaAudienceShare(payload) &&
462461
userHasConsented(payload)
463462
) {
464463
// [07] (copy from logic.md)
465464
//
466465
// prerequisites:
467466
// - Ireland
468-
// - Is Auxia share of the audience
469467
// - user has consented
470468
//
471469
// effects:
@@ -475,14 +473,12 @@ export const getTreatmentsRequestPayloadToGateType = (
475473

476474
if (
477475
payload.countryCode === 'IE' &&
478-
isAuxiaAudienceShare(payload) &&
479476
!userHasConsented(payload)
480477
) {
481478
// [05] (copy from logic.md)
482479
//
483480
// prerequisites:
484481
// - Ireland
485-
// - Is Auxia share of the audience
486482
// - user has NOT consented
487483
//
488484
// effects:
@@ -504,68 +500,6 @@ export const getTreatmentsRequestPayloadToGateType = (
504500
}
505501
}
506502

507-
if (
508-
payload.countryCode === 'IE' &&
509-
isGuardianAudienceShare(payload) &&
510-
userHasConsented(payload)
511-
) {
512-
// [08] (copy from logic.md)
513-
//
514-
// prerequisites:
515-
// - Ireland
516-
// - Is Guardian share of the audience
517-
// - user has consented
518-
//
519-
// effects:
520-
// - No Auxia notification
521-
// - Guardian drives the gate:
522-
// - No gate for 30 days after a single contribution event (gu_hide_support_messaging; hideSupportMessagingTimestamp)
523-
// - No gate display the first 3 page views
524-
// - Dismissible gates then no gate after 5 dismisses
525-
if (hideSupportMessagingHasOverride(payload, now)) {
526-
return 'None';
527-
}
528-
if (payload.dailyArticleCount < 3) {
529-
return 'None';
530-
}
531-
if (payload.gateDismissCount < 5) {
532-
return 'GuDismissible';
533-
} else {
534-
return 'None';
535-
}
536-
}
537-
538-
if (
539-
payload.countryCode === 'IE' &&
540-
isGuardianAudienceShare(payload) &&
541-
!userHasConsented(payload)
542-
) {
543-
// [06] (copy from logic.md)
544-
//
545-
// prerequisites:
546-
// - Ireland
547-
// - Is Guardian share of the audience
548-
// - user has NOT consented
549-
//
550-
// effects:
551-
// - Notify Auxia for analytics
552-
// - Guardian drives the gate:
553-
// - No gate for 30 days after a single contribution event (gu_hide_support_messaging; hideSupportMessagingTimestamp)
554-
// - No gate display the first 3 page views
555-
// - 3x dismissal, then mandatory
556-
if (hideSupportMessagingHasOverride(payload, now)) {
557-
return 'AuxiaAnalyticsThenNone';
558-
}
559-
if (payload.dailyArticleCount < 3) {
560-
return 'AuxiaAnalyticsThenNone';
561-
}
562-
if (payload.gateDisplayCount < 3) {
563-
return 'AuxiaAnalyticsThenGuDismissible';
564-
} else {
565-
return 'AuxiaAnalyticsThenGuMandatory';
566-
}
567-
}
568-
569503
// World without Ireland
570504

571505
if (

src/server/signin-gate/libPureTests/getTreatmentsRequestPayloadToGateType/ireland.test.ts

Lines changed: 0 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ describe('getTreatmentsRequestPayloadToGateType (ireland)', () => {
77
//
88
// prerequisites:
99
// - Ireland
10-
// - Is Auxia share of the audience
1110
// - user has consented
1211
//
1312
// effects:
@@ -37,129 +36,11 @@ describe('getTreatmentsRequestPayloadToGateType (ireland)', () => {
3736
expect(gateType).toStrictEqual('AuxiaAPI');
3837
});
3938

40-
it('logic.md [08], first 3 page views', () => {
41-
// [08] (copy from logic.md)
42-
//
43-
// prerequisites:
44-
// - Ireland
45-
// - Is Guardian share of the audience
46-
// - user has consented
47-
//
48-
// effects:
49-
// - No Auxia notification
50-
// - Guardian drives the gate:
51-
// - No gate for 30 days after a single contribution event (gu_hide_support_messaging; hideSupportMessagingTimestamp)
52-
// - No gate display the first 3 page views
53-
// - Dismissible gates then no gate after 5 dismisses
54-
55-
const payload: GetTreatmentsRequestPayload = {
56-
browserId: 'sample',
57-
isSupporter: false,
58-
dailyArticleCount: 2,
59-
articleIdentifier: 'sample: article identifier',
60-
editionId: 'GB',
61-
contentType: 'Article',
62-
sectionId: 'uk-news',
63-
tagIds: ['type/article'],
64-
gateDismissCount: 4,
65-
countryCode: 'IE', // <- [Ireland]
66-
mvtId: 450_000, // <- [Guardian]
67-
should_show_legacy_gate_tmp: true,
68-
hasConsented: true, // <- [consented]
69-
shouldServeDismissible: false,
70-
showDefaultGate: undefined,
71-
gateDisplayCount: 4,
72-
hideSupportMessagingTimestamp: undefined,
73-
};
74-
const now = 1756568322187; // current time in milliseconds since epoch
75-
const gateType = getTreatmentsRequestPayloadToGateType(payload, now);
76-
expect(gateType).toStrictEqual('None');
77-
});
78-
79-
it('logic.md [08], first first gate displays', () => {
80-
// [08] (copy from logic.md)
81-
//
82-
// prerequisites:
83-
// - Ireland
84-
// - Is Guardian share of the audience
85-
// - user has consented
86-
//
87-
// effects:
88-
// - No Auxia notification
89-
// - Guardian drives the gate:
90-
// - No gate for 30 days after a single contribution event (gu_hide_support_messaging; hideSupportMessagingTimestamp)
91-
// - No gate display the first 3 page views
92-
// - Dismissible gates then no gate after 5 dismisses
93-
94-
const payload: GetTreatmentsRequestPayload = {
95-
browserId: 'sample',
96-
isSupporter: false,
97-
dailyArticleCount: 6,
98-
articleIdentifier: 'sample: article identifier',
99-
editionId: 'GB',
100-
contentType: 'Article',
101-
sectionId: 'uk-news',
102-
tagIds: ['type/article'],
103-
gateDismissCount: 2,
104-
countryCode: 'IE', // <- [Ireland]
105-
mvtId: 450_000, // <- [Guardian]
106-
should_show_legacy_gate_tmp: true,
107-
hasConsented: true, // <- [consented]
108-
shouldServeDismissible: false,
109-
showDefaultGate: undefined,
110-
gateDisplayCount: 4,
111-
hideSupportMessagingTimestamp: undefined,
112-
};
113-
const now = 1756568322187; // current time in milliseconds since epoch
114-
const gateType = getTreatmentsRequestPayloadToGateType(payload, now);
115-
expect(gateType).toStrictEqual('GuDismissible');
116-
});
117-
118-
it('logic.md [08], high dismiss count', () => {
119-
// [08] (copy from logic.md)
120-
//
121-
// prerequisites:
122-
// - Ireland
123-
// - Is Guardian share of the audience
124-
// - user has consented
125-
//
126-
// effects:
127-
// - No Auxia notification
128-
// - Guardian drives the gate:
129-
// - No gate for 30 days after a single contribution event (gu_hide_support_messaging; hideSupportMessagingTimestamp)
130-
// - No gate display the first 3 page views
131-
// - Dismissible gates then no gate after 5 dismisses
132-
133-
const payload: GetTreatmentsRequestPayload = {
134-
browserId: 'sample',
135-
isSupporter: false,
136-
dailyArticleCount: 6,
137-
articleIdentifier: 'sample: article identifier',
138-
editionId: 'GB',
139-
contentType: 'Article',
140-
sectionId: 'uk-news',
141-
tagIds: ['type/article'],
142-
gateDismissCount: 7,
143-
countryCode: 'IE', // <- [Ireland]
144-
mvtId: 450_000, // <- [Guardian]
145-
should_show_legacy_gate_tmp: true,
146-
hasConsented: true, // <- [consented]
147-
shouldServeDismissible: false,
148-
showDefaultGate: undefined,
149-
gateDisplayCount: 8,
150-
hideSupportMessagingTimestamp: undefined,
151-
};
152-
const now = 1756568322187; // current time in milliseconds since epoch
153-
const gateType = getTreatmentsRequestPayloadToGateType(payload, now);
154-
expect(gateType).toStrictEqual('None');
155-
});
156-
15739
it('logic.md [05], low page views', () => {
15840
// [05] (copy from logic.md)
15941
//
16042
// prerequisites:
16143
// - Ireland
162-
// - Is Auxia share of the audience
16344
// - user has NOT consented
16445
//
16546
// effects:
@@ -198,7 +79,6 @@ describe('getTreatmentsRequestPayloadToGateType (ireland)', () => {
19879
//
19980
// prerequisites:
20081
// - Ireland
201-
// - Is Auxia share of the audience
20282
// - user has NOT consented
20383
//
20484
// effects:
@@ -237,7 +117,6 @@ describe('getTreatmentsRequestPayloadToGateType (ireland)', () => {
237117
//
238118
// prerequisites:
239119
// - Ireland
240-
// - Is Auxia share of the audience
241120
// - user has NOT consented
242121
//
243122
// effects:

src/server/signin-gate/logic.md

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -51,33 +51,32 @@ nb: the numbers, for instance, [01], uniquely identify the experience for the co
5151
### Ireland
5252

5353
```
54-
|
55-
Auxia share of the Audience | Guardian share of the Audience
56-
35% | 65%
57-
---------------------------------------------------------------------------------------------
58-
| [05] | [06] |
59-
| | |
60-
| - Notify Auxia for analytics | - Notify Auxia for analytics |
61-
un-consented | - Guardian drives the gate: | - Guardian drives the gate: |
62-
| - No gate for 30 days after a single | - No gate for 30 days after a single |
63-
| contribution event [02] | contribution event [02] |
64-
| - No gate the first 3 page views | - No gate the first 3 page views |
65-
| - 3x dismissal, then mandatory | - 3x dismissal, then mandatory |
66-
| | |
67-
-----------|-----------------------------------------------------------------------------------------------------
68-
| [07] | [08] |
69-
| | |
70-
| - Auxia drives the gate | - No Auxia notification |
71-
consented | | - Guardian drives the gate: |
72-
| | - No gate for 30 days after a single |
73-
| | contribution event [02] |
74-
| | - No gate the first 3 page views |
75-
| | - Dismissible gates |
76-
| | then no gate after 5 dismisses |
77-
| | |
78-
---------------------------------------------------------------------------------------------
79-
|
80-
|
54+
55+
Auxia share of the Audience
56+
100%
57+
----------------------------------------------
58+
| [05] |
59+
| |
60+
| - Notify Auxia for analytics |
61+
un-consented | - Guardian drives the gate: |
62+
| - No gate for 30 days after a single |
63+
| contribution event [02] |
64+
| - No gate the first 3 page views |
65+
| - 3x dismissal, then mandatory |
66+
| |
67+
-----------|-----------------------------------------------
68+
| [07] |
69+
| |
70+
| - Auxia drives the gate |
71+
consented | |
72+
| |
73+
| |
74+
| |
75+
| |
76+
| |
77+
| |
78+
----------------------------------------------
79+
8180
8281
[02] use gu_hide_support_messaging cookie
8382
```

0 commit comments

Comments
 (0)