Skip to content

Commit

Permalink
refactor: drop va tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
big-kahuna-burger committed Oct 23, 2024
1 parent fa866f1 commit 9bfdfd7
Show file tree
Hide file tree
Showing 11 changed files with 9,214 additions and 30,524 deletions.
23,085 changes: 0 additions & 23,085 deletions package-lock.json

This file was deleted.

16,597 changes: 9,208 additions & 7,389 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions services/idp/api/serverless.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { hostname, protocol, port, pathname } = parsedHost
if (pathname === '/') {
throw new Error(
'You should provide a path/prefix for the issuer. ' +
"Can't mount it to root. In env vars ISSUER=https://mydomain.com/oidc"
"Can't mount it to root. In env vars ISSUER=https://mydomain.com/oidc"
)
}

Expand Down Expand Up @@ -43,7 +43,6 @@ app.register(appService, {
oidc: provider,
Account,
AccountErrors,
isVercel: true,
localKeySet,
MANAGEMENT_API: MANAGEMENT,
InteractonsAPI,
Expand Down
1 change: 0 additions & 1 deletion services/idp/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export default async function runme(fastify, opts) {
extName: 'ejs',
defaultContext: {
uid: '',
vercel: opts.isVercel,
showDebug: process.env.GRANTS_DEBUG,
title: ''
}
Expand Down
11 changes: 1 addition & 10 deletions services/idp/ejs-templates/interaction.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,8 @@
<% } %>
</ul>
<% if(vercel) { %>
<script nonce="<%= nonce %>">
function vaTrack() {
va('event', {
name: 'Consent'
})
}
</script>
<% } %>
<form autocomplete="off" action="/interaction/<%= uid %>/confirm" method="post">
<button autofocus type="submit" class="login login-submit" <% if (vercel) { %> onclick="vaTrack()" <% } %>>Continue</button>
<button autofocus type="submit" class="login login-submit">Continue</button>
<div class="login-help">
<a href="/interaction/<%= uid %>/abort">[ Cancel ]</a>
</div>
Expand Down
12 changes: 0 additions & 12 deletions services/idp/ejs-templates/layout.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,6 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="preconnect" href="https://unpkg.com">
<% if (vercel) { %>
<script nonce="<%= nonce %>">
window.si = window.si || function() {
(window.siq = window.siq || []).push(arguments);
};
window.va = window.va || function() {
(window.vaq = window.vaq || []).push(arguments);
};
</script>
<script defer src="/_vercel/speed-insights/script.js"></script>
<script defer src="/_vercel/insights/script.js"></script>
<% } %>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
Expand Down
13 changes: 2 additions & 11 deletions services/idp/ejs-templates/login.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<% if (error) { %>
<p id="error" class="red"><%= error %></p>
<% } %>
<button type="submit" class="login login-submit" <% if (vercel) { %> onclick="vaTrack()" <% } %>>Continue</button>
<button type="submit" class="login login-submit">Continue</button>
</form>
<% } %>
<div class="login-help">
Expand All @@ -54,13 +54,4 @@
Don't have an account? <a href="/interaction/<%= uid %>/register">Sign up</a>
</div>
<% } %>
</div>
<% if(vercel) { %>
<script nonce="<%= nonce %>">
function vaTrack() {
va('event', {
name: 'Login'
})
}
</script>
<% } %>
</div>
10 changes: 2 additions & 8 deletions services/idp/ejs-templates/register.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,12 @@
<% if (error) { %>
<p id="error" class="red"><%= error %></p>
<% } %>
<button type="submit" class="login login-submit" <% if (vercel) { %> onclick="vaTrack()" <% } %>>Continue</button>
<button type="submit" class="login login-submit">Continue</button>
<div class="login-help">
<a href="/interaction/<%= uid %>/abort">[ Cancel ]</a>
<hr />
<div>
Already have an account? <a href="/interaction/<%= uid %>">Sign in</a>
</div>
</div>
</form>

<% if(vercel) { %>
<script nonce="<%= nonce %>">
function vaTrack() { va('event', { name: 'Login' }) }
</script>
<% } %>
</form>
1 change: 0 additions & 1 deletion services/manage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.1",
"@testing-library/user-event": "^14.5.2",
"@vercel/speed-insights": "^1.0.10",
"clsx": "^2.0.0",
"date-fns": "^3.0.6",
"jose": "^5.2.4",
Expand Down
4 changes: 0 additions & 4 deletions services/manage/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
name="description"
content="Web site created using create-react-app"
/>
<!-- <script>
window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };
</script>
<script defer src="/_vercel/insights/script.js"></script> -->
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
Expand Down
1 change: 0 additions & 1 deletion services/manage/src/Shell.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { AppShell, Burger, Group } from '@mantine/core'
import { useDisclosure } from '@mantine/hooks'
import { SpeedInsights } from '@vercel/speed-insights/react'
import { Outlet } from 'react-router-dom'
import { useLocation } from 'react-router-dom'
import { SelectedUserContext } from './SelectedUser.context'
Expand Down

0 comments on commit 9bfdfd7

Please sign in to comment.