TROCCO Web Activity Log Collection SDK - Technical Specifications
    • PDF

    TROCCO Web Activity Log Collection SDK - Technical Specifications

    • PDF

    Article summary

    summary

    This page describes the following

    operating environment

    TROCCO Web Activity Log Collection SDK has confirmed that logs made in the following environments are collected.

    for verified version

    All versions listed below are major versions.
    The TROCCO Web Activity Log Collection SDK has been tested for any minor version within the applicable major version.
    Please note that not all versions, including minor versions, have been confirmed to work.

    OS

    • Windows 10 or higher
    • macOS 10 or higher
    • Android 7 or higher
    • iOS 12 or higher

    Web Browser

    • Microsoft Edge 42 or higher
    • Google Chrome 72 or above
    • Safari 12 or higher
    • Mozilla Firefox 65 or higher
    Effect of Back Forward Cache in Safari

    With TROCCO Web Activity Log Collection SDK, PageView is also measured when a browser backs up.
    However, if the HTTP response of the site to which the TROCCO Web Activity Log Collection SDK is distributed contains Cache-Control:. no-storeand cache-control:. If no-cacheis not given, PageView is not measured due to Back Forward Cache in Safari (iOS/macOS).

    This phenomenon cannot be counteracted on the TROCCO Web Activity Log Collection SDK side.
    Please change the settings on the site side or use JavaScript to force a reload of the screen.
    (Reference:https://qiita.com/shibe23/items/79f950061457ff1a7687#%E5%AF%BE%E7%AD%96)

    Session Definition

    What is a session?

    It is a concept that summarizes the sequence of events from the time a user visits a site until he or she leaves.
    It is synonymous with sessions and visits in Google Analytics.

    This section mainly describes session termination conditions.
    There are two main conditions for session termination

    • Termination by time
    • Termination due to campaign switchover

    Termination by time

    For convenience, the session timeout period is described below with a default value of 30 minutes.
    If you want to change the session timeout period, change session_expire_msec from Modify existing settings.

    Differences from Google Analytics

    Unlike Google Analytics, the TROCCO Web Activity Log Collection SDK does not expire at the end of the day.

    Termination by no-operation time

    The session ends when there has been no activity for 30 minutes since the last PageView.
    If a new PageView occurs after 30 minutes, the PageView is tied to the new session.

    Continuation by event

    If the event occurs before 30 minutes have elapsed since the last PageView, the previously counted timeout time is reset once.
    That is, a session ends when it has not been operated for 30 minutes since the previous event.
    Therefore, it is possible for any two PageViews that are more than 30 minutes apart in time between occurrences to be treated as the same session.

    Automatic sending of PageView by event

    If a new event occurs after 30 minutes of inactivity since the last PageView or event, the PageView is also retrieved.

    Termination due to campaign switchover

    Sessions may switch due to inflows from different pages.

    image.png

    Determination by campaign parameters

    If the campaign parameters specified below are set in the URL of the current page, a session switching decision will be made based on the campaign parameters.
    For example, UTM parameters and ad parameters that you set independently fall under campaign parameters.
    Note that if the current page has campaign parameters, the session will continue if all campaign parameters match those at the time of the inflow.

    Definition of campaign parameters

    TROCCO Web Activity Log Collection SDK recognizes the following parameters as campaign parameters.

    • UTM Parameters
      • utm_source
      • utm_medium
      • utm_campaign
      • utm_content
      • utm_term
    • Advertising Parameters
      • AdWords
      • gclid

    Judgment by Referrer

    Each time a page view is generated, a session switching decision is made by referrer.

    In this process, the referrer URL is first compared to the incoming URL at the start of the session.
    If these URLs match, the transition is considered to be within the same site and the session continues.

    If the above URLs are different, the host of****the referrer URL is compared to the host of the current page URL.
    If these hosts are different, they are essentially considered to be coming from different sites and the session is switched.

    Definition of each term

    The following are definitions of each of these terms.

    • referrer URL
      • The URL obtained by JavaScript's document.referer.
    • Inflow URL at the beginning of the session
      • If the session was initiated by a campaign parameter, it will be the current page URL in the PageView where the session was initiated.
      • Otherwise, it will be the referrer URL in the PageView where the session was initiated.
    • Current page URL
      • The URL obtained by JavaScript location.href.
    • host
      • The host portion of the URL as defined in the RFC.
      • For example, https://your-site.com:8080/page/pathというURLの場合, hosted by your-site.com.

    The following is an example of session switching judgment by referrer.
    Referrer URL host yahoo.co.jp and session start URL hostwww.google.comは異なるため、セッションが切り替えられます。

    chronological order of readingsessionCurrent page URLreferrer URLURL host at start of session
    1Session Ahttps://n-analytics.com/lp/index.htmlhttps://www.google.comwww.google.com
    2Session Ahttps://n-analytics.com/https://n-analytics.com/lp/index.htmlwww.google.com
    3Session Bhttps://n-analytics.com/lp/index.htmlhttps://yahoo.co.jphttps://yahoo.co.jp

    Channel Definition

    What is a channel?

    Label to identify the inflow path.
    It is determined from the referrer and landing page URL at the start of the session, and the same value is retained by all PageViews in the session.
    Channels are organized into the following five concepts and are hierarchically structured.

    channel_group > medium > source > campaign > keyword

    Channel TypeDescription.Value Example
    channel_groupThis value corresponds to the "Channel Group" in Google Analytics.
    This is the highest level concept of channel and classifies channels in a way that is easily recognized by humans.
    All are automatically grouped according to the value of MEDIUM.
    For grouping conditions, see the list of definitions below.
    Organic Search, Paid Search, Social
    mediumThe UTM parameter utm_medium or is automatically assigned.organic, cpc, social
    sourceThe UTM parameter utm_source or is automatically assigned.google, yahoo, facebook
    campaignThe UTM parameter utm_campaign, if any, is stored.-
    keywordThe UTM parameter utm_term or search-based channels are automatically assigned.-

    In addition, channels are divided into the following two types

    • Channels by UTM parameters
    • Channels automatically assigned

    Channels by UTM parameters

    If UTM parameters are given to the landing page, any channel can be set.
    For example, see https://your-site.com?utm_medium=Foo&utm_source=Bar&utm_campaign=hogeというURLでランディングした場合,
    The values for each channel will be as follows

    • medium: Foo
    • source: Bar
    • campaign: hoge
    • keyword: NULL

    Channels automatically assigned

    Channels are automatically identified on well-known social networking and search sites.
    Only channels for which the assignment method in the definition list is "automatic" are covered.
    Note that even for transitions subject to automatic assignment, if there is a UTM parameter, that parameter takes precedence.

    List of channel definitions

    Please refer to the following csv file.

    n_analytics_channel_definition.csv

    Information about logging and log files

    Logs collected by TROCCO Web Activity Log Collection SDK will be stored on Amazon S3 managed by us when the following conditions are met

    • When 5 minutes have elapsed since the last save
    • When the collected file size reaches 256 MB

    In addition, multiple API servers for TROCCO Web Activity Log Collection SDK are always in operation for load balancing and redundancy. (The number of servers is undisclosed.)
    Therefore, at a single save timing, files are generated for the number of servers.
    The number of lines in each file is not guaranteed, but will be divided approximately evenly.

    If the total size of the log files to be retrieved at any given time exceeds the "number of servers x 256 MB," the log files for the "number of servers x 256 MB" will be saved first.
    The remaining log files not saved at that timing will be saved at the next timing (5 minutes later).

    How to track page views when a page transitions in Single Page Application

    Please add processing to the JavaScript on the website side so that the following code section described in Embedding JavaScript Code is executed at the timing of page transitions.

    Nanalytics('setup','<site_id>',(new Date).getTime());
    Nanalytics('send','pageview');
    

    Was this article helpful?

    What's Next