You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-2Lines changed: 16 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,14 +11,14 @@ First of all, you need a valid API-key, which you can get for free at [https://w
11
11
12
12
**772A-47D7-93A3-4EA9-9D73-85B9-479B-16C6**
13
13
14
-
There are currently two different end-points available through the API. The first one is used to send data - so called activities - to the engine, whereas the second one is used to retrieve data from it (lookup).
14
+
There are currently three different end-points available through the API. The first one is used to send data - so called activities - to the engine, whereas the second is used to retrieve temporal data from the engine for a visitor (e.g., the current city, weather, or the current timezone, or the current holidays), and the last one is used to look up detailed information about your visitor (e.g., first name).
15
15
16
16
The following code-snippet shows how easy it is to utilize the different end-points:
**Note**: We provide a specific library to be used with node, see [here](https://www.npmjs.com/package/breinify-node).
40
+
39
41
##### Download the library directly from GitHub
40
42
41
43
or just download the version from [GitHub](https://raw.githubusercontent.com/Breinify/brein-api-library-javascript-browser/master/dist/breinify-api.min.js) directly.
@@ -102,6 +104,22 @@ A full list of the available utility functions (*Breinify.UTL*) and there purpos
102
104
103
105
##### Placing look-up triggers
104
106
107
+
Temporal data can be used to personalize your content, e.g., to change the appearance of the site regarding holidays (even local holidays), weather, part of time (e.g., afternoon, evening), or events.
108
+
109
+
```html
110
+
<script>
111
+
Breinify.UTL.events.pageloaded(function () {
112
+
Breinify.temporalData(function (data) {
113
+
if (!Breinify.UTL.isEmpty(data)) {
114
+
window.alert('It is currently '+data.weather.temperature);
115
+
}
116
+
});
117
+
}
118
+
</script>
119
+
```
120
+
121
+
##### Placing look-up triggers
122
+
105
123
Look-ups are used, e.g., to change the appearance of the site, increase the quality of service by enhancing recommendations or pre-filtering search results. In the following simple example, the site's message is adapted when the page is loaded.
0 commit comments