.io documentation | General

Accurate Tracking

If your website's design often changes or you have pages with different layouts, use our attributes to get the most accurate data tracking.
With the help of attributes our system will always be able to find necessary data and correctly identify the author/section.
Attributes to use:
If you don't want to indicate the real author's name, you may put ID instead, and use JSON file to send us the list of authors hidden behind the IDs.
Link to JSON file should be sent to your Customer Success Manager or io.support@onthe.io

AJAX

If your website based on AJAX technology, you need to execute function below on every move event:
(function(){try{ _io_init_async(); }catch(a){}})();

Application tracking

Sending data is as simple as sending simple HTTPS GET requests.
Exmaple of regular request:
https://tt.onthe.io/?k[]={app_id}:pageviews[page:Some article title,category:SPORT, ...]&s=a63fa7bd0cb420398c55518ee76b0a3f.
Param pageviews we call a metric, and page and category are slices.
Slices values sent to the t system should not contain commas ( , ) or colons ( : ). Commas and colons should be replaced by #44; and #58; accordingly. All values in slices should be URL-encoded and have UTF-8 encoding.

Slices *Required slices

Slice Description Example
page* Article title Breaking news#58; Project General has been connected to io analytics system
category Article category (or section) SPORT
author Article author. If page is article or news, slice author is required John Doe
previous_page Previous page title, from which the user came. If there is no such a page - this slice should be omitted; If user came from the main page - the value of this slice will be Main Page Breaking news#58; Project General wants to be connected to io analytics system
platform Platform of the app iOS
referrer Referrer It's required to set referrer value to app for application
domain Domain {hostname}
url Article pathname /some/article/url

Pageviews

Metric pageviews should be sent when the user opens an article.

Read finished

Metric read_finished should be sent if user read the article to the end.

Uniques

Metric uniques should be sent only if user opened the app for the first time during 24 hours.

Time

Metric time This metric should be sent every 10 seconds after the user opened an article. This metric shows how much time did the user spend on a page. This metric should contain only one slice - page.

Articles Tracking

If your website's design often changes or you have pages with different layouts, use our attributes to get the most accurate data tracking.
With the help of attributes our system will always be able to find necessary data and correctly identify the author/section.
Attributes to use:
If you don't want to indicate the real author's name, you may put ID instead, and use JSON file to send us the list of authors hidden behind the IDs.
Link to JSON file should be sent to your Customer Success Manager or io.support@onthe.io

Authors ID

If you don't want to show your authors or categories on a page but you have an id of the authors and you want to track these data you need to include this HTML-code:
And you need to contact with your .io manager and give him an url to authors list.
Example of list in JSON:

News blocks

.io can track data from some page blocks and also show CTR of this block and share of viewers. To do this you must take a few steps:

Step 1.

Put class io-block to block you want to track.

Step 2.

Put attribute data-io-title with a name of this block.

Step 3.

Enjoy ;)

Example:

Classic tracking

You need to include this JS-code into a page to track pageview data from your website:

Following from FB Group

If you want to track links from your facebook group you need to include label ?f in post's link

Google AMP

If you want to track data from Google AMP pages you need to insert code below to your website:

Into tag <head>:



Into tag <body>:

    

Hidden authors / categories

If you don't want to show your authors or categories on a page but you want to track these data you need to include this HTML-code:
The same thing with categories:

Facebook Instant Articles

If you want to track data from Facebook Instant Articles pages you need to insert code below to your Instant Articles page in <body> tag:

Tracking Setup

You need to include this JS-code into a page to track pageview data from your website:

User type

If you want to track some users type (authorized, guest etc.), you need to include HTML-code into every page on a website:

Youtube tracking

To be able to track Youtube embedded videos on a website we use Youtube's API. It requires to use additional parameters in 'src' attribute of iframe when embedding video to the page. Those parameters are `enablejsapi` and `origin`.
`enablejsapi` pararameter must be allways set to 1. `origin` parameter must match your site's origin.
For example, we are trying to embed video bellow to our article
To do this we are using code like this :
 
To give IO's code availability to track this video we need to change this:
src="https://www.youtube.com/embed/9nZMHBDw8os"
To this:
 src="https://www.youtube.com/embed/9nZMHBDw8os?enablejsapi=1&origin={link_project}" 
So we got code of embedded element like this:
 
If you don't want to modify all video content on your website we can do it dynamically. Our code can modify your Youtube iframe's src before it loads so this procedure will look absolutelly seamless to your website's visitors