Skip to content

Commit

Permalink
[feat] Add new tracking script (rb2b) (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
mihran113 authored Dec 5, 2024
1 parent ef91628 commit 8689793
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 14 deletions.
2 changes: 0 additions & 2 deletions components/Demos/Demos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ const Demos = () => {
>
Play with Aim before installing it! Check out our demos to see the
full functionality
<img referrerPolicy="no-referrer-when-downgrade"
src="https://static.scarf.sh/a.png?x-pxid=8b1927ba-96ec-4c48-9ee9-6037a9b3dbe5"/>
</Text>
<DemosList>
{demosList.map(({ title, description, name, url, imgSrc }) => {
Expand Down
2 changes: 0 additions & 2 deletions components/Features/Features.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ const Features = () => {
<Text as="p" css={{ marginBottom: '24px', textAlign: 'center' }}>
Aim provides a performant and beautiful UI for exploring and comparing
training runs, prompt sessions.
<img referrerPolicy="no-referrer-when-downgrade"
src="https://static.scarf.sh/a.png?x-pxid=8b1927ba-96ec-4c48-9ee9-6037a9b3dbe5"/>
</Text>
{stepsList.map(({ name, title, list }) => {
return (
Expand Down
2 changes: 0 additions & 2 deletions components/Hero/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ const Hero = () => {
</Text>
) enables a UI to compare & observe them and SDK to query them
programmatically.
<img referrerPolicy="no-referrer-when-downgrade"
src="https://static.scarf.sh/a.png?x-pxid=8b1927ba-96ec-4c48-9ee9-6037a9b3dbe5"/>
</Text>
<Button
css={{ marginBottom: '$12' }}
Expand Down
2 changes: 0 additions & 2 deletions components/PricingCard/PricingCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ const PricingCard: FC<IPricingCard> = ({
{/**/}
<th>
<Text as='h2' size={5} css={{ marginBottom: '$6' }}>Plans & Features</Text>
<img referrerPolicy="no-referrer-when-downgrade"
src="https://static.scarf.sh/a.png?x-pxid=8b1927ba-96ec-4c48-9ee9-6037a9b3dbe5"/>
</th>
{/*free plan*/}
<th>
Expand Down
2 changes: 0 additions & 2 deletions components/QuickStart/QuickStart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ const QuickStart = () => {
documentation
</a>{' '}
to learn more
<img referrerPolicy="no-referrer-when-downgrade"
src="https://static.scarf.sh/a.png?x-pxid=8b1927ba-96ec-4c48-9ee9-6037a9b3dbe5"/>
</Text>
</QuickStartInner>
</Container>
Expand Down
38 changes: 38 additions & 0 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
// @ts-nocheck
import Layout from 'components/Layout/Layout';

import { useEffect } from 'react';

const App = ({ Component, pageProps }) => {
useEffect(() => {
// Directly adding your script content here
(function () {
let reb2b = window.reb2b || [];
window.reb2b = reb2b;
if (reb2b.invoked) return;
reb2b.invoked = true;
reb2b.methods = ["identify", "collect"];
reb2b.factory = function (method: string) {
return function () {
let args = Array.prototype.slice.call(arguments);
args.unshift(method);
reb2b.push(args);
return reb2b;
};
};
for (let i = 0; i < reb2b.methods.length; i++) {
let key = reb2b.methods[i];
reb2b[key] = reb2b.factory(key);
}
reb2b.load = function (key: string) {
let script = document.createElement("script");
script.type = "text/javascript";
script.async = true;
script.src = "https://s3-us-west-2.amazonaws.com/b2bjsstore/b/" + key + "/reb2b.js.gz";
let first = document.getElementsByTagName("script")[0];
if (first && first.parentNode) {
first.parentNode.insertBefore(script, first);
}
};
reb2b.SNIPPET_VERSION = "1.0.1";
reb2b.load("4N210HE2MG6Z");
})();
}, []);

return (
<Layout>
<Component {...pageProps} />
Expand Down
2 changes: 0 additions & 2 deletions pages/about-us.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ const About = () => {
the problem of building AI Metadata Infrastructure. AI Metadata is
A LOT, it’s multidimensional and heterogeneous. We Aim to help
build world’s best AI Metadata systems.
<img referrerPolicy="no-referrer-when-downgrade"
src="https://static.scarf.sh/a.png?x-pxid=8b1927ba-96ec-4c48-9ee9-6037a9b3dbe5"/>
</Text>
</Flex>
</Container>
Expand Down
2 changes: 0 additions & 2 deletions pages/blog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ export default function Blog() {
css={{ textAlign: 'center', my: '$10' }}
>
Recent Articles
<img referrerPolicy="no-referrer-when-downgrade"
src="https://static.scarf.sh/a.png?x-pxid=8b1927ba-96ec-4c48-9ee9-6037a9b3dbe5"/>
</Text>

<BlogList blogList={totalPosts()} />
Expand Down

0 comments on commit 8689793

Please sign in to comment.