Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

added integrations section

Blue Mousee7525e6b96f4
diff --git a/public/locales/en.json b/public/locales/en.json
index 71344246e..e7d7f12b1 100644
--- a/public/locales/en.json
+++ b/public/locales/en.json
@@ -222,6 +222,7 @@
"start": "Getting Started",
"umd": "UMD Build",
"npm": "NPM Package",
+ "int": "Integrations",
"how": "How to..",
"pv": "Track pageviews",
"ce": "Track custom events",
@@ -230,6 +231,7 @@
"install": "You can also install the tracking script with NPM or Yarn",
"import": "Next you should import module into your project's root, for example",
"track": "After you can track anything you want.\nRead the detailed documentation on tracking params below.",
+ "integrations": "We support the following integrations (click on the title for details)",
"pv": "Swetrix.js tracking script provides a way to collect a page view event once the page has loaded.\nThis can be accomplished via calling the <link>trackViews()</link> function:",
"ce": "In addition to tracking pageviews we provide an ability to track custom events.\nFor example, if you want to track an event like 'Sign up' or 'Newsletter subscription', this feature would be very useful.\nUnder the screen, the principle of this function is similar to trackViews.",
"init": "This fuction is used to initialise the analytics.\nBasically you're letting the script know which project do you want to use it with, as well as specifying your custom parameters if needed.",
diff --git a/src/pages/Docs/Docs.jsx b/src/pages/Docs/Docs.jsx
index 3d6a7e5c0..a644e7dcd 100644
--- a/src/pages/Docs/Docs.jsx
+++ b/src/pages/Docs/Docs.jsx
@@ -19,6 +19,9 @@ const contents = (t) => [{
}, {
name: t('docs.titles.npm'),
id: 'docs-npm',
+ }, {
+ name: t('docs.titles.int'),
+ id: 'docs-int',
}]
}, {
name: t('docs.titles.how'),
@@ -45,6 +48,8 @@ const contents = (t) => [{
}]
}]
+const NEXTJS_REPO_URL = 'https://github.com/Swetrix/swetrix-nextjs'
+
const Contents = ({ t }) => {
const tContents = contents(t)
@@ -124,6 +129,19 @@ const Docs = () => {
</p>
<Code text={esExample} language='javascript' />
+ <CSection id='docs-int' name={t('docs.titles.int')} />
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
+ {t('docs.integrations')}
+ :
+ </p>
+ <ul className='ml-5 text-lg list-disc marker:text-gray-900 dark:marker:text-gray-50'>
+ <li>
+ <a href={NEXTJS_REPO_URL} className='flex hover:underline hover:opacity-80 text-indigo-600 dark:text-indigo-400 ml-1' target='_blank' rel='noopener noreferrer'>
+ Next.js
+ </a>
+ </li>
+ </ul>
+
<CHeader id='docs-ht' name={t('docs.titles.how')} />
<CSection id='docs-pv' name={t('docs.titles.pv')} />
<p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
@@ -184,11 +202,11 @@ const Docs = () => {
<hr className='mt-10 mb-4' />
<div className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
- <i>Last updated: February 9, 2022.</i><br />
+ <i>Last updated: May 4, 2022.</i><br />
<div>
- - Added documentation for the&nbsp;
- <a className='hover:underline text-gray-700' href='#docs-umd'>no-script</a>
- &nbsp;tracking.
+ - Added&nbsp;
+ <a className='hover:underline text-gray-700' href='#docs-int'>integrations</a>
+ &nbsp;section.
</div>
</div>
</div>