-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update env guide, change type package
- Loading branch information
1 parent
a9314ee
commit 3db9b35
Showing
3 changed files
with
17 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
REACT_APP_ENDPOINT_ANALYTICS_URL=https://example.com | ||
ENDPOINT_ANALYTICS_URL=https://example.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,15 @@ | |
`npm run build` | ||
|
||
# Usage in SSR site: | ||
##### setup package: | ||
`git clone [email protected]:aesirx/analytics.git` | ||
|
||
##### create `.env` file | ||
``` | ||
ENDPOINT_ANALYTICS_URL=https://api.dashboard.aesirx.io | ||
``` | ||
##### build the tracker file: | ||
``` | ||
git clone [email protected]:aesirx/analytics.git | ||
npm install | ||
npm run build | ||
``` | ||
|
@@ -17,7 +23,10 @@ npm run build | |
# Usage in ReactJS | ||
|
||
`npm install aesirx_analytics git+ssh://[email protected]:aesirx/analytics.git#master --save-dev` | ||
|
||
##### add environment variable (`.env`) | ||
``` | ||
REACT_APP_ENDPOINT_ANALYTICS_URL=https://api.dashboard.aesirx.io | ||
``` | ||
##### with react-router-dom v5: | ||
###### create AnalyticsContainer component: | ||
``` | ||
|
@@ -36,7 +45,10 @@ export default AnalyticsContainer; | |
# Usage in NextJS | ||
|
||
`npm install aesirx_analytics git+ssh://[email protected]:aesirx/analytics.git#master --save-dev` | ||
|
||
##### add environment variable (`.env`) | ||
``` | ||
NEXT_PUBLIC_ENDPOINT_ANALYTICS_URL=https://api.dashboard.aesirx.io | ||
``` | ||
##### with next/router: | ||
###### using in app.js: | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters