Skip to content

Commit 67391a1

Browse files
mfahadahmedkellyroach-optimizely
authored andcommitted
Added Demo App's ReadMe file. (#48)
1 parent 7b212f4 commit 67391a1

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

OptimizelySDK.DemoApp/README.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# C# SDK Demo App
2+
3+
This demo uses the C# SDK, a part of Optimizely's Full Stack solution. It will walk you through:
4+
5+
1. How to bucket users into experiment's variation(s)
6+
2. How to track conversion events
7+
3. How to view the experiment’s results
8+
9+
## Demo App
10+
11+
This example App simulates an online retailer testing the effects of sorting products by price vs name.
12+
13+
Using the instructions below, you can run the app locally and mimic bucketing website visitors by selecting a users from "Select Visitor" page. For example, the user ID “Mike” would simulate a unique visitor and a specific variation would be selected for that unique visitor. The variation that is given to a specific unique visitor, such as "Mike", will be deterministic. This means as long as the experiment conditions remain the same, Mike will always get the same variation.
14+
15+
### Deploying and Running the App
16+
17+
1. Login or create an [Optimizely Account](https://app.optimizely.com/signin).
18+
2. Setup a C# project via the Optimizely dashboard. [Instructions](https://developers.optimizely.com/x/solutions/sdks/getting-started/?language=csharp)
19+
3. For the application to bucket users properly, the following values need to be defined for the experiment.
20+
* Variation Keys: The experiment must contain at least two variations with keys "sort_by_price" and "sort_by_name".
21+
* Event Key: The tracked event with key "AddToCart".
22+
4. Run the application OptimizelySDK.DemoApp.
23+
5. Click the "Demo App" link to go to the "Configuration" page.
24+
6. Provide ProjectId, ExperimentKey and EventKey values and hit Save to load the datafile of your project in ProjectConfigJson textbox. The Optimizely client is now initialized with your project configuration and is ready to serve the requests.
25+
7. You’re all set. Play around and view the experiment's results!
26+
27+
To better understand this experiment, we recommend that you select a few different visitors on the "Select Visitor" page and bucket them into variations and simulate a conversion event by clicking the "Buy Now" button on the "Shop" page. Within a few seconds, you should see the results populate on the Optimizely results page.
28+
29+
The crux of this Full Stack experiment is bucketing users into variations and exposing them to different sorting functions. The SDK’s `Activate()` function will bucket users into a variation based on a user ID (internal id, user cookie, etc…).
30+
31+
To actually test which sorting algorithm influences increased sales, we need to track the number of clicks on the Buy Now button. We can leverage the SDK's `Track()` function for that, passing it the event key which, in our case, is "AddToCart" and the user ID.
32+
33+
Finally, the "Messages" page lists the logs generated by Optimizely SDK in chronological order.
34+
35+
## Getting Help!
36+
37+
* Developer Docs: https://developers.optimizely.com/x/solutions/sdks/reference/index.html?language=csharp
38+
* Questions? Shoot us an email at [email protected]

0 commit comments

Comments
 (0)