Skip to content

Commit

Permalink
Improve docs and add note about environment reset
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospassos authored Jan 5, 2021
1 parent d137e2d commit 581b7c9
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 12 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ A single line of code gives you a fully-featured devkit for building natively pe

## Getting Started

> In this example, we will use CodePen to avoid installing a web server locally.
> 🏖️ **Just for your convenience**
> We will be using CodePen for all of the examples in this tutorial because it lets you play with them right in the browser.
Follow the steps below to connect the playground with CodePen:

Expand All @@ -61,8 +62,9 @@ Follow the steps below to connect the playground with CodePen:
<img src="https://user-images.githubusercontent.com/943036/99390593-a8242780-28b7-11eb-8966-761aea2b3b3d.gif" alt="Connecting" title="Connecting" width="600" />
</p>

> You will typically use an API key to connect to your development, staging, or production environments in real cases,
> but you can also use a local URL, such as `https://localhost/myapp`.
> 💡️ **Hint**
> You will typically use an API key to connect to your development, staging, or production environments in real cases,
> but you can also use a local URL, such as `https://localhost/myapp`.
Now, try evaluating the expression below:

Expand Down
5 changes: 3 additions & 2 deletions docs/evaluator.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ This method evaluates an expression written in CQL.

Check out our [quick start guide](quick-start.md) for an introduction to what is CQL and how it works.

> **Notice**
> Currently, we impose a hard limit of 300 character on the length of expression.
> ℹ️️ **Note**
> We currently impose a hard limit of 300 characters on the length of expression.
> We plan to remove this limitation in the near future.

### Signature

The `evaluation` method has the following signature:
Expand Down
6 changes: 3 additions & 3 deletions docs/plug.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ These are the currently supported options:

The token scope determines how the SDK synchronize the token across multiple tabs to match your application's behaviour.

> **Notice**
> ℹ️️ **Note**
> Although the SDK supports multiple identified users in different tabs, such separation does not apply
> to anonymous users. For the SDK, there is only one anonymous user per browser, regardless of the scope.
Expand Down Expand Up @@ -210,8 +210,8 @@ This method evaluates an expression written in CQL.

Check out our [quick start guide](quick-start.md) for an introduction to what is CQL and how it works.

> **Notice**
> Currently, we impose a hard limit of 300 character on the length of expression.
> ℹ️️ **Note**
> We currently impose a hard limit of 300 characters on the length of expression.
> We plan to remove this limitation in the near future.
### Signature
Expand Down
14 changes: 11 additions & 3 deletions docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ value-driven customer relationships.

## Setting Up

> For convenience, we will use CodePen for playing with the examples provided throughout this guide.
> 🏖️ **Just for your convenience**
> We will be using CodePen for all of the examples in this tutorial because it lets you play with them right in the browser.
Follow the steps below to connect the playground with CodePen:

Expand All @@ -103,8 +104,9 @@ After the page loads, you should notice an indication on the playground tab that
Switching back to the playground tab, you should see a notification saying _"Connection established"_ that indicates
the playground is now connected to the CodePen editor.

> 💡️️ **Hint**
> You will typically use an API key to connect to your development, staging, or production environments in real cases,
> but you can also use a local URL, such as `https://localhost/myapp`.
> but you can also use a local URL, such as `https://localhost/myapp`.
Now, let's get our hands dirty and play around with CQL!

Expand Down Expand Up @@ -166,6 +168,10 @@ Simply copy the code below and paste into the HTML panel to see it in action:
After CodePen updates the preview, you should see an alert saying _"Welcome!"_ or _"Welcome back!"_ depending on whether
it is your first time playing around with CQL on CodePen.

> 🐞 **It's not a bug. It's a feature, we swear!**
> Sessions expire after 30 minutes of inactivity in the sandbox environment, and we erase all data every hour.
> So the _returning user_ expression will only evaluate to true in that half an hour window after the session expires.
Note that you are not limited to boolean expressions only. For example, let's update the example again to show
how many sessions you have had:

Expand Down Expand Up @@ -196,7 +202,8 @@ interesting questions like:

These are just a few of the many questions you can ask based on anonymous information automatically collected by the SDK.

> Croct does not automatically collect sensitive information that can identify the user, such as GPS coordinates or
> 🛡️ **We embrace privacy by design**
> We do not automatically collect sensitive information that can identify the user, such as GPS coordinates or
> values entered in fields. We have [open-sourced the SDK](https://github.com/croct-tech/sdk-js) as an effort to bring
> more transparency about data collection.
Expand Down Expand Up @@ -430,6 +437,7 @@ Anonymize
When identifying a user, the personalization engine automatically takes care of unifying sessions and profiles
in the background without a single extra line of code.

> ⚠️ **Important**
> Never use guessable attributes as an identifier, such as email, phone, or incremental IDs. Instead,
> we strongly recommend using a cryptographically-secure UUID v4 generator.
Expand Down
2 changes: 1 addition & 1 deletion docs/tracker.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ croct.tracker.enable();

This method disables automatic event tracking.

> **Notice**
> 💡️ **Hint**
> You can still track events by calling the [`track`](#track) method even with automatic event tracking disabled.
### Signature
Expand Down

0 comments on commit 581b7c9

Please sign in to comment.