Skip to content

Commit

Permalink
add CN docs
Browse files Browse the repository at this point in the history
  • Loading branch information
thehung111 committed Dec 5, 2022
1 parent 6dae3e0 commit 2757b59
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doc/ProductSearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ ProductSearch productSearch = new ProductSearch
.build(context);
```

For searches in China, please change the endpoint to `https://search.visenze.com.cn`.

## 3. Solution APIs

There are two main APIs provided in this suite, one allows searching for products based on an image input, the other searches using a product's ID (Recommendations API). A product's ID can be retrieved from a [Search Result](#4-search-results).
Expand Down Expand Up @@ -528,6 +530,11 @@ ProductSeach productSearch = SearchAPI.getProductSearchInstance();
Tracker tracker = productSearch.newTracker();
```

For China, please change the tracker to:
```
Tracker tracker = productSearch.newTracker(true);
```

### 7.2 Send Events

Currently we support the following event actions: `click`, `view`, `product_click`, `product_view`, `add_to_cart`, and `transaction`. The `action` parameter can be an arbitrary string and custom events can be sent.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ public Tracker newTracker() {
return newTracker(null, false);
}

public Tracker newTracker(boolean useCnEndpoint) {
return newTracker(null, useCnEndpoint);
}

public Tracker newTracker(String code) {
return newTracker(code, false);
}
Expand Down

0 comments on commit 2757b59

Please sign in to comment.