Skip to content

Track group repo analytics pageviews in snowplow

What does this MR do?

For #215209 (closed)

Tracks a view_group_repository_analytics event in snowplow when the Group Repositories Analytics page is loaded.

Output of http://localhost:9090/micro/good after a pageview in gdk

[
  {
    "rawEvent": {
      "api": {
        "vendor": "com.snowplowanalytics.snowplow",
        "version": "tp1"
      },
      "parameters": {
        "e": "se",
        "se_va": "28",
        "eid": "42c33054-a308-4253-b3c2-98ce5fadf7a7",
        "tna": "gl",
        "stm": "1600268478239",
        "tv": "rb-0.6.1",
        "se_ac": "group_repository_analytics_pageview",
        "se_la": "group_id",
        "se_ca": "Groups::Analytics::RepositoryAnalyticsController",
        "p": "srv",
        "dtm": "1600268478238"
      },
      "contentType": null,
      "source": {
        "name": "ssc-1.0.1-stdout$",
        "encoding": "UTF-8",
        "hostname": "localhost"
      },
      "context": {
        "timestamp": "2020-09-16T15:01:18.348Z",
        "ipAddress": "172.17.0.1",
        "useragent": "Ruby",
        "refererUri": null,
        "headers": [
          "Timeout-Access: <function1>",
          "Accept-Encoding: gzip, deflate;q=0.6, identity;q=0.3",
          "Accept: */*",
          "User-Agent: Ruby",
          "Connection: close",
          "Host: localhost:9090"
        ],
        "userId": "96f54790-4947-4172-a506-5e9222292ab4"
      }
    },
    "eventType": "struct",
    "schema": "iglu:com.google.analytics/event/jsonschema/1-0-0",
    "contexts": [],
    "event": {
      "app_id": null,
      "platform": "srv",
      "etl_tstamp": "2020-09-16T15:01:18.413Z",
      "collector_tstamp": "2020-09-16T15:01:18.348Z",
      "dvce_created_tstamp": "2020-09-16T15:01:18.238Z",
      "event": "struct",
      "event_id": "42c33054-a308-4253-b3c2-98ce5fadf7a7",
      "txn_id": null,
      "name_tracker": "gl",
      "v_tracker": "rb-0.6.1",
      "v_collector": "ssc-1.0.1-stdout$",
      "v_etl": "snowplow-micro-1.0.0-common-1.3.2",
      "user_id": null,
      "user_ipaddress": "172.17.0.1",
      "user_fingerprint": null,
      "domain_userid": null,
      "domain_sessionidx": null,
      "network_userid": "96f54790-4947-4172-a506-5e9222292ab4",
      "geo_country": null,
      "geo_region": null,
      "geo_city": null,
      "geo_zipcode": null,
      "geo_latitude": null,
      "geo_longitude": null,
      "geo_region_name": null,
      "ip_isp": null,
      "ip_organization": null,
      "ip_domain": null,
      "ip_netspeed": null,
      "page_url": null,
      "page_title": null,
      "page_referrer": null,
      "page_urlscheme": null,
      "page_urlhost": null,
      "page_urlport": null,
      "page_urlpath": null,
      "page_urlquery": null,
      "page_urlfragment": null,
      "refr_urlscheme": null,
      "refr_urlhost": null,
      "refr_urlport": null,
      "refr_urlpath": null,
      "refr_urlquery": null,
      "refr_urlfragment": null,
      "refr_medium": null,
      "refr_source": null,
      "refr_term": null,
      "mkt_medium": null,
      "mkt_source": null,
      "mkt_term": null,
      "mkt_content": null,
      "mkt_campaign": null,
      "contexts": {},
      "se_category": "Groups::Analytics::RepositoryAnalyticsController",
      "se_action": "group_repository_analytics_pageview",
      "se_label": "group_id",
      "se_property": null,
      "se_value": 28,
      "unstruct_event": null,
      "tr_orderid": null,
      "tr_affiliation": null,
      "tr_total": null,
      "tr_tax": null,
      "tr_shipping": null,
      "tr_city": null,
      "tr_state": null,
      "tr_country": null,
      "ti_orderid": null,
      "ti_sku": null,
      "ti_name": null,
      "ti_category": null,
      "ti_price": null,
      "ti_quantity": null,
      "pp_xoffset_min": null,
      "pp_xoffset_max": null,
      "pp_yoffset_min": null,
      "pp_yoffset_max": null,
      "useragent": "Ruby",
      "br_name": null,
      "br_family": null,
      "br_version": null,
      "br_type": null,
      "br_renderengine": null,
      "br_lang": null,
      "br_features_pdf": null,
      "br_features_flash": null,
      "br_features_java": null,
      "br_features_director": null,
      "br_features_quicktime": null,
      "br_features_realplayer": null,
      "br_features_windowsmedia": null,
      "br_features_gears": null,
      "br_features_silverlight": null,
      "br_cookies": null,
      "br_colordepth": null,
      "br_viewwidth": null,
      "br_viewheight": null,
      "os_name": null,
      "os_family": null,
      "os_manufacturer": null,
      "os_timezone": null,
      "dvce_type": null,
      "dvce_ismobile": null,
      "dvce_screenwidth": null,
      "dvce_screenheight": null,
      "doc_charset": null,
      "doc_width": null,
      "doc_height": null,
      "tr_currency": null,
      "tr_total_base": null,
      "tr_tax_base": null,
      "tr_shipping_base": null,
      "ti_currency": null,
      "ti_price_base": null,
      "base_currency": null,
      "geo_timezone": null,
      "mkt_clickid": null,
      "mkt_network": null,
      "etl_tags": null,
      "dvce_sent_tstamp": "2020-09-16T15:01:18.239Z",
      "refr_domain_userid": null,
      "refr_dvce_tstamp": null,
      "derived_contexts": {},
      "domain_sessionid": null,
      "derived_tstamp": "2020-09-16T15:01:18.347Z",
      "event_vendor": "com.google.analytics",
      "event_name": "event",
      "event_format": "jsonschema",
      "event_version": "1-0-0",
      "event_fingerprint": null,
      "true_tstamp": null
    }
  }
]

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Miranda Fluharty

Merge request reports