gglnltcs_load_metrics_and_dimensions

The BestWebSoft Google Analytics gglnltcs load metrics and dimensions function.

Description

gglnltcs_load_metrics_and_dimensions(); 

Usage

  1. if ( !function_exists( 'gglnltcs_load_metrics_and_dimensions' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bestwebsoft-google-analytics/bws-google-analytics.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = gglnltcs_load_metrics_and_dimensions(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bws-google-analytics.php  
  1. function gglnltcs_load_metrics_and_dimensions() { 
  2. global $gglnltcs_metrics_data, $gglnltcs_dimensions_data; 
  3. /*** METRICS ***/ 
  4. $gglnltcs_metrics_data = array( 
  5. /** VISITOR **/ 
  6. /** Unique Visitors */ 
  7. 'ga:visitors' => array(  
  8. 'id' => 'gglnltcs-ga-visitors',  
  9. 'name' => 'gglnltcs-ga-visitors',  
  10. 'value' => 'ga:visitors',  
  11. 'title' => __( 'Total number of visitors for the requested time period.', 'gglnltcs' ),  
  12. 'for' => 'gglnltcs-ga-visitors',  
  13. 'label' => __( 'Unique Visitors', 'gglnltcs' ),  
  14. 'category' => __( 'Visitor', 'gglnltcs' ) 
  15. ),  
  16. /** New Visits */ 
  17. 'ga:newVisits' => array( 
  18. 'id' => 'gglnltcs-ga-new-visits',  
  19. 'name' => 'gglnltcs-ga-new-visits',  
  20. 'value' => 'ga:newVisits',  
  21. 'title' => __( 'The number of visitors whose visit to your property was marked as a first-time visit.', 'gglnltcs' ),  
  22. 'for' => 'gglnltcs-ga-new-visits',  
  23. 'label' => __( 'New Visits', 'gglnltcs' ),  
  24. 'category' => __( 'Visitor', 'gglnltcs' ) 
  25. ),  
  26. /** SESSION **/ 
  27. /** Visits */ 
  28. 'ga:visits' => array( 
  29. 'id' => 'gglnltcs-ga-visits',  
  30. 'name' => 'gglnltcs-ga-visits',  
  31. 'value' => 'ga:visits',  
  32. 'title' => __( 'Counts the total number of sessions.', 'gglnltcs' ),  
  33. 'for' => 'gglnltcs-ga-visits',  
  34. 'label' => __( 'Visits', 'gglnltcs' ),  
  35. 'category' => __( 'Session', 'gglnltcs' ) 
  36. ),  
  37. /** Bounce Rate */ 
  38. 'ga:visitBounceRate' => array( 
  39. 'id' => 'gglnltcs-ga-visit-bounce-rate',  
  40. 'name' => 'gglnltcs-ga-visit-bounce-rate',  
  41. 'value' => 'ga:visitBounceRate',  
  42. 'title' => __( 'The percentage of single-page visits (i.e., visits in which the person left your property from the first page).' , 'gglnltcs' ),  
  43. 'for' => 'gglnltcs-ga-visit-bounce-rate',  
  44. 'label' => __( 'Bounce Rate', 'gglnltcs' ),  
  45. 'category' => __( 'Session', 'gglnltcs' ) 
  46. ),  
  47. /** Average Visit Duration */ 
  48. 'ga:avgTimeOnSite' => array( 
  49. 'id' => 'gglnltcs-ga-avg-time-on-site',  
  50. 'name' => 'gglnltcs-ga-avg-time-on-site',  
  51. 'value' => 'ga:avgTimeOnSite',  
  52. 'title' => __( 'The average duration visitor sessions.', 'gglnltcs' ),  
  53. 'for' => 'gglnltcs-ga-avg-time-on-site',  
  54. 'label' => __( 'Average Visit Duration', 'gglnltcs' ),  
  55. 'category' => __( 'Session', 'gglnltcs' ) 
  56. ),  
  57. /** PAGE TRACKING **/ 
  58. /** Pageviews */ 
  59. 'ga:pageviews' => array( 
  60. 'id' => 'gglnltcs-ga-pageviews',  
  61. 'name' => 'gglnltcs-ga-pageviews',  
  62. 'value' => 'ga:pageviews',  
  63. 'title' => __( 'The total number of pageviews for your property.', 'gglnltcs' ),  
  64. 'for' => 'gglnltcs-ga-pageviews',  
  65. 'label' => __( 'Pageviews', 'gglnltcs' ),  
  66. 'category' => __( 'Page Tracking', 'gglnltcs' ) 
  67. ),  
  68. /** Pages/Visit */ 
  69. 'ga:pageviewsPerVisit' => array( 
  70. 'id' => 'gglnltcs-ga-pageviews-per-visit',  
  71. 'name' => 'gglnltcs-ga-pageviews-per-visit',  
  72. 'value' => 'ga:pageviewsPerVisit',  
  73. 'title' => __( 'The average number of pages viewed during a visit to your property. Repeated views of a single page are counted.', 'gglnltcs' ),  
  74. 'for' => 'gglnltcs-ga-pageviews-per-visit',  
  75. 'label' => __( 'Pages / Visit', 'gglnltcs' ),  
  76. 'category' => __( 'Page Tracking', 'gglnltcs' ) 
  77. ); 
  78. /*** DIMENSIONS ***/ 
  79. $gglnltcs_dimensions_data = array( 
  80. /** VISITOR */ 
  81. /** Visitor Type */ 
  82. 'ga:visitorType' => array( 
  83. 'id' => 'gglnltcs-ga-visitor-type',  
  84. 'name' => 'gglnltcs-ga-visitor-type',  
  85. 'value' => 'ga:visitorType',  
  86. 'title' => __( 'A boolean indicating if a visitor is new or returning. Possible values: New Visitor, Returning Visitor.', 'gglnltcs' ),  
  87. 'for' => 'gglnltcs-ga-visitor-type',  
  88. 'label' => __( 'Visitor Type', 'gglnltcs' ),  
  89. 'category' => __( 'Visitor', 'gglnltcs' ) 
  90. ),  
  91. /** GEO NETWORKT **/ 
  92. /** Continent */ 
  93. 'ga:continent' => array( 
  94. 'id' => 'gglnltcs-ga-continent',  
  95. 'name' => 'gglnltcs-ga-continent',  
  96. 'value' => 'ga:continent',  
  97. 'title' => __( 'The continents of property visitors, derived from IP addresses.', 'gglnltcs' ),  
  98. 'for' => 'gglnltcs-ga-continent',  
  99. 'label' => __( 'Continent', 'gglnltcs' ),  
  100. 'category' => __( 'Geo Network', 'gglnltcs' ) 
  101. ),  
  102. /** Sub Continent Region */ 
  103. 'ga:subContinent' => array( 
  104. 'id' => 'gglnltcs-ga-sub-continent',  
  105. 'name' => 'gglnltcs-ga-sub-continent',  
  106. 'value' => 'ga:subContinent',  
  107. 'title' => __( 'The sub-continent of visitors, derived from IP addresses. For example, Polynesia or Northern Europe.', 'gglnltcs' ),  
  108. 'for' => 'gglnltcs-ga-sub-continent',  
  109. 'label' => __( 'Sub Continent Region', 'gglnltcs' ),  
  110. 'category' => __( 'Geo Network', 'gglnltcs' ) 
  111. ),  
  112. /** Country / Territory */ 
  113. 'ga:country' => array( 
  114. 'id' => 'gglnltcs-ga-country',  
  115. 'name' => 'gglnltcs-ga-country',  
  116. 'value' => 'ga:country',  
  117. 'title' => __( 'The countries of website visitors, derived from IP addresses.', 'gglnltcs' ),  
  118. 'for' => 'gglnltcs-ga-country',  
  119. 'label' => __( 'Country / Territory', 'gglnltcs' ),  
  120. 'category' => __( 'Geo Network', 'gglnltcs' ) 
  121. ),  
  122. /** Region */ 
  123. 'ga:region' => array( 
  124. 'id' => 'gglnltcs-ga-region',  
  125. 'name' => 'gglnltcs-ga-region',  
  126. 'value' => 'ga:region',  
  127. 'title' => __( 'The region of visitors to your property, derived from IP addresses. In the U.S., a region is a state, such as New York.', 'gglnltcs' ),  
  128. 'for' => 'gglnltcs-ga-region',  
  129. 'label' => __( 'Region', 'gglnltcs' ),  
  130. 'category' => __( 'Geo Network', 'gglnltcs' ) 
  131. ),  
  132. /** Metro */ 
  133. 'ga:metro' => array( 
  134.  
  135. 'id' => 'gglnltcs-ga-metro',  
  136. 'name' => 'gglnltcs-ga-metro',  
  137. 'value' => 'ga:metro',  
  138. 'title' => __( 'The Designated Market Area (DMA) from where traffic arrived on your property.', 'gglnltcs' ),  
  139. 'for' => 'gglnltcs-ga-metro',  
  140. 'label' => __( 'Metro', 'gglnltcs' ),  
  141. 'category' => __( 'Geo Network', 'gglnltcs' ) 
  142. ),  
  143. /** City */ 
  144. 'ga:city' => array( 
  145. 'id' => 'gglnltcs-ga-city',  
  146. 'name' => 'gglnltcs-ga-city',  
  147. 'value' => 'ga:city',  
  148. 'title' => __( 'The cities of property visitors, derived from IP addresses.', 'gglnltcs' ),  
  149. 'for' => 'gglnltcs-ga-city',  
  150. 'label' => __( 'City', 'gglnltcs' ),  
  151. 'category' => __( 'Geo Network', 'gglnltcs' ) 
  152. ),  
  153. /** Latitude */ 
  154. 'ga:latitude' => array( 
  155. 'id' => 'gglnltcs-ga-latitude',  
  156. 'name' => 'gglnltcs-ga-latitude',  
  157. 'value' => 'ga:latitude',  
  158. 'title' => __( 'The approximate latitude of the visitor\'s city. Derived from IP address. Locations north of the equator are represented by positive values and locations south of the equator by negative values.', 'gglnltcs' ),  
  159. 'for' => 'gglnltcs-ga-latitude',  
  160. 'label' => __( 'Latitude', 'gglnltcs' ),  
  161. 'category' => __( 'Geo Network', 'gglnltcs' ) 
  162. ),  
  163. /** Longitude */ 
  164. 'ga:longitude' => array( 
  165. 'id' => 'gglnltcs-ga-longitude',  
  166. 'name' => 'gglnltcs-ga-longitude',  
  167. 'value' => 'ga:longitude',  
  168. 'title' => __( 'The approximate longitude of the visitor\'s city. Derived from IP address. Locations east of the meridian are represented by positive values and locations west of the meridian by negative values.', 'gglnltcs' ),  
  169. 'for' => 'gglnltcs-ga-longitude',  
  170. 'label' => __( 'Longitude', 'gglnltcs' ),  
  171. 'category' => __( 'Geo Network', 'gglnltcs' ) 
  172. ),  
  173. /** Network Domain */ 
  174. 'ga:networkDomain' => array( 
  175. 'id' => 'gglnltcs-ga-network-domain',  
  176. 'name' => 'gglnltcs-ga-network-domain',  
  177. 'value' => 'ga:networkDomain',  
  178. 'title' => __( 'The domain name of the ISPs used by visitors to your property. This is derived from the domain name registered to the IP address.', 'gglnltcs' ),  
  179. 'for' => 'gglnltcs-ga-network-domain',  
  180. 'label' => __( 'Network Domain', 'gglnltcs' ),  
  181. 'category' => __( 'Geo Network', 'gglnltcs' ) 
  182. ),  
  183. /** Service Provider */ 
  184. 'ga:networkLocation' => array( 
  185. 'id' => 'gglnltcs-ga-network-location',  
  186. 'name' => 'gglnltcs-ga-network-location',  
  187. 'value' => 'ga:networkLocation',  
  188. 'title' => __( 'The name of service providers used to reach your property. For example, if most visitors to your website come via the major service providers for cable internet, you will see the names of those cable service providers in this element.', 'gglnltcs' ),  
  189. 'for' => 'gglnltcs-ga-network-location',  
  190. 'label' => __( 'Service Provider', 'gglnltcs' ),  
  191. 'category' => __( 'Geo Network', 'gglnltcs' ) 
  192. ),  
  193. /** Platform or Device **/ 
  194. /** Browser */ 
  195. 'ga:browser' => array( 
  196. 'id' => 'gglnltcs-ga-browser',  
  197. 'name' => 'gglnltcs-ga-browser',  
  198. 'value' => 'ga:browser',  
  199. 'title' => __( 'The names of browsers used by visitors to your website. For example, Internet Explorer or Firefox.', 'gglnltcs' ),  
  200. 'for' => 'gglnltcs-ga-browser',  
  201. 'label' => __( 'Browser', 'gglnltcs' ),  
  202. 'category' => __( 'Platform or Device', 'gglnltcs' ) 
  203. ),  
  204. /** Browser Version */ 
  205. 'ga:browserVersion' => array( 
  206. 'id' => 'gglnltcs-ga-browser-version',  
  207. 'name' => 'gglnltcs-ga-browser-version',  
  208. 'value' => 'ga:browserVersion',  
  209. 'title' => __( 'The browser versions used by visitors to your website. For example, 2.0.0.14', 'gglnltcs' ),  
  210. 'for' => 'gglnltcs-ga-browser-version',  
  211. 'label' => __( 'Browser Version', 'gglnltcs' ),  
  212. 'category' => __( 'Platform or Device', 'gglnltcs' ) 
  213. ),  
  214. /** Operating System */ 
  215. 'ga:operatingSystem' => array( 
  216. 'id' => 'gglnltcs-ga-operating-system',  
  217. 'name' => 'gglnltcs-ga-operating-system',  
  218. 'value' => 'ga:operatingSystem',  
  219. 'title' => __( 'The operating system used by your visitors. For example, Windows, Linux , Macintosh, iPhone, iPod.', 'gglnltcs' ),  
  220. 'for' => 'gglnltcs-ga-operating-system',  
  221. 'label' => __( 'Operating System', 'gglnltcs' ),  
  222. 'category' => __( 'Platform or Device', 'gglnltcs' ) 
  223. ),  
  224. /** Operating System Version */ 
  225. 'ga:operatingSystemVersion' => array( 
  226. 'id' => 'gglnltcs-ga-operating-system-version',  
  227. 'name' => 'gglnltcs-ga-operating-system-version',  
  228. 'value' => 'ga:operatingSystemVersion',  
  229. 'title' => __( 'The version of the operating system used by your visitors, such as XP for Windows or PPC for Macintosh.', 'gglnltcs' ),  
  230. 'for' => 'gglnltcs-ga-operating-system-version',  
  231. 'label' => __( 'Operating System Version', 'gglnltcs' ),  
  232. 'category' => __( 'Platform or Device', 'gglnltcs' ) 
  233. ),  
  234. /** Mobile Device Branding */ 
  235. 'ga:mobileDeviceBranding' => array( 
  236. 'id' => 'gglnltcs-ga-mobile-device-branding',  
  237. 'name' => 'gglnltcs-ga-mobile-device-branding',  
  238. 'value' => 'ga:mobileDeviceBranding',  
  239. 'title' => __( 'Mobile manufacturer or branded name.', 'gglnltcs' ),  
  240. 'for' => 'gglnltcs-ga-mobile-device-branding',  
  241. 'label' => __( 'Mobile Device Branding', 'gglnltcs' ),  
  242. 'category' => __( 'Platform or Device', 'gglnltcs' ),  
  243. ),  
  244. /** Mobile Device Model */ 
  245. 'ga:mobileDeviceModel' => array( 
  246. 'id' => 'gglnltcs-ga-mobile-device-model',  
  247. 'name' => 'gglnltcs-ga-mobile-device-model',  
  248. 'value' => 'ga:mobileDeviceModel',  
  249. 'title' => __( 'Mobile device model.', 'gglnltcs' ),  
  250. 'for' => 'gglnltcs-ga-mobile-device-model',  
  251. 'label' => __( 'Mobile Device Model', 'gglnltcs' ),  
  252. 'category' => __( 'Platform or Device', 'gglnltcs' ) 
  253. ),  
  254. /** Mobile Input Selector */ 
  255. 'ga:mobileInputSelector' => array( 
  256. 'id' => 'gglnltcs-ga-mobile-input-selector',  
  257. 'name' => 'gglnltcs-ga-mobile-input-selector',  
  258. 'value' => 'ga:mobileInputSelector',  
  259. 'title' => __( 'Selector used on the mobile device (e.g.: touchscreen, joystick, clickwheel, stylus).', 'gglnltcs' ),  
  260. 'for' => 'gglnltcs-ga-mobile-input-selector',  
  261. 'label' => __( 'Mobile Input Selector', 'gglnltcs' ),  
  262. 'category' => __( 'Platform or Device', 'gglnltcs' ),  
  263. ),  
  264. /** Device Category */ 
  265. 'ga:deviceCategory' => array( 
  266. 'id' => 'gglnltcs-ga-device-category',  
  267. 'name' => 'gglnltcs-ga-device-category',  
  268. 'value' => 'ga:deviceCategory',  
  269. 'title' => __( 'The type of device: desktop, tablet, or mobile.', 'gglnltcs' ),  
  270. 'for' => 'gglnltcs-ga-device-category',  
  271. 'label' => __( 'Device Category', 'gglnltcs' ),  
  272. 'category' => __( 'Platform or Device', 'gglnltcs' ) 
  273. ),  
  274. /** Time **/ 
  275. /** Year */ 
  276. 'ga:year' => array( 
  277. 'id' => 'gglnltcs-ga-year',  
  278. 'name' => 'gglnltcs-ga-year',  
  279. 'value' => 'ga:year',  
  280. 'title' => __( 'The year of the visit. A four-digit year from 2005 to the current year.', 'gglnltcs' ),  
  281. 'for' => 'gglnltcs-ga-year',  
  282. 'label' => _x( 'Year', 'table-head', 'gglnltcs' ),  
  283. 'category' => __( 'Time', 'gglnltcs' ) 
  284. ),  
  285. /** Month of the year */ 
  286. 'ga:month' => array( 
  287. 'id' => 'gglnltcs-ga-month',  
  288. 'name' => 'gglnltcs-ga-month',  
  289. 'value' => 'ga:month',  
  290. 'title' => __( 'The month of the visit. A two digit integer from 01 to 12.', 'gglnltcs' ),  
  291. 'for' => 'gglnltcs-ga-month',  
  292. 'label' => _x( 'Month', 'table-head', 'gglnltcs' ),  
  293. 'category' => __( 'Time', 'gglnltcs' ) 
  294. ),  
  295. /** Week of the Year */ 
  296. 'ga:week' => array( 
  297. 'id' => 'gglnltcs-ga-week',  
  298. 'name' => 'gglnltcs-ga-week',  
  299. 'value' => 'ga:week',  
  300. 'title' => __( 'The week of the visit. A two-digit number from 01 to 53. Each week starts on Sunday.', 'gglnltcs' ),  
  301. 'for' => 'gglnltcs-ga-week',  
  302. 'label' => __( 'Week of the Year', 'gglnltcs' ),  
  303. 'category' => __( 'Time', 'gglnltcs' ) 
  304. ),  
  305. /** Day of the month */ 
  306. 'ga:day' => array( 
  307. 'id' => 'gglnltcs-ga-day',  
  308. 'name' => 'gglnltcs-ga-day',  
  309. 'value' => 'ga:day',  
  310. 'title' => __( 'The day of the month. A two-digit number from 01 to 31.', 'gglnltcs' ),  
  311. 'for' => 'gglnltcs-ga-day',  
  312. 'label' => _x( 'Day', 'table-head', 'gglnltcs' ),  
  313. 'category' => __( 'Time', 'gglnltcs' ) 
  314. ),  
  315. /** Hour */ 
  316. 'ga:hour' => array( 
  317. 'id' => 'gglnltcs-ga-hour',  
  318. 'name' => 'gglnltcs-ga-hour',  
  319. 'value' => 'ga:hour',  
  320. 'title' => __( 'A two-digit hour of the day ranging from 00-23 in the timezone configured for the account. This value is also corrected for daylight savings time, adhering to all local rules for daylight savings time. If your timezone follows daylight savings time, there will be an apparent bump in the number of visits during the change-over hour (e.g. between 1:00 and 2:00) for the day per year when that hour repeats. A corresponding hour with zero visits will occur at the opposite changeover. (Google Analytics does not track visitor time more precisely than hours.)', 'gglnltcs' ),  
  321. 'for' => 'gglnltcs-ga-hour',  
  322. 'label' => __( 'Hour', 'gglnltcs' ),  
  323. 'category' => __( 'Time', 'gglnltcs' ) 
  324. );