Remix Analytics
Proxima Analytics integration with Remix is just as straightforward as it is with React. By utilizing the Proxima Analytics Client, you can easily integrate the Proxima tracking code into our Remix application without manually injecting it into the HTML document, making it a seamless process.
Getting Started
To get started, install the Proxima Client:
npm install @prxm/client
When the library is installed, you can proceed to create a React component that will allow you to easily integrate the Proxima tracking code into your application.
import { useEffect } from "react";
import * as client from "@prxm/client";
const Proxima = () => {
useEffect(() => {
client.init({
site: "YOUR_WEBSITE_IDENTIFIER",
});
}, []);
return null;
};
export default Proxima;
Once the React component is created, all that's left to do is to make use of it in your application.
To ensure that the component is consistently rendered, it can be added to the root component of the application, typically found in a file such as `root.tsx`
or `root.js`
.
<body>
<Proxima />
<!-- All other components -->
</body>