Skip to content

Commit

Permalink
feat: replace tessen with browser agent
Browse files Browse the repository at this point in the history
  • Loading branch information
tabathadelane committed Jan 18, 2024
1 parent 525eee6 commit fb0ebe5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 22 deletions.
15 changes: 0 additions & 15 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,21 +96,6 @@ module.exports = {
errorBeacon: 'staging-bam-cell.nr-data.net',
},
},
tessen: {
tessenVersion: '1.14.0',
product: 'DEV',
subproduct: 'TDEV',
segmentWriteKey: 'Ako0hclX8WGHwl9rm4n5uxLtT4wgEtuU',
trackPageViews: true,
pageView: {
eventName: 'pageView',
category: 'DocPageView',
getProperties: ({ location, env }) => ({
path: location.pathname,
env: env === 'production' ? 'prod' : env,
}),
},
},
},
},
{
Expand Down
3 changes: 0 additions & 3 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,5 @@ exports.onCreateWebpackConfig = ({ actions, plugins }) => {
// recommendation:
// https://github.com/escaladesports/legacy-gatsby-plugin-prefetch-google-fonts/issues/18
plugins: [plugins.normalModuleReplacement(/^\.\/node\.js/, './browser.js')],
externals: {
tessen: 'Tessen',
},
});
};
1 change: 0 additions & 1 deletion src/components/DevSiteSeo.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ function DevSiteSeo({ description, meta, title, tags, location, type }) {
{validMetadata.map((data, index) => (
<meta key={`${data.name}-${index}`} {...data} />
))}
<script src={withPrefix('tessen.min-1.3.0.js')} type="text/javascript" />
</SEO>
);
}
Expand Down
9 changes: 6 additions & 3 deletions src/components/SignupLink.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';
import { useLocation } from '@reach/router';
import { useLocale, useTessen, Icon } from '@newrelic/gatsby-theme-newrelic';
import {
useLocale,
addPageAction,

Check failure on line 6 in src/components/SignupLink.js

View workflow job for this annotation

GitHub Actions / Run Eslint

addPageAction not found in '@newrelic/gatsby-theme-newrelic'
Icon,
} from '@newrelic/gatsby-theme-newrelic';
import { localizePath } from '../utils/localizePath';
import { css } from '@emotion/react';

Expand All @@ -17,7 +21,6 @@ const formatHref = (href, { locale }) => {

const SignUpLink = forwardRef(
({ href, onClick, instrumentation, ...props }, ref) => {
const tessen = useTessen();
const location = useLocation();
const locale = useLocale();

Expand All @@ -34,7 +37,7 @@ const SignUpLink = forwardRef(
onClick(e);
}

tessen.track({
addPageAction({
eventName: 'stitchedPathLinkClick',
category: 'DocPageLinkClick',
href,
Expand Down

0 comments on commit fb0ebe5

Please sign in to comment.