Merge branch 'main' into user-table
This commit is contained in:
commit
15c39fde7f
@ -109,6 +109,11 @@ NEXT_PUBLIC_OPENPANEL_CLIENT_ID=""
|
||||
NEXT_PUBLIC_PLAUSIBLE_DOMAIN=""
|
||||
NEXT_PUBLIC_PLAUSIBLE_SCRIPT="https://plausible.io/js/script.js"
|
||||
# -----------------------------------------------------------------------------
|
||||
# Ahrefs Analytics (https://ahrefs.com)
|
||||
# https://mksaas.com/docs/analytics#ahrefs
|
||||
# -----------------------------------------------------------------------------
|
||||
NEXT_PUBLIC_AHREFS_WEBSITE_ID=""
|
||||
# -----------------------------------------------------------------------------
|
||||
# Seline Analytics
|
||||
# https://mksaas.com/docs/analytics#seline
|
||||
# -----------------------------------------------------------------------------
|
||||
|
29
src/analytics/ahrefs-analytics.tsx
Normal file
29
src/analytics/ahrefs-analytics.tsx
Normal file
@ -0,0 +1,29 @@
|
||||
'use client';
|
||||
|
||||
import Script from 'next/script';
|
||||
|
||||
/**
|
||||
* Ahrefs Analytics
|
||||
*
|
||||
* https://ahrefs.com/
|
||||
* https://mksaas.com/docs/analytics#ahrefs
|
||||
*/
|
||||
export function AhrefsAnalytics() {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
return null;
|
||||
}
|
||||
|
||||
const websiteId = process.env.NEXT_PUBLIC_AHREFS_WEBSITE_ID as string;
|
||||
if (!websiteId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Script
|
||||
async
|
||||
type="text/javascript"
|
||||
data-key={websiteId}
|
||||
src="https://analytics.ahrefs.com/analytics.js"
|
||||
/>
|
||||
);
|
||||
}
|
@ -1,12 +1,13 @@
|
||||
import { websiteConfig } from '@/config/website';
|
||||
import { Analytics as VercelAnalytics } from '@vercel/analytics/react';
|
||||
import { SpeedInsights } from '@vercel/speed-insights/next';
|
||||
import { AhrefsAnalytics } from './ahrefs-analytics';
|
||||
import DataFastAnalytics from './data-fast-analytics';
|
||||
import GoogleAnalytics from './google-analytics';
|
||||
import OpenPanelAnalytics from './open-panel-analytics';
|
||||
import { PlausibleAnalytics } from './plausible-analytics';
|
||||
import { SelineAnalytics } from './seline-analytics';
|
||||
import { UmamiAnalytics } from './umami-analytics';
|
||||
import { Analytics as VercelAnalytics } from '@vercel/analytics/react';
|
||||
import { SpeedInsights } from '@vercel/speed-insights/next';
|
||||
|
||||
/**
|
||||
* Analytics Components all in one
|
||||
@ -33,6 +34,9 @@ export function Analytics() {
|
||||
{/* plausible analytics */}
|
||||
<PlausibleAnalytics />
|
||||
|
||||
{/* ahrefs analytics */}
|
||||
<AhrefsAnalytics />
|
||||
|
||||
{/* datafast analytics */}
|
||||
<DataFastAnalytics />
|
||||
|
||||
|
@ -6,6 +6,7 @@ import Script from 'next/script';
|
||||
* DataFast Analytics
|
||||
*
|
||||
* https://datafa.st
|
||||
* https://mksaas.com/docs/analytics#datafast
|
||||
*/
|
||||
export default function DataFastAnalytics() {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
|
@ -6,6 +6,7 @@ import { GoogleAnalytics as NextGoogleAnalytics } from '@next/third-parties/goog
|
||||
* Google Analytics
|
||||
*
|
||||
* https://analytics.google.com
|
||||
* https://mksaas.com/docs/analytics#google
|
||||
* https://nextjs.org/docs/app/building-your-application/optimizing/third-party-libraries#google-analytics
|
||||
*/
|
||||
export default function GoogleAnalytics() {
|
||||
|
@ -3,6 +3,8 @@ import { OpenPanelComponent } from '@openpanel/nextjs';
|
||||
/**
|
||||
* OpenPanel Analytics (https://openpanel.dev)
|
||||
*
|
||||
* https://openpanel.dev
|
||||
* https://mksaas.com/docs/analytics#openpanel
|
||||
* https://docs.openpanel.dev/docs/sdks/nextjs#options
|
||||
*/
|
||||
export default function OpenPanelAnalytics() {
|
||||
|
@ -10,6 +10,7 @@ import Script from 'next/script';
|
||||
* you do not need to add new script to this component.
|
||||
*
|
||||
* https://plausible.io
|
||||
* https://mksaas.com/docs/analytics#plausible
|
||||
*/
|
||||
export function PlausibleAnalytics() {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
|
@ -6,6 +6,7 @@ import Script from 'next/script';
|
||||
* Seline Analytics
|
||||
*
|
||||
* https://seline.com
|
||||
* https://mksaas.com/docs/analytics#seline
|
||||
* https://seline.com/docs/install-seline
|
||||
* https://seline.com/docs/stripe
|
||||
*/
|
||||
|
@ -6,6 +6,7 @@ import Script from 'next/script';
|
||||
* Umami Analytics
|
||||
*
|
||||
* https://umami.is
|
||||
* https://mksaas.com/docs/analytics#umami
|
||||
*/
|
||||
export function UmamiAnalytics() {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
|
Loading…
Reference in New Issue
Block a user