Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove adroll #4029

Merged
merged 4 commits into from
Sep 24, 2024
Merged

Remove adroll #4029

merged 4 commits into from
Sep 24, 2024

Conversation

piekczyk
Copy link
Collaborator

@piekczyk piekczyk commented Sep 23, 2024

Remove adroll

Changes 👷‍♀️

- removed adroll support

How to test 🧪

  • self explanatory

Summary by CodeRabbit

  • Bug Fixes

    • Removed AdRoll tracking script to prevent potential tracking issues.
  • Chores

    • Updated application to no longer reference AdRoll tracking, simplifying the codebase.
    • Removed related environment variables and documentation references for clarity.

Copy link
Contributor

coderabbitai bot commented Sep 23, 2024

Warning

Rate limit exceeded

@piekczyk has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 20 minutes and 2 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between 925538c and a61cb9d.

Walkthrough

The changes involve the complete removal of the analytics/adroll.ts file, which contained the AdRoll tracking script, along with corresponding updates across several files. The adRollPixelScript import and its usage were eliminated in pages/_app.tsx, replaced with a comment and an empty fragment. Additionally, environment variables related to AdRoll tracking were removed from various configuration files, indicating a shift away from using AdRoll for analytics purposes.

Changes

Files Change Summary
analytics/adroll.ts Deleted file containing AdRoll tracking script, including advertisement and pixel ID configurations.
pages/_app.tsx Removed import and usage of adRollPixelScript, replaced with a comment and an empty fragment.
.env.template Removed environment variables ADROLL_ADV_ID and ADROLL_PIX_ID.
.github/workflows/aws-prod.yaml Deleted build arguments for AdRoll environment variables.
.github/workflows/aws-staging.yaml Removed environment variables related to AdRoll from the job's environment setup.
.github/workflows/dockerhub.yaml Deleted build arguments for AdRoll environment variables.
Dockerfile.production Removed declarations for ADROLL_ADV_ID and ADROLL_PIX_ID.
README.md Removed references to ADROLL_PIX_ID and ADROLL_ADV_ID in environment variable documentation.
analytics/manageCookie.ts Updated comment in disable method for marketing cookie, functionality unchanged.
features/content/cookie/en.tsx Removed rows related to AdRoll marketing cookies from the content table.
public/locales/cn/common.json Modified description of marketing cookies, removing reference to AdRoll.
public/locales/en/common.json Generalized description of marketing cookies by removing reference to AdRoll.
runtime.config.js Removed adRollAdvId and adRollPixId from publicRuntimeConfig.

Poem

In the code where pixels danced,
A rabbit hopped, and changes pranced.
AdRoll scripts have bid goodbye,
Now empty fragments flutter by.
With a hop and a skip, we cheer,
For cleaner paths, the code is clear! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    -- I pushed a fix in commit <commit_id>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    -- @coderabbitai generate unit testing code for this file.
    -- @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    -- @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    -- @coderabbitai read src/utils.ts and generate unit testing code.
    -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    -- @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1ec5453 and 859531b.

Files selected for processing (2)
  • analytics/adroll.ts (0 hunks)
  • pages/_app.tsx (1 hunks)
Files not reviewed due to no reviewable changes (1)
  • analytics/adroll.ts
Additional context used
Biome
pages/_app.tsx

[error] 160-160: Avoid using unnecessary Fragment.

A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment.

(lint/complexity/noUselessFragments)

Comment on lines +157 to +160
// Use when there is a need to load extra script required for marketing
// Example usage:
// <Script dangerouslySetInnerHTML={{ __html: scriptToBeLoaded }} async />
<></>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

Remaining AdRoll References Detected

The AdRoll-related code has not been fully removed. Please address the following instances to ensure complete elimination:

  • runtime.config.js

    • adRollAdvId: process.env.ADROLL_ADV_ID,
    • adRollPixId: process.env.ADROLL_PIX_ID,
  • public/locales/en/common.json & public/locales/cn/common.json

    • Descriptions referencing AdRoll cookies.
  • features/content/cookie/en.tsx

    • Multiple <td>Adroll</td> entries.
    • Usage of __adroll_fpc.
  • analytics/manageCookie.ts

    • Comments related to AdRoll instance management.
  • README.md

    • References to ADROLL_PIX_ID and ADROLL_ADV_ID.
    • Descriptions mentioning AdRoll Pixel.
  • Dockerfile.production

    • Environment variables for ADROLL_ADV_ID and ADROLL_PIX_ID.

Please ensure that all AdRoll-related configurations, comments, and documentation are thoroughly removed to maintain codebase integrity.

Analysis chain

Approve AdRoll removal and suggest minor improvement

The removal of the AdRoll script is correctly implemented, aligning with the PR objective. The comment provides clear guidance for future marketing script additions, which is helpful.

However, we can make a small improvement:

Consider removing the empty fragment on line 160 as it's unnecessary:

  {cookiesValue?.enabledCookies?.marketing && (
    // Use when there is a need to load extra script required for marketing
    // Example usage:
    // <Script dangerouslySetInnerHTML={{ __html: scriptToBeLoaded }} async />
-   <></>
  )}

This change addresses the static analysis hint and slightly improves code cleanliness.

Let's verify the complete removal of AdRoll-related code:

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining AdRoll-related code

# Test 1: Search for 'adroll' or 'AdRoll' in all files
echo "Searching for 'adroll' or 'AdRoll' in all files:"
rg -i 'adroll'

# Test 2: Check for any remaining imports from 'analytics/adroll'
echo "Checking for imports from 'analytics/adroll':"
rg "from 'analytics/adroll'"

# Test 3: Check if the 'analytics/adroll.ts' file still exists
echo "Checking if 'analytics/adroll.ts' file exists:"
fd 'adroll.ts' analytics

Length of output: 1606

Tools
Biome

[error] 160-160: Avoid using unnecessary Fragment.

A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment.

(lint/complexity/noUselessFragments)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Outside diff range and nitpick comments (2)
analytics/manageCookie.ts (1)

Line range hint 1-16: Consider reviewing overall analytics strategy

Given that AdRoll support is being removed, it might be a good time to review the overall analytics strategy:

  1. Verify if mixpanel is still the preferred analytics tool and if its implementation is up-to-date.
  2. Address the TODO comment about deleting user data for mixpanel. This is important for compliance with data protection regulations.
  3. Consider if any other marketing or analytics tools need to be adjusted or removed alongside AdRoll.

It would be beneficial to create a task to implement the user data deletion feature for mixpanel, as mentioned in the TODO comment. This ensures compliance with data protection regulations and provides a complete analytics management solution.

.github/workflows/aws-staging.yaml (1)

Line range hint 1-176: Suggestion: Improve workflow documentation

The workflow is well-structured and follows best practices. To further improve it, consider adding comments or documentation for each major step in the workflow. This will make it easier for other developers to understand and maintain the workflow in the future.

For example, you could add comments like:

# Step 1: Set up the environment
- name: Setup node
  uses: actions/setup-node@v3
  with:
    node-version: 18.19.1

# Step 2: Check for required secrets
- name: Check required secrets
  env:
    # ... (environment variables)

# Step 3: Build the application
- name: Build standalone app
  id: build-app
  env:
    # ... (environment variables)

# Step 4: Deploy to AWS
- name: Configure AWS credentials
  uses: aws-actions/configure-aws-credentials@v2
  with:
    # ... (AWS credentials)

# Step 5: Run e2e tests
- name: Trigger e2e tests in e2e-tests repository
  env:
    E2E_TESTS_PAT: ${{ secrets.E2E_TESTS_PAT }}
  run: |
    # ... (e2e test trigger command)

This documentation will provide a clear overview of the workflow's structure and purpose.

Tools
actionlint

48-48: shellcheck reported issue in this script: SC2086:info:4:27: Double quote to prevent globbing and word splitting

(shellcheck)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 859531b and 925538c.

Files selected for processing (11)
  • .env.template (0 hunks)
  • .github/workflows/aws-prod.yaml (0 hunks)
  • .github/workflows/aws-staging.yaml (2 hunks)
  • .github/workflows/dockerhub.yaml (0 hunks)
  • Dockerfile.production (0 hunks)
  • README.md (1 hunks)
  • analytics/manageCookie.ts (1 hunks)
  • features/content/cookie/en.tsx (1 hunks)
  • public/locales/cn/common.json (1 hunks)
  • public/locales/en/common.json (1 hunks)
  • runtime.config.js (0 hunks)
Files not reviewed due to no reviewable changes (5)
  • .env.template
  • .github/workflows/aws-prod.yaml
  • .github/workflows/dockerhub.yaml
  • Dockerfile.production
  • runtime.config.js
Files skipped from review due to trivial changes (1)
  • public/locales/en/common.json
Additional comments not posted (6)
analytics/manageCookie.ts (1)

8-8: Confirm if marketing cookie disable method should remain empty

