Skip to content

Commit

Permalink
Add information on how to verify if a user is part of 1% experimental…
Browse files Browse the repository at this point in the history
… group (#543)

* Add a new experiment group component

* Show label

* Show conditional message for exprimental group result

* Fix typescript issue

* Improve condition for promise reject null

* Create a new state for current tabid

* Show library not supported when cookieDeprecationLabel not available

* Refactor code

* Revert global currentabId commit

* Show empty string

* Update text

* Update text

* Add condition for undefined matches error

* Revert detection changes

* Update text for info
  • Loading branch information
mohdsayed authored Apr 8, 2024
1 parent d5cec37 commit d9283c2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/extension/src/store/utils/deriveBlockingStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ import {
*/
function deriveInboundBlocking(respEvents: responsEvent[]): BLOCK_STATUS {
// if there are not response events the cookie must be stored in a previous visit
// Or there is a javascript not used in the request header.
if (respEvents.length === 0) {
return BLOCK_STATUS.NOT_BLOCKED;
}

// Number of responses in which the cookie was blocked.
const numBlocked: number = respEvents.reduce((acc, event) => {
if (event.blocked) {
return acc + 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
import React from 'react';
import { addUTMParams } from '@ps-analysis-tool/common';

const EXPERIMENT_GROUP = 'Membership in Experiment Group';

const INFO_CARDS_DATA = [
{
heading: 'Membership in Experiment Group',
heading: EXPERIMENT_GROUP,
content: `To prepare for third-party cookie deprecation, we will be providing Chrome-facilitated testing modes that allow sites to preview how site behavior and functionality work without third-party cookies. Check <a class="text-bright-navy-blue dark:text-jordy-blue hover:opacity-80 underline"
href="${addUTMParams(
'https://developers.google.com/privacy-sandbox/setup/web/chrome-facilitated-testing'
Expand Down Expand Up @@ -72,6 +74,15 @@ const InfoCards = () => {
className="text-sm break-words"
dangerouslySetInnerHTML={{ __html: card.content }}
/>
{card.heading === EXPERIMENT_GROUP && (
<div className="p-3 flex-1 bg-anti-flash-white dark:bg-charleston-green rounded-md">
<p>
For browsers in the 1% group, users will get a new
chrome://settings/trackingProtection page instead of
chrome://settings/cookies
</p>
</div>
)}
</div>
</div>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
*/
import React from 'react';
import { LandingPage } from '@ps-analysis-tool/design-system';

/**
* Internal dependencies.
*/
import FacilitatedTestingContent from './faciliatedTestingContent';

const FacilitatedTesting = () => (
Expand Down

0 comments on commit d9283c2

Please sign in to comment.