1.1 Purpose
Kiy.li Analytics tracks requests to sites to collect data and insights about the requests being made to sites. This can later be used for analytic insights or other purposes.
1.2 Privacy
Kiy.li Analytics does not track any private or directly personally identifiable information (PII). Kiy.li Analytics only logs page and general device information. Kiy.li Analytics does register the user's IP address.
Kiy.li Analytics also creates a user fingerprint, but only based on device information and your timezone. The user fingerprint cannot be used to indentify a person. The data on which the fingerprint is based, is hashed to create a numerical ID. This also means a User ID cannot be reverted to see the fingerprint information. Data used to generate the fingerprint may also be logged seperately without hashing.
Kiy.li Analytics will never sell your data to any third-party.
2.1 Data
Below is an overview of all shortcodes and data collected using Kiy.li Analytics
| Shortcode |
Data |
Description |
Gathered |
Introduced |
| v |
version |
Kiy.li Analytics Version |
Client-Side Payload |
v1 |
| a |
analytic id |
Analytic ID |
Client-Side Payload |
v1 |
| at |
analytic type |
Analytic Type |
Client-Side Payload |
v1 |
| url |
url |
Full URL without any parameters or fragments |
Client-Side Payload |
v1 |
| f |
full url |
Full URL including parameters |
Client-Side Payload |
v1 |
| pp |
page path |
Page path after the domain |
Client-Side Payload |
v1 |
| ul |
user language |
Preferred user language |
Client-Side Payload |
v1 |
| de |
document encoding |
Document Encoding |
Client-Side Payload |
v1 |
| pt |
page title |
Title of the page |
Client-Side Payload |
v1 |
| sr |
screen resolution |
Width and height of the screen resolution |
Client-Side Payload |
v1 |
| vp |
viewport |
Viewport Size |
Client-Side Payload |
v1 |
| je |
java enabled |
Java Enabled? |
Client-Side Payload |
v1 |
| u |
user id |
User ID (fingerprint) |
Client-Side Payload |
v1 |
| c |
client id |
Client ID |
Client-Side Payload |
v1 |
| pid |
page id |
ID based on url without params |
Client-Side Payload |
v1 |
| sid |
session id |
Session ID |
Client-Side Payload |
v1 |
| ua |
user agent |
User Agent |
Client-Side Payload |
v1 |
| t |
timestamp |
Timestamp in UNIX |
Client-Side Payload |
v1 |
| r |
referrer |
Referral Path |
Client-Side Payload |
v1 |
| fr |
in iframe |
Is page in iframe? |
Client-Side Payload |
v6 |
| cke |
cookies enabled |
Are cookies enabled? |
Client-Side Payload |
v7 |
| tch |
touch support |
Is touchscreen? |
Client-Side Payload |
v7 |
| ct |
connection type |
Effective Connection Type |
Client-Side Payload |
v7 |
| tz |
timezone |
Local timezone of user |
Client-Side Payload |
v7 |
| la |
languages |
Preferred languages, first = most preferred |
Client-Side Payload |
v7 |
| lt |
local time |
User's local time |
Client-Side Payload |
v7 |
| x |
custom data |
Optional extra data |
Client-Side Payload |
v1 |
| z |
cache buster |
Cache buster |
Client-Side Payload |
v1 |
| ip |
ip address |
User's IP Address |
Post-Request (on Endpoint) |
v1 |
| ae |
analytics endpoint |
Endpoint used for tracking |
Post-Request (on Endpoint) |
v2 |
Below is an example of payload data sent to one of the endpoints to track
v: CE1
a: 536390281823
at: pagevisit
url: https://www.google.com/
f: https://www.google.com/?this=example
pu: https://www.google.com
pp: /
ul: nl-NL
de: UTF-8
pt: Google
sr: 1707x960
vp: 1217x825
je: 0
fr: 1
cke: 1
tch: 0
ct: 4g
tz: Europe/Amsterdam
la: nl-NL,nl,en-US,en
lt: 12:42
u: 244091225366
c: 4469155605
pid: 7656186659
sid: 598372625939
ua: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
t: 1713175538
r:
z: 848869
2.2 Endpoints
Below is an overview of all endpoints Kiy.li Analytics can use to send data to the database.
Due to tracker blocking, multiple endpoints are neccessary to ensure data is transmitted to the database.
| Endpoint |
Use |
Type |
| track |
Tracking |
Primary URL |
| t |
Tracking |
Fallback URL 1 |
| puppy |
Tracking |
Fallback URL 2 |
6.1 Kiy.li Analytics Pixel
Creation
Pixels can be created on your account dashboard at https://analytics.kiy.li/account/.
The account dashboard has a section called 'Your Pixels'. This consists of a table showing pixel name, pixel id, pixel hits (how many times the pixel was triggered) and a view button.
The view button opens a popup showing the code you need to use the pixel.
The 'Your Pixels' section also has a button called '+ New Pixel'. This opens a popup where you specify the pixel name. After creation, the popup shows the specifics of the pixel, including the code required to use it.
Usage
You can start using your pixel by putting the pixel's code on your webpage(s).
Everytime someone visits that page, the pixel is loaded. This does the following:
- Increases the pixel_hits value in the database
- Adds information about the user who visited your page to Kiy.li Analytics's main tracking table.
Examples
Example of pixel code
<img referrerpolicy="unsafe-url" src="https://analytics.kiy.li/p/z7RWzwGzcY6o?cb=<?=time()?> alt="Kiy.li Analytics Pixel" style="display: none;">
We use referrerpolicy="unsafe-url" to register the full url, not just the domain.
We also append the pixel URL https://analytics.kiy.li/p/z7RWzwGzcY6o with ?cb=<?=time()?> to avoid caching.
Example of tracked data
No data is sent from the page, it is all handled on the pixel.
v: 4
a: 536390281823
at: pixelhit
ul: nl-NL,nl;q
ua: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
t: 1713175538
r: https://try.w3schools.com/try_php.php?x=0.19081656516004286
x: {"pixel_id":"z7RWzwGzcY6o"}
ip: 1.1.1.1
ae: p
Data not included in pixel tracking compared to integrated tracking:
url: https://www.google.com/
f: https://www.google.com/?this=example
pu: https://www.google.com
pp: /
de: UTF-8
pt: Google
sr: 1707x960
vp: 1217x825
je: 0
fr: 1
u: 244091225366
c: 4469155605
pid: 7656186659
sid: 598372625939
z: 848869
7.1 Communication from RIS
The Regular Integration Script communicates to allow actions to happen based on certain events.
kiy-analytics-completed
When the script execution is considered 'complete', the script will run window.dispatchEvent(new CustomEvent('kiy-analytics-completed'));.
This means the script essentially emits a message, which can be picked up from your page on which the script is externally embedded.
For example, if you want to redirect the user only when this message is sent, you can do:
// Listen for the custom event from the external script
window.addEventListener('kiy-analytics-completed', function() {
// Redirect after the script has fully loaded and sent data
window.location.href = "https://example.com/";
});
The kiy-analytics-completed event is sent on the following moments:
- The primary endpoint or a fallback endpoint returns a 200 OK (logged successfully).
- The primary endpoint and all available fallback endpoints failed (log failed, still returns the message).
So it is important to remember that kiy-analytics-completed does not mean the data was successfully logged. It also sends it if no endpoint works. This way, with the code shown above, it will still redirect the user even if the tracking data could not be transmitted, but not before trying all endpoints.
Below is a robust implementation. Note that if you depend on the kiy-analytics-completed message being sent, it will not run if the script fails to load (for example due to the server being down). The example below handles this correctly.
<script>
var script = document.createElement('script');
script.src = "https://analytics.kiy.li/js/latest.js?c=<?php echo rand(1000,99999) ?>&noPageLeave=true";
script.async = true;
document.head.appendChild(script);
// Error handler for script load failure
script.onerror = function() {
// Redirect if the script fails to load
window.location.href = "https://example.com/";
};
// Listen for the custom event from the external script
window.addEventListener('kiy-analytics-completed', function() {
// Redirect after the script has fully loaded and sent data
window.location.href = "https://example.com/";
});
</script>