Topics in this section

FH Analytics Meta Details

Database Schema

FH Analytics persists two main types of data:

  • log data: raw analytics data that FH Analytics receives in the tracker.
  • archive data: aggregated analytics data (constructed from log data) that is cached and used to build reports.

FH Analytics also persists other simpler forms of data including:

  • websites
  • users
  • goals
  • options

Log data

There are five types of log data:

  • visits
  • action types
  • plugin specific actions
  • conversions
  • ecommerce items

All log data is persisted in a similar way: new data is constantly added to the set at high volume and updates are non-existent, except for visits.

Visit data is updated while visits are active. So, until a visit ends it is possible that FH Analytics will try to update it.

Log data is read when calculating analytics data and old data will sometimes be deleted (via the data purging feature).

Backends must ensure that inserting new log data is as fast as possible and aggregating log data is not too slow (though obviously, faster is better).

Meta Details

Table Name: piwik_log_link_visit_action

Database Name: fh_analytics

Column NameData TypeDescription
idlink_vadecimal(20,0)The ID of the log_link_visit_action entry that matched this step.
idsitebigintThe ID of the website.
idvisitorbinaryThe ID of the visitor that caused this crash.
idvisitdecimal(20,0)The ID of the visit that caused this crash.
idaction_url_refbigintThe previous pageview’s Page URL.
idaction_name_refbigintThe previous pageview’s Page Title.
custom_floatdoubleAn unspecified float field, mainly used to store the Custom Event value, as well as store the time it took the server to serve this action.
server_timetimestampThe server timestamp on which this crash event was reported.
idaction_namebigintThe ID of the page title action type for this action.
idaction_urlbigintlog_action ID referencing on what page URL this page view was recorded.
time_spent_ref_actionbigintThis column contains the time spent by the visitor on their previous pageview.
idaction_event_actionbigintThe ID of the action type for this event.
idaction_event_categorybigintThis refers to the ID for other action types.
idaction_content_interactionbigintThe ID for the interaction with the content.
idaction_content_namebigintThis refers to the name (header) of the content.
idaction_content_piecebigintThis refers to part/piece of the content.
idaction_content_targetbigintThis refers to target (audience) of the content.
custom_var_k1varchar(200)The custom variable name of the first slot for page custom variables.
custom_var_v1varchar(200)The custom variable value of the first slot for page custom variables.
custom_var_k2varchar(200)The custom variable name of the second slot for page custom variables.
custom_var_v2varchar(200)The custom variable value of the second slot for page custom variables.
custom_var_k3varchar(200)The custom variable name of the third slot for page custom variables.
custom_var_v3varchar(200)The custom variable value of the third slot for page custom variables.
custom_var_k4varchar(200)The custom variable name of the fourth slot for page custom variables.
custom_var_v4varchar(200)The custom variable value of the fourth slot for page custom variables.
custom_var_k5varchar(200)The custom variable name of the fifth slot for page custom variables.
custom_var_v5varchar(200)The custom variable value of the visit in the fifth slot for visit custom variables.
time_spentbigintThe amount of time spent on this action (set by the CustomDimensions plugin).
custom_dimension_1varchar(255)Dimension 1 for the custom report.
custom_dimension_2varchar(255)Dimension 2 for the custom report.
custom_dimension_3varchar(255)Dimension 3 for the custom report.
custom_dimension_4varchar(255)Dimension 4 for the custom report.
custom_dimension_5varchar(255)Dimension 5 for the custom report.
custom_var_k6varchar(200)The custom variable name of the sixth slot for page custom variables.
custom_var_v6varchar(200)The custom variable value of the visit in the sixth slot for visit custom variables.
custom_var_k7varchar(200)The custom variable name of the seventh slot for page custom variables.
custom_var_v7varchar(200)The custom variable value of the visit in the seventh slot for visit custom variables.
custom_var_k8varchar(200)The custom variable name of the eighth slot for page custom variables.
custom_var_v8varchar(200)The custom variable value of the visit in the eighth slot for visit custom variables.
custom_var_k9varchar(200)The custom variable name of the ninth slot for page custom variables.
custom_var_v9varchar(200)The custom variable value of the visit in the ninth slot for visit custom variables.
custom_var_k10varchar(200)The custom variable name of the tenth slot for page custom variables.
custom_var_v10varchar(200)The custom variable value of the visit in the tenth slot for visit custom variables.
idpageviewchar(6)The ID of the pageview entry matching the log_link_visit_action.idpageview column. Allows us to assign this interaction to a specific action.
interaction_positionintThe action is interaction position.
custom_var_k11varchar(200)The custom variable name of the eleventh slot for page custom variables.
custom_var_v11varchar(200)The custom variable value of the visit in the eleventh slot for visit custom variables.
custom_var_k12varchar(200)The custom variable name of the twelfth slot for page custom variables.
custom_var_v12varchar(200)The custom variable value of the visit in the twelfth slot for visit custom variables.
custom_var_k13varchar(200)The custom variable name of the thirteenth slot for page custom variables.
custom_var_v13varchar(200)The custom variable value of the visit in the thirteenth slot for visit custom variables.
custom_var_k14varchar(200)The custom variable name of the fourteenth slot for page custom variables.
custom_var_v14varchar(200)The custom variable value of the visit in the fourteenth slot for visit custom variables.
custom_var_k15varchar(200)The custom variable name of the fifteenth slot for page custom variables.
custom_var_v15varchar(200)The custom variable value of the visit in the fifteenth slot for visit custom variables.
custom_dimension_6varchar(255)Dimension 6 for the custom report.
custom_dimension_7varchar(255)Dimension 7 for the custom report.
custom_dimension_8varchar(255)Dimension 8 for the custom report.
custom_dimension_9varchar(255)Dimension 9 for the custom report.
custom_dimension_10varchar(255)Dimension 10 for the custom report.
custom_dimension_11varchar(255)Dimension 11 for the custom report.
custom_dimension_12varchar(255)Dimension 12 for the custom report.
custom_dimension_13varchar(255)Dimension 13 for the custom report.
custom_dimension_14varchar(255)Dimension 14 for the custom report.
custom_dimension_15varchar(255)Dimension 15 for the custom report.
time_networkintThis indicates the network time.
time_serverintThis indicates the server time.
time_transferintThis indicates the time take for the file transfer.
time_dom_completionintThis column contains the time taken for completion of the DOM Element.
time_dom_processingintThis column contains the time taken to process the DOM Element.
time_on_loadintThis column contains the time taken to load for previous pageview.
pageview_positionintThe position of the pageview within the visit, starting at 1. If the action being recorded is not a pageview (but is another action like an event, download, etc.) then the position is set to the last recorded pageview’s position (before this action was recorded).
search_catvarchar(200)The custom variable name for the search category.
search_countintThis refers to the number of search count.
product_pricedoubleThis refers to the price of the product.
idaction_product_cat5intThis refers to the ID for product category 5.
idaction_product_cat4intThis refers to the ID for product category 4.
idaction_product_cat3intThis refers to the ID for product category 3.
idaction_product_cat2intThis refers to the ID for product category 2.
idaction_product_cat1intThis refers to the ID for product category 1.
idaction_product_catintThis refers to the ID for product category.
idaction_product_skuintThe ID for the product SKU for this action.
idaction_product_nameintThe ID for the product name for this action.

