Skip to content

Commit 725589e

Browse files
committed
readme
1 parent ee28fc8 commit 725589e

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,45 @@
11
# tinytag
22

3+
This is a use-at-your-own-risk super-lightweight javascript SDK for use with RudderStack or Segment (and maybe works with others). Minimal functionality, intentionally so. Goal is to load and run super fast to only serverside destinations (mostly data warehouse)
4+
5+
### Does
6+
- Support standard (`page`, `track`, `identify`, `group`) APIs
7+
- Handle retries
8+
- Use 1st party (client set) cookies for `anonymousId`, `userId`, and `traits`
9+
- Use RudderStack or Segment cookies if they exist
10+
- Send to any cloud mode (server-to-server) destination
11+
12+
### Does not
13+
- Support device mode (client-side) integrations
14+
- Handle sessions
15+
- Handle consent
16+
- Come with any support (but you can make a PR)
17+
18+
## Setup
19+
Run your install
20+
`npm install`
21+
22+
Normal tasks in `package.json` include:
23+
24+
`npm run build` to build from src
25+
`npm test` to run test suite (it's thin for now)
26+
27+
## Usage
28+
Install and customize and build whatever you want, or you can use the most recent from CDN:
29+
`https://d1naog1jhl3jaq.cloudfront.net/tt.js`
30+
31+
To use on your website:
32+
```
33+
A snippet will go here
34+
Eventually
35+
```
36+
37+
Use your own RudderStack or Segment `writeKey` and `dataPlaneUrl` in the `init` and you're off to the races with the standard API spec.
38+
39+
- `window.tt.page()`
40+
- `window.tt.track('event_name', { properties: 'here' })`
41+
- `window.tt.identify('userId', { traits: 'here' })`
42+
- `window.tt.group()`
43+
44+
For now, it reads Segment cookies and uses if they exist. Also checks RudderStack but (TODO) needs to decrypt/decode both types.
45+

0 commit comments

Comments
 (0)