Skip to content

Commit

Permalink
Remove adroll (#4029)
Browse files Browse the repository at this point in the history
* Remove adroll

* related stuff removal

* bring back cookie info

* Update public/locales/cn/common.json

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
piekczyk and coderabbitai[bot] authored Sep 24, 2024
1 parent b7d9bfd commit f818ae4
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 62 deletions.
2 changes: 0 additions & 2 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ COMMIT_SHA="dev"
# Analitycs
MIXPANEL_ENV="development"
MIXPANEL_KEY="b10b850880cb0a8557d878c2e6024d03"
ADROLL_ADV_ID="5VWGFTJXUZF6BPUDCH3WWM"
ADROLL_PIX_ID="4PSXWPAQTJEIXJSPHJCRW4"

# RPCs
INFURA_PROJECT_ID="de82b2d602264e4fbc0929dec0c45baa"
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/aws-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ jobs:
--build-arg AJNA_SUBGRAPH_V2_URL_GOERLI=${{ secrets.AJNA_SUBGRAPH_V2_URL_GOERLI }} \
--build-arg MIXPANEL_ENV=production \
--build-arg MIXPANEL_KEY=${{ secrets.MIXPANEL_KEY_PROD }} \
--build-arg ADROLL_ADV_ID=${{ secrets.ADROLL_ADV_ID_PROD }} \
--build-arg ADROLL_PIX_ID=${{ secrets.ADROLL_PIX_ID_PROD }} \
--build-arg MAINNET_CACHE_URL=${{ secrets.MAINNET_CACHE_URL_PROD }} \
--build-arg INFURA_PROJECT_ID=${{ secrets.INFURA_PROJECT_ID_PROD }} \
--build-arg ETHERSCAN_API_KEY=${{ secrets.ETHERSCAN_API_KEY }} \
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/aws-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:

- name: Check required secrets
env:
ADROLL_ADV_ID_STAGING: ${{ secrets.ADROLL_ADV_ID_STAGING }}
ADROLL_PIX_ID_STAGING: ${{ secrets.ADROLL_PIX_ID_STAGING }}
AJNA_SUBGRAPH_URL_GOERLI: ${{ secrets.AJNA_SUBGRAPH_URL_GOERLI }}
AJNA_SUBGRAPH_URL_STAGING: ${{ secrets.AJNA_SUBGRAPH_URL_STAGING }}
AJNA_SUBGRAPH_V2_URL_GOERLI: ${{ secrets.AJNA_SUBGRAPH_V2_URL_GOERLI }}
Expand All @@ -48,7 +46,7 @@ jobs:
NEWSLETTER_PUBLICATION_ID: ${{ secrets.NEWSLETTER_PUBLICATION_ID }}
NEWSLETTER_ENDPOINT: ${{ secrets.NEWSLETTER_ENDPOINT }}
run: |
required_secrets=("AJNA_SUBGRAPH_URL_STAGING" "AJNA_SUBGRAPH_URL_GOERLI" "AJNA_SUBGRAPH_V2_URL_STAGING" "AJNA_SUBGRAPH_V2_URL_GOERLI" "MIXPANEL_KEY_STAGING" "ADROLL_ADV_ID_STAGING" "ADROLL_PIX_ID_STAGING" "MAINNET_CACHE_URL_STAGING" "INFURA_PROJECT_ID_STAGING" "ETHERSCAN_API_KEY" "BLOCKNATIVE_API_KEY_STAGING" "SENTRY_AUTH_TOKEN" "PRODUCT_HUB_KEY" "ONE_INCH_API_KEY_STAGING" "ONE_INCH_API_URL_STAGING" "REFERRAL_SUBGRAPH_URL_STAGING" "NEWSLETTER_API_KEY" "NEWSLETTER_PUBLICATION_ID" "NEWSLETTER_ENDPOINT")
required_secrets=("AJNA_SUBGRAPH_URL_STAGING" "AJNA_SUBGRAPH_URL_GOERLI" "AJNA_SUBGRAPH_V2_URL_STAGING" "AJNA_SUBGRAPH_V2_URL_GOERLI" "MIXPANEL_KEY_STAGING" "MAINNET_CACHE_URL_STAGING" "INFURA_PROJECT_ID_STAGING" "ETHERSCAN_API_KEY" "BLOCKNATIVE_API_KEY_STAGING" "SENTRY_AUTH_TOKEN" "PRODUCT_HUB_KEY" "ONE_INCH_API_KEY_STAGING" "ONE_INCH_API_URL_STAGING" "REFERRAL_SUBGRAPH_URL_STAGING" "NEWSLETTER_API_KEY" "NEWSLETTER_PUBLICATION_ID" "NEWSLETTER_ENDPOINT")
fail=false
for secret in "${required_secrets[@]}"; do
secret_value=$(printenv $secret)
Expand Down Expand Up @@ -99,8 +97,6 @@ jobs:
AJNA_SUBGRAPH_V2_URL_GOERLI: ${{ secrets.AJNA_SUBGRAPH_V2_URL_GOERLI }}
MIXPANEL_ENV: staging
MIXPANEL_KEY: ${{ secrets.MIXPANEL_KEY_STAGING }}
ADROLL_ADV_ID: ${{ secrets.ADROLL_ADV_ID_STAGING }}
ADROLL_PIX_ID: ${{ secrets.ADROLL_PIX_ID_STAGING }}
MAINNET_CACHE_URL: ${{ secrets.MAINNET_CACHE_URL_STAGING }}
INFURA_PROJECT_ID: ${{ secrets.INFURA_PROJECT_ID_STAGING }}
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
Expand Down Expand Up @@ -177,4 +173,4 @@ jobs:
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/OasisDEX/e2e-tests/actions/workflows/ci_e2e_tests.yml/dispatches \
-d "{\"ref\":\"main\", \"inputs\":{\"run_id\":\"${{ github.run_id }}\"}}"
echo 'See test results in https://github.com/OasisDEX/e2e-tests/actions/workflows/ci_e2e_tests.yml --> Job with RUN_ID ${{ github.run_id }} in the logs.'
echo 'See test results in https://github.com/OasisDEX/e2e-tests/actions/workflows/ci_e2e_tests.yml --> Job with RUN_ID ${{ github.run_id }} in the logs.'
2 changes: 0 additions & 2 deletions .github/workflows/dockerhub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ jobs:
docker build --build-arg COMMIT_SHA=${{ env.SHA_TAG }} \
--build-arg MIXPANEL_ENV=staging \
--build-arg MIXPANEL_KEY=${{ secrets.MIXPANEL_STAGING_KEY }} \
--build-arg ADROLL_ADV_ID=${{ secrets.ADROLL_ADV_ID_STAGING }} \
--build-arg ADROLL_PIX_ID=${{ secrets.ADROLL_PIX_ID_STAGING }} \
--build-arg MAINNET_CACHE_URL=${{ secrets.MAINNET_CACHE_URL }} \
--build-arg INFURA_PROJECT_ID=${{ secrets.INFURA_PROJECT_ID }} \
--build-arg ETHERSCAN_API_KEY=${{ secrets.ETHERSCAN_API_KEY }} \
Expand Down
4 changes: 0 additions & 4 deletions Dockerfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ ARG COMMIT_SHA='' \
AJNA_SUBGRAPH_V2_URL_GOERLI='' \
MIXPANEL_ENV='' \
MIXPANEL_KEY='' \
ADROLL_ADV_ID='' \
ADROLL_PIX_ID='' \
MAINNET_CACHE_URL='' \
SHOW_BUILD_INFO='' \
ETHERSCAN_API_KEY='' \
Expand All @@ -48,8 +46,6 @@ ENV COMMIT_SHA=$COMMIT_SHA \
AJNA_SUBGRAPH_V2_URL_GOERLI=$AJNA_SUBGRAPH_V2_URL_GOERLI \
MIXPANEL_ENV=$MIXPANEL_ENV \
MIXPANEL_KEY=$MIXPANEL_KEY \
ADROLL_ADV_ID=$ADROLL_ADV_ID \
ADROLL_PIX_ID=$ADROLL_PIX_ID \
MAINNET_CACHE_URL=$MAINNET_CACHE_URL \
ETHERSCAN_API_KEY=$ETHERSCAN_API_KEY \
BLOCKNATIVE_API_KEY=$BLOCKNATIVE_API_KEY \
Expand Down
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ git clone https://github.com/OasisDEX/oasis-borrow.git

Navigate to the project folder and install all dependencies

NOTE: to install private packages from NPM you need to have an env variable called `NPM_TOKEN` containing your personal NPM access token.
We recommend to set `NPM_TOKEN` in your `.env` file using our `.env.template`, this way you can just `source .env` before install.
NOTE: to install private packages from NPM you need to have an env variable called `NPM_TOKEN`
containing your personal NPM access token. We recommend to set `NPM_TOKEN` in your `.env` file using
our `.env.template`, this way you can just `source .env` before install.

```sh
source .env
Expand Down Expand Up @@ -136,12 +137,6 @@ PRODUCT_HUB_KEY="<any value of your choice>"
- `MIXPANEL_KEY` - The value will be used for `production` environments. This is the project key
that is generated from Mixpanel.

- `ADROLL_PIX_ID` - The value will be used for `production` environments. This is the project key
that is generated from AdRoll Pixel.

- `ADROLL_ADV_ID` - The value will be used for `production` environments. This is the project key
that is generated from AdRoll Pixel.

- `USE_TERMS_OF_SERVICE` - In order to use some functionalities the user should read and accept
Terms of Service. For development purposes, this feature can be disabled. You can disable this
feature if you'd like to remove that functionality at all. The values are either `0` (disabled) or
Expand Down
31 changes: 0 additions & 31 deletions analytics/adroll.ts

This file was deleted.

2 changes: 1 addition & 1 deletion analytics/manageCookie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { CookieName, Switch } from './common'
export const manageCookie: Record<CookieName, Switch> = {
marketing: {
enable: () => {},
disable: () => {}, // no needed since adding adRoll instance to app is 0/1 like
disable: () => {},
},
analytics: {
enable: () => mixpanel.opt_in_tracking(),
Expand Down
6 changes: 4 additions & 2 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { CacheProvider, Global } from '@emotion/core'
import { Web3OnboardProvider } from '@web3-onboard/react'
import type { AbstractConnector } from '@web3-react/abstract-connector'
import { Web3ReactProvider } from '@web3-react/core'
import { adRollPixelScript } from 'analytics/adroll'
import { COOKIE_NAMES_LOCASTORAGE_KEY } from 'analytics/common'
import { mixpanelInit } from 'analytics/mixpanel'
import { trackingEvents } from 'analytics/trackingEvents'
Expand Down Expand Up @@ -155,7 +154,10 @@ function App({ Component, pageProps }: AppProps & CustomAppProps) {
<meta name="viewport" content="width=device-width, initial-scale=1" />
</Head>
{cookiesValue?.enabledCookies?.marketing && (
<Script dangerouslySetInnerHTML={{ __html: adRollPixelScript }} async />
// Use when there is a need to load extra script required for marketing
// Example usage:
// <Script dangerouslySetInnerHTML={{ __html: scriptToBeLoaded }} async />
<></>
)}
<ThemeUIProvider theme={theme}>
<CacheProvider value={cache}>
Expand Down
2 changes: 1 addition & 1 deletion public/locales/cn/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@
"cookies": {
"marketing": {
"title": "行销 Cookies",
"description": "Summer.fi 使用来自 adRoll 的匿名 Cookies 在广告平台上重新定位营销策略。"
"description": "Summer.fi 使用匿名 Cookies 在广告平台上重新定位营销策略。"
},
"analytics": {
"title": "分析 Cookies",
Expand Down
2 changes: 1 addition & 1 deletion public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@
"cookies": {
"marketing": {
"title": "Marketing Cookies",
"description": "Summer.fi uses anonymised cookies from adRoll to be able to apply retargeting campaigns on advertising platforms."
"description": "Summer.fi uses anonymised cookies to be able to apply retargeting campaigns on advertising platforms."
},
"analytics": {
"title": "Analytics Cookies",
Expand Down
2 changes: 0 additions & 2 deletions runtime.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ const publicRuntimeConfig = {
buildDate: Date.now(),
mixpanelEnv: process.env.MIXPANEL_ENV,
mixpanelAPIKey: process.env.MIXPANEL_KEY,
adRollAdvId: process.env.ADROLL_ADV_ID,
adRollPixId: process.env.ADROLL_PIX_ID,
useTermsOfService: process.env.USE_TERMS_OF_SERVICE === '1',
useTrmApi: process.env.USE_TRM_API === '1',
showBuildInfo: process.env.SHOW_BUILD_INFO === '1',
Expand Down

0 comments on commit f818ae4

Please sign in to comment.