Skip to content

Commit

Permalink
Merge pull request #1826 from newrelic/tabatha/io-crazyegg
Browse files Browse the repository at this point in the history
chore: add crazyegg script to i/o
  • Loading branch information
tabathadelane authored Oct 28, 2021
2 parents f71956f + 82227a3 commit a6d5957
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/components/DevSiteSeo.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ function DevSiteSeo({ description, meta, title, tags, location, type }) {
`
);

const crazyEgg = (location) => {
if (location.pathname === '/instant-observability/') {
return (
<script
type="text/javascript"
src="//script.crazyegg.com/pages/scripts/0045/9836.js"
async="async"
/>
);
}
};

const metaDescription = description || site.siteMetadata.description;

const globalMetadata = [
Expand Down Expand Up @@ -78,6 +90,7 @@ function DevSiteSeo({ description, meta, title, tags, location, type }) {

return (
<SEO location={location} title={title} type={type}>
{crazyEgg(location)}
{validMetadata.map((data, index) => (
<meta key={`${data.name}-${index}`} {...data} />
))}
Expand Down

0 comments on commit a6d5957

Please sign in to comment.