Skip to content

Commit 2002955

Browse files
authored
Integrate Scarf (#20)
1 parent 399f337 commit 2002955

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

src/components/common/Article.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { StaticQuery, graphql } from "gatsby";
44
import Navigation from "./Navigation";
55
import Footer from "../../components/Footer";
66
import MoreArticles from "../MoreArticles";
7+
import ScarfPixel from "../common/ScarfPixel";
78
import dataceboHorizontalLogoWhite from "../../../static/datacebo-horizontal-logo-white.svg";
89
import dataceboHorizontalLogo from "../../../static/datacebo-horizontal-logo.svg";
910

@@ -58,6 +59,7 @@ const PostDefaultLayout = ({ children, isDark = true, isPost }) => {
5859
</div>
5960
{/* <Cta /> */}
6061
<Footer />
62+
<ScarfPixel />
6163
</div>
6264
</>
6365
);

src/components/common/ScarfPixel.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import React from "react";
2+
3+
const ScarfPixel = () => {
4+
return (
5+
<>
6+
{typeof window !== "undefined" &&
7+
window.location.hostname === "datacebo.com" ? (
8+
<img
9+
referrerpolicy="no-referrer-when-downgrade"
10+
src="https://static.scarf.sh/a.png?x-pxid=af9a538f-69ef-4e05-8553-76897f21be21"
11+
/>
12+
) : (
13+
<></>
14+
)}
15+
</>
16+
);
17+
};
18+
19+
export default ScarfPixel;

0 commit comments

Comments
 (0)