diff --git a/website/docs/website/framework/_category_.json b/website/docs/website/framework/_category_.json new file mode 100644 index 0000000..70ae7f4 --- /dev/null +++ b/website/docs/website/framework/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Framework", + "position": 2 +} diff --git a/website/docs/website/framework/docusaurus.md b/website/docs/website/framework/docusaurus.md new file mode 100644 index 0000000..326a146 --- /dev/null +++ b/website/docs/website/framework/docusaurus.md @@ -0,0 +1,26 @@ +--- +sidebar_position: 1 +--- + +# Use in Docusaurus + +In `docusaurus.config.js`: + + +```js +/** @type {import('@docusaurus/types').Config} */ +const config = { + // ... + + scripts: [ + { + src: 'https:///tracker.js', + async: true, + defer: true, + 'data-website-id': '', + }, + ], +}; + +module.exports = config; +``` diff --git a/website/docs/website/track-script.md b/website/docs/website/track-script.md index c411f31..0489b3b 100644 --- a/website/docs/website/track-script.md +++ b/website/docs/website/track-script.md @@ -14,13 +14,13 @@ the script look like below: ``` -you can get this script code from your tianji website list +you can get this script code from your **Tianji** website list ## Report Event -Tianji provide a simple way to report user click event, its easy to help you track which action user like and often to use. +**Tianji** provide a simple way to report user click event, its easy to help you track which action user like and often to use. -This is a very common method in website analysis. You can use it quickly get it by using tianji. +This is a very common method in website analysis. You can use it quickly get it by using **Tianji**. After you inject script code into your website, you just need add a `data-tianji-event` in dom attribute.