Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ relevant section below for more details.
`/api/v1/` through to `PROXY_API_URL`. If you are using this, any setting to `FLAGSMITH_API_URL` will be ignored and
the browser will use the frontend node server to send API requests. Do not prepend `api/v1/` - it will be added
automatically.
- `GOOGLE_ANALYTICS_API_KEY`: Google Analytics key to track API usage.
- `FIRST_PROMOTER_ID`: First Promoter ID for checkout affiliates.
- `ALLOW_SIGNUPS`: **DEPRECATED** in favour of `PREVENT_SIGNUP` in the API. Determines whether to prevent manual signups
without invites. Set it to any value to allow signups.
Expand Down
1 change: 0 additions & 1 deletion frontend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ module.exports = {
'describe': true,
'em': true,
'flagsmith': true,
'ga': true,
'heap': true,
'hljs': true,
'hot': true,
Expand Down
2 changes: 0 additions & 2 deletions frontend/api/dev-routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ module.exports = function setupRoutes(app) {
{ name: 'superUserCreateOnly', value: envToBool('ONLY_SUPERUSERS_CAN_CREATE_ORGANISATIONS', false) },
{ name: 'flagsmith', value: process.env.FLAGSMITH_ON_FLAGSMITH_API_KEY },
{ name: 'headway', value: process.env.HEADWAY_API_KEY },
{ name: 'ga', value: process.env.GOOGLE_ANALYTICS_API_KEY },
{ name: 'sha', value: sha },
{ name: 'fpr', value: process.env.FIRST_PROMOTER_ID },
{ name: 'sentry', value: process.env.SENTRY_API_KEY },
Expand All @@ -46,7 +45,6 @@ module.exports = function setupRoutes(app) {
{ name: 'reo', value: process.env.REO_API_KEY },
{ name: 'capterraKey', value: process.env.CAPTERRA_API_KEY },
{ name: 'hideInviteLinks', value: envToBool('DISABLE_INVITE_LINKS', false) },
{ name: 'linkedinPartnerTracking', value: envToBool('LINKEDIN_PARTNER_TRACKING', false) },
{ name: 'useSecureCookies', value: envToBool('USE_SECURE_COOKIES', true) },
{ name: 'cookieSameSite', value: process.env.USE_SECURE_COOKIES },
{ name: 'cookieAuthEnabled', value: process.env.COOKIE_AUTH_ENABLED },
Expand Down
7 changes: 0 additions & 7 deletions frontend/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ app.get('/config/project-overrides', (req, res) => {
},
{ name: 'flagsmith', value: process.env.FLAGSMITH_ON_FLAGSMITH_API_KEY },
{ name: 'headway', value: process.env.HEADWAY_API_KEY },
{ name: 'ga', value: process.env.GOOGLE_ANALYTICS_API_KEY },
{ name: 'sha', value: sha },
{ name: 'fpr', value: process.env.FIRST_PROMOTER_ID },
{ name: 'sentry', value: process.env.SENTRY_API_KEY },
Expand Down Expand Up @@ -105,10 +104,6 @@ app.get('/config/project-overrides', (req, res) => {
name: 'hideInviteLinks',
value: envToBool('DISABLE_INVITE_LINKS', false),
},
{
name: 'linkedinPartnerTracking',
value: envToBool('LINKEDIN_PARTNER_TRACKING', false),
},
{ name: 'useSecureCookies', value: envToBool('USE_SECURE_COOKIES', true) },
{ name: 'cookieSameSite', value: process.env.USE_SECURE_COOKIES },
{ name: 'cookieAuthEnabled', value: process.env.COOKIE_AUTH_ENABLED },
Expand Down Expand Up @@ -292,10 +287,8 @@ app.post('/api/webflow/webhook', (req, res) => {

// Catch all to render index template
app.get('/', (req, res) => {
const linkedin = process.env.LINKEDIN || ''
return res.render('index', {
isDev,
linkedin,
})
})

Expand Down
6 changes: 0 additions & 6 deletions frontend/common/stores/account-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,6 @@ const controller = {
})
}
}

if (Project.linkedinConversionId) {
window.lintrk?.('track', {
conversion_id: Project.linkedinConversionId,
})
}
})
},
deleteOrganisation: () => {
Expand Down
1 change: 0 additions & 1 deletion frontend/common/stores/feature-list-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ const controller = {
},
value: flag.name,
})
window.lintrk?.('track', { conversion_id: 16798354 })
} else {
flagsmith.trackEvent('feature_created', {
metadata: {
Expand Down
1 change: 0 additions & 1 deletion frontend/common/stores/organisation-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ const controller = {
.then((res) => createSampleUser(res, envName, project))
}),
).then((res) => {
window.lintrk?.('track', { conversion_id: 16798346 })
project.environments = res
store.model.projects = store.model.projects.concat(project)
getStore().dispatch(projectService.util.invalidateTags(['Project']))
Expand Down
1 change: 0 additions & 1 deletion frontend/env/project_prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ const Project = {
region: 'eu1',
},

linkedinConversionId: 16798338,
// This is used for Sentry tracking
maintenance: false,
plans: {
Expand Down
13 changes: 0 additions & 13 deletions frontend/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,8 @@ export type OpenConfirm = {
noText?: string
}
import { TooltipProps } from './web/components/Tooltip'
declare namespace UniversalAnalytics {
interface PageviewFieldsObject {
hitType: 'pageview' | 'event'
location?: string
page?: string
title?: string
[key: string]: any
}
}
export declare const openModal: (name?: string) => Promise<void>
declare global {
function ga(
command: 'send',
fields: UniversalAnalytics.PageviewFieldsObject,
): void
const openModal: (
title: ReactNode,
body?: ReactNode,
Expand Down
3 changes: 0 additions & 3 deletions frontend/web/index.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,4 @@
<!--This is inserted by webpack in production-->
<script src="/main.js"></script> {{/if}}
</body>
{{#if linkedin}}
<script type="text/javascript"> _linkedin_partner_id = "{{linkedin}}"; window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || []; window._linkedin_data_partner_ids.push(_linkedin_partner_id); </script><script type="text/javascript"> (function(){var s = document.getElementsByTagName("script")[0]; var b = document.createElement("script"); b.type = "text/javascript";b.async = true; b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js"; s.parentNode.insertBefore(b, s);})(); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid={{linkedin}}&fmt=gif" /> </noscript>
{{/if}}
</html>
24 changes: 3 additions & 21 deletions frontend/web/project/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,6 @@ const API = {
'first_events',
)?.catch(() => {})
}
if (Project.ga) {
ga('send', {
eventAction: data.event,
eventCategory: data.category,
eventLabel: data.label,
hitType: 'event',
})
}
if (Project.amplitude) {
amplitude.track(data.event, {
category: data.category,
Expand All @@ -325,19 +317,9 @@ const API = {
}
},

// `path` overrides the reported location, e.g. for removing
// tokens in URLs
trackPage(title: string, path?: string): void {
if (Project.ga)
ga('send', {
hitType: 'pageview',
location: path
? `${document.location.origin}${path}`
: document.location.href,
page: path ?? document.location.pathname,
title,
})
},
// Page views were only sent to Universal Analytics. Removed with its callers
// in a follow-up.
trackPage(): void {},

trackTraits(traits: Record<string, any>): void {
try {
Expand Down
31 changes: 0 additions & 31 deletions frontend/web/project/libs.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,6 @@ window.NavLink = NavLink;
// Analytics — not loaded in E2E runs, where widgets can overlay the UI
const disableThirdPartyScripts = !!window.E2E

if (Project.ga && !disableThirdPartyScripts) {
(function (i, s, o, g, r, a, m) {
i.GoogleAnalyticsObject = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments);
}, i[r].l = 1 * new Date(); a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m);
}(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'));
ga('create', Project.ga, 'auto');
}

if (typeof SENTRY_RELEASE_VERSION !== 'undefined' && Project.sentry && typeof Sentry !== 'undefined') {
Sentry.init({
dsn: Project.sentry,
Expand All @@ -63,27 +53,6 @@ if (typeof SENTRY_RELEASE_VERSION !== 'undefined' && Project.sentry && typeof Se
});
}

if(Project.linkedinPartnerTracking) {
const _linkedin_partner_id = "5747572";
window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];
window._linkedin_data_partner_ids.push(_linkedin_partner_id);
(function(l) {
if (!l){window.lintrk = function(a,b){window.lintrk.q.push([a,b])};
window.lintrk.q=[]}
var s = document.getElementsByTagName("script")[0];
var b = document.createElement("script");
b.type = "text/javascript";b.async = true;
b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js";
s.parentNode.insertBefore(b, s);})(window.lintrk);
var img = document.createElement("img");
img.setAttribute("height", "1");
img.setAttribute("width", "1");
img.setAttribute("style", "display:none;");
img.setAttribute("alt", "");
img.setAttribute("src", "https://px.ads.linkedin.com/collect/?pid=5747572&fmt=gif");
document.body.appendChild(img);
}

if(Project.hubspot && !disableThirdPartyScripts) {
// Must be set before the script loads. The chat widget is loaded by
// common/loadChat behind the hubspot_chat flag, not by chatflow targeting.
Expand Down
Loading