The comment about AdRoll has been removed, which aligns with the PR objective of removing AdRoll support. However, the disable method for the marketing cookie remains an empty function.

Please confirm if this is intentional or if additional logic should be added to properly disable marketing cookies now that AdRoll is removed.

To verify the usage of this method across the codebase, you can run the following script:

This will help ensure that leaving this method empty doesn't introduce any unintended behavior.

Verification successful

Marketing cookie disable method is unused and safe to remain empty

The manageCookie.marketing.disable method does not appear to be used anywhere in the codebase. Leaving it as an empty function does not introduce any unintended behavior.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for usage of manageCookie.marketing.disable
rg --type typescript "manageCookie\.marketing\.disable"

Length of output: 92


Script:

#!/bin/bash
# Search for usage of manageCookie.marketing.disable with correct file type
rg --type ts "manageCookie\.marketing\.disable"

Length of output: 49


Script:

#!/bin/bash
# Search for usage of manageCookie.marketing.disable without specifying file type
rg "manageCookie\.marketing\.disable"

Length of output: 39

.github/workflows/aws-staging.yaml (1)

49-49: LGTM: AdRoll secrets correctly removed from required secrets check

The removal of AdRoll-related secrets (ADROLL_ADV_ID_STAGING and ADROLL_PIX_ID_STAGING) from the required_secrets array is consistent with the PR objective of removing AdRoll support. The remaining secrets and the logic for checking required secrets remain intact, which is correct.

README.md (2)

37-39: LGTM: Improved readability of NPM_TOKEN note

The reformatting of the NPM_TOKEN note improves readability without changing the content. This is a good minor improvement to the documentation.


Line range hint 1-1: LGTM: Removal of AdRoll-related environment variables

The removal of ADROLL_PIX_ID and ADROLL_ADV_ID environment variables from the README is consistent with the PR objective of removing AdRoll support. This change appropriately cleans up the documentation.

To ensure completeness, please run the following command to check if there are any remaining references to AdRoll in the codebase:

If this command returns any results, those occurrences should be reviewed and removed if appropriate.

features/content/cookie/en.tsx (2)

Line range hint 1-382: Overall assessment of Cookie Policy changes

The modifications to the Cookie Policy align with the PR objective of removing AdRoll support. The targeted advertising cookies section has been updated to remove specific AdRoll information. However, there are a few points to consider for future updates:

  1. The placeholder row in the targeted advertising cookies table should be revisited once new marketing strategies are implemented.
  2. The introductory paragraph for the targeted advertising cookies section may need to be updated if no such cookies are currently in use.
  3. Ensure that the "Last updated" date at the beginning of the document is adjusted to reflect these changes.

While these changes are approved as they meet the immediate goal of removing AdRoll references, it's important to create a follow-up task to complete the updates to this section once new marketing strategies are determined.


376-382: Update required for targeted advertising cookies section

The changes in this section reflect the removal of AdRoll-related cookie information, which aligns with the PR objective of removing AdRoll support. However, there are a few points to consider:

  1. The TODO comment indicates that this section needs to be updated once new marketing strategies are applied. This should be tracked to ensure it's not overlooked in future updates.

  2. The placeholder row with "-" symbols might be confusing for users. Consider either removing this row entirely if there are currently no targeted advertising cookies, or adding a note explaining that no targeted advertising cookies are currently in use.

  3. Ensure that the "Cookies for targeted advertising" paragraph above the table is still relevant. If there are no longer any targeted advertising cookies, this paragraph might need to be updated or removed as well.

Consider the following actions:

  1. Create a tracking issue for updating this section once new marketing strategies are in place.
  2. Decide whether to remove the placeholder row or add an explanatory note.
  3. Review and update the introductory paragraph for this section if necessary.

To ensure consistency across the codebase, let's check for any other references to AdRoll or targeted advertising cookies:

Verification successful

AdRoll Removal Verified Successfully

  • No additional AdRoll references found in the codebase.
  • The "Cookies for targeted advertising" section in features/content/cookie/en.tsx has been appropriately updated.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for AdRoll or targeted advertising references
echo "Searching for AdRoll references:"
rg -i "adroll"
echo "Searching for targeted advertising references:"
rg -i "targeted advertising"

Length of output: 295

public/locales/cn/common.json Outdated Show resolved Hide resolved
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@piekczyk piekczyk merged commit f818ae4 into dev Sep 24, 2024
13 checks passed
@piekczyk piekczyk deleted the sp/untracked/remove-adroll branch September 24, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants