This article describes API for tracking users via API. This is useful if precise control
over exposed information is required, for non-browser environments, for browser
environments with runtime (e.g. javascript) limitations etc.

SUBMISSION OF NEW PAGE VISITS TO NEWZMATE


If you decide to provide Newzmate with new page visits using own visits
tracking mechanism rather than using Newzmate Integration internal visit tracking
mechanism, the following API call has to be performed to record / add each page visit:

HTTP POST to
http(s)://api.traq.li/tracker/secure/visit/<site_id>?
        api_key=<api_key>&src=<encoded_page_url>&visitor=<visitor_id>

, where
        <encoded_page_url> - URL encoded page URL (should be accessible by Newzmate for parsing),
         <visitor_id> - visitor ID string (unique value denoting a visitor, see below).

Secret API key and <site_id> (also know as <publisher_id>) should be queried from Newzmate Support.

Visitor ID is a unique value per reader, so you should use the same visitor ID for the same reader (persist it for as long as reasonably possible). Visitor ID is generated
during first visitor tracking request lacking this parameter and will be contained in
response, thereby first request per reader may not contain any visitor ID. Subsequent
requests are strongly recommended to use previously generated visitor ID. Technically new visitor IDs get be generated for the same users but this is discouraged.

SUBMISSION OF “VISITOR-SUBSCRIBER” RELATION TO NEWZMATE

Submitting new page visits to Newzmate as described above uses abstract (anonymous) visitor ID to reference users. At some point it will be necessary to link one or more visitor IDs to actual user email(s), in order to let Newzmate perform recommended content distributions (which ultimately uses email addresses).
For this, the following API call has to be performed to establish such Visitor-Subscriber
relation:

HTTP PUT to
http(s)://api.traq.li/tracker/secure/impersonate/<site_id>?
api_key=<api_key>&email=<encoded_email>&visitor=<visitor_id>

, where
       <encoded_email> - URL encoded subscriber’s email address,
       <visitor_id> - visitor ID string.

Secret API key and <site_id> (also know as <publisher_id>) should be queried from Newzmate Support. Visitor ID should be generated in advance using previously described API method (Submission on New Page Visits to Traqli).

Did this answer your question?