Meta Details 2

Table Name: piwik_log_action

Database Name: fh_analytics

Column NameData TypeDescription
idactionbigintThe ID of the action type.
namevarchar(40996)The visitor’s name
hashbigintA hash value calculated using the name.
typeintThe action type
url_prefixintIf the name is a URL this refers to the prefix of the URL. The prefix is removed from actual URLs so the protocol and www. parts of a URL are ignored during analysis. Can be the following values:
0‘http://’
       1‘http://www.’
      2‘https://’
       3‘https://www.’

Meta Details 3

Table Name: piwik_log_visit

Database Name: fh_analytics

Column NameData TypeDescription
idvisitdecimal(20,0)The ID of the visit.
idsitebigintThe ID of the website it was tracked for.
idvisitorbinaryThe visitor ID (an 8-byte binary string).
visit_last_action_timetimestampThe datetime of the visit’s last action.
config_idbinaryA hash of all the visit’s configuration options, including the OS, browser name, browser version, browser language, IP address and all browser plugin information.
location_ipbinaryThe IP address of the computer that the visit was made from. Can be anonymized.
user_idvarchar(200)The User ID (if set).
visit_first_action_timetimestampThe datetime of the visit’s first action.
visit_goal_buyerbooleanWhether the visitor ordered something during this visit or not.
visit_goal_convertedbooleanWhether this visit converted a goal or not.
visitor_days_since_firstintThe number of days since the visitor’s first visit (if any).
visitor_days_since_orderintThe number of days since this visitor’s last order (if any).
visitor_returningbooleanWhether the visit is the first visit for this visitor or not.
visitor_count_visitsbigintThe number of visits the visitor has made up to this one.
visit_entry_idaction_namebigintThe ID of the page title action type of this visit’s first action.
visit_entry_idaction_urlbigintThe ID of the URL action type of the visit’s first action.
visit_exit_idaction_namebigintThe ID of the page title action type of the visit’s last action.
visit_exit_idaction_urlbigintThe ID of the URL action type of the visit’s last action.
visit_total_actionsbigintThe count of actions performed during this visit.
visit_total_searchesintThe count of site searches performed during this visit.
referer_keywordvarchar(255)The keyword used if a search engine was the referrer.
referer_namevarchar(70)This means, depending on the specific referrer type.
referer_typeintThe type of this visitor’s referrer. Can be one of the following values: Common::REFERRER_TYPE_DIRECT_ENTRY = 1: If set to this value, other referer_… fields have no meaning.Common::REFERRER_TYPE_SEARCH_ENGINE = 2: If set to this value, referer_url is the url of the search engine and referer_keyword is the keyword used (if we can find it).Common::REFERRER_TYPE_WEBSITE = 3: If set to this value, referer_url is the url of the website.Common::REFERRER_TYPE_CAMPAIGN = 6: If set to this value, referer_name is the name of the campaign.Common::REFERRER_TYPE_SOCIAL_NETWORK = 7: If set to this value, referer_name is the name of the social network.
referer_urlvarchar(65535)The referrer URL; its meaning depends on the specific referrer type.
location_browser_langvarchar(20)A string describing the language used in the visitor’s browser.
config_browser_enginevarchar(10)A short string identifying the browser engine used to make this visit.
config_browser_namevarchar(10)A short string identifying the browser used to make this visit.
config_browser_versionvarchar(20)A string identifying the version of the browser used to make this visit.
config_device_brandvarchar(100)A string identifying th brand of the device used to make this visit.
config_device_modelvarchar(100)A string identifying the model of the device used to make this visit.
config_device_typeintThis identifies the type of the device used to make this visit.
config_oschar(3)A short string identifying the operating system used to make this visit.
config_os_versionvarchar(100)A string identifying the version of the operating system used to make this visit.
visit_total_eventsbigintThe count of custom events performed during this visit.
visitor_localtimetimestampThe visit datetime in the visitor’s time of day.
visitor_days_since_lastintThe number of days since the visitor’s last visit (if any).
config_resolutionvarchar(18)A string identifying the screen resolution the visitor used to make this visit (e.g., ‘1024×768’).
config_cookiebooleanWhether the visitor’s browser has cookies enabled or not.
config_directorbooleanWhether the visitor’s browser can view the directory or not.
config_flashbooleanWhether the visitor’s browser can view flash files or not.
config_gearsbooleanWhether the visitor’s browser can have the access to the gears or not.
config_javabooleanWhether the visitor’s browser can run Java or not.
config_pdfbooleanWhether the visitor’s browser can view PDF files or not.
config_quicktimebooleanWhether the visitor’s browser uses quicktime to play media files or not.
config_realplayerbooleanWhether the visitor’s browser can play realplayer media files or not.
config_silverlightbooleanWhether the visitor’s browser can run silverlight programs or not.
config_windowsmediabooleanWhether the visitor’s browser uses windows media player to play media files.
visit_total_timebigintThe total elapsed time of the visit.
location_cityvarchar(255)A string naming the city the visitor was in while visiting the site. Set by the UserCountry plugin.
location_countrychar(3)A two-character string describing the country the visitor was located in while visiting the site. Set by the UserCountry plugin.
location_latitudedecimal(9,6)The latitude of the visitor while he/she visited the site. Set by the UserCountry plugin.
location_longitudedecimal(9,6)The longitude of the visitor while he/she visited the site. Set by the UserCountry plugin.
location_regionchar(3)A two-character string describing the region of the country the visitor was in. Set by the UserCountry plugin.
is_addedintWhether the user is added the campaign or not.
custom_var_k1varchar(200)The custom variable name of the visit in the first slot for visit custom variables.
custom_var_v1varchar(200)The custom variable value of the visit in the first slot for visit custom variables.
custom_var_k2varchar(200)The custom variable name of the visit in the second slot for visit custom variables.
custom_var_v2varchar(200)The custom variable value of the visit in the second slot for visit custom variables.
custom_var_k3varchar(200)The custom variable name of the visit in the third slot for visit custom variables.
custom_var_v3varchar(200)The custom variable value of the visit in the third slot for visit custom variables.
custom_var_k4varchar(200)The custom variable name of the visit in the fourth slot for visit custom variables.
custom_var_v4varchar(200)The custom variable value of the visit in the fourth slot for visit custom variables.
custom_var_k5varchar(200)The custom variable name of the visit in the fifth slot for visit custom variables.
custom_var_v5varchar(200)The custom variable value of the visit in the fifth slot for visit custom variables.
last_idlink_vadecimal(20,0)The ID of the last visit action that resulted in this conversion.
custom_dimension_1varchar(255)Dimension 1 for the custom visit.
custom_dimension_2varchar(255)Dimension 2 for the custom visit.
custom_dimension_3varchar(255)Dimension 3 for the custom visit.
custom_dimension_4varchar(255)Dimension 4 for the custom visit.
custom_dimension_5varchar(255)Dimension 5 for the custom visit.
custom_var_k6varchar(200)The custom variable name of the visit in the sixth slot for visit custom variables.
custom_var_v6varchar(200)The custom variable value of the visit in the sixth slot for visit custom variables.
custom_var_k7varchar(200)The custom variable name of the visit in the seventh slot for visit custom variables.
custom_var_v7varchar(200)The custom variable value of the visit in the seventh slot for visit custom variables.
custom_var_k8varchar(200)The custom variable name of the visit in the eighth slot for visit custom variables.
custom_var_v8varchar(200)The custom variable value of the visit in the eighth slot for visit custom variables.
custom_var_k9varchar(200)The custom variable name of the visit in the ninth slot for visit custom variables.
custom_var_v9varchar(200)The custom variable value of the visit in the ninth slot for visit custom variables
custom_var_k10varchar(200)The custom variable name of the visit in the tenth slot for visit custom variables.
custom_var_v10varchar(200)The custom variable value of the visit in the tenth slot for visit custom variables.
visit_total_interactionsintThe count of interactions performed during this visit.
usr_unique_idvarchar(50)The unique ID of the user.
usr_interaction_idvarchar(100)The interaction ID of the user recorded against each visit.
campaign_contentvarchar(255)The campaign content.
campaign_idvarchar(100)The campaign ID.
campaign_keywordvarchar(255)The keyword used for the campaign.
campaign_mediumvarchar(255)The medium of the campaign medium.
campaign_namevarchar(255)The name of the campaign.
campaign_sourcevarchar(255)The source of the campaign.
custom_var_k11varchar(200)The custom variable name of the visit in the eleventh slot for visit custom variables.
custom_var_v11varchar(200)The custom variable value of the visit in the eleventh slot for visit custom variables.
custom_var_k12varchar(200)The custom variable name of the visit in the twelfth slot for visit custom variables.
custom_var_v12varchar(200)The custom variable value of the visit in the twelfth slot for visit custom variables.
custom_var_k13varchar(200)The custom variable name of the visit in the thirteenth slot for visit custom variables.
custom_var_v13varchar(200)The custom variable value of the visit in the thirteenth slot for visit custom variables.
custom_var_k14varchar(200)The custom variable name of the visit in the fourteenth slot for visit custom variables.
custom_var_v14varchar(200)The custom variable value of the visit in the fourteenth slot for visit custom variables.
custom_var_k15varchar(200)The custom variable name of the visit in the fifteenth slot for visit custom variables.
custom_var_v15varchar(200)The custom variable value of the visit in the fifteenth slot for visit custom variables.
custom_dimension_6varchar(255)Dimension 6 for the custom visit.
custom_dimension_7varchar(255)Dimension 7 for the custom visit.
custom_dimension_8varchar(255)Dimension 8 for the custom visit.
custom_dimension_9varchar(255)Dimension 9 for the custom visit.
custom_dimension_10varchar(255)Dimension 10 for the custom visit.
custom_dimension_11varchar(255)Dimension 11 for the custom visit.
custom_dimension_12varchar(255)Dimension 12 for the custom visit.
custom_dimension_13varchar(255)Dimension 13 for the custom visit.
custom_dimension_14varchar(255)Dimension 14 for the custom visit.
custom_dimension_15varchar(255)Dimension 15 for the custom visit.
visitor_seconds_since_firstintThe number of seconds since this visitor’s first visit.
visitor_seconds_since_orderintThe number of seconds since this visitor’s last order (if any).
visitor_seconds_since_lastintThe number of seconds since this visitor’s last visit (if any).
profilableintThis is either 0 or 1. If no visitorId or userId was used, then the value is 0. This means no profile can be created for this specific visitor meaning visitor profile would in most cases only show one visit, features like new/returning visit won’t work for this visitor etc.
config_client_typeintThis identifies the client type used to make this visit.
campaign_groupvarchar(255)The campaign group.
campaign_placementvarchar(100)The campaign placement.
fh_updated_datetimestampThe date time when the heatmap or session recording was last updated in FH.