{"id":8424,"date":"2015-06-03T06:11:59","date_gmt":"2015-06-03T05:11:59","guid":{"rendered":"https:\/\/wp.okra.host\/article\/linking-google-analytics\/"},"modified":"2021-03-07T14:11:27","modified_gmt":"2021-03-07T13:11:27","slug":"linking-google-analytics","status":"publish","type":"ht_kb","link":"https:\/\/kb.okra.host\/de\/article\/linking-google-analytics\/","title":{"rendered":"Linking Google Analytics"},"content":{"rendered":"<h2 id=\"overview\" >\u00dcbersicht<\/h2>\n<p>Hosting platforms <a href=\"https:\/\/kb.okra.host\/de\/platform\/determining-platform-version\/\">v5+<\/a> support easy integration of Google Analytics into your Dashboard. Analytics provide a bevvy of useful metrics including unique visitor count, visitor behavior, SEO\u00a0efficacy, goal targeting,\u00a0and browser usage.<\/p>\n<div id=\"attachment_1022\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/dashboard-analytics.png\" rel=\"lightbox-0\" data-lbwps-width=\"954\" data-lbwps-height=\"522\" data-lbwps-srcsmall=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/dashboard-analytics.png\"><img decoding=\"async\" aria-describedby=\"caption-attachment-1022\" loading=\"lazy\" class=\"size-medium wp-image-1022\" src=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/dashboard-analytics-300x164.png\" alt=\"Sample Dashboard with integrated Analytics\" width=\"300\" height=\"164\" \/><\/a><\/p>\n<p id=\"caption-attachment-1022\" class=\"wp-caption-text\">Sample Dashboard with integrated Analytics<\/p>\n<\/div>\n<h2 id=\"enabling-analytics\" >Enabling Analytics<\/h2>\n<p>Analytics requires\u00a0setup within <a href=\"https:\/\/code.google.com\/apis\/console\">Google Code<\/a> and the <a href=\"https:\/\/kb.okra.host\/de\/control-panel\/logging-into-the-control-panel\/\">Bedienfeld<\/a>.<\/p>\n<p><span style=\"color: #0000ff\"><strong>Prerequisite:<\/strong>\u00a0Google Analytics must be setup before completing this. See KB: <a style=\"color: #0000ff\" href=\"https:\/\/kb.okra.host\/de\/web-content\/enabling-google-analytics-support\/\">Enabling Google Analytics support<\/a>.<\/span><\/p>\n<h3 id=\"configuring-within-google-code\" >Configuring within Google Code<\/h3>\n<ol>\n<li>Login to <a href=\"https:\/\/code.google.com\/apis\/console\">Google Code API Console<\/a>\u00a0using your Google account.<\/li>\n<li>Go to <strong>APIs &#038; Auth<\/strong> &gt; <strong>Credentials<\/strong> to create a new OAuth Client ID.<\/li>\n<li>Click on <strong>Create new Client ID<\/strong> to generate a new API ID. This will be used in the control panel to access Analytics.\n<ul>\n<li><span style=\"color: #808080\"><strong>OPTIONAL:<\/strong><\/span> If you have not previously created a product, you&#8217;ll be prompted to create one on the consent screen<img decoding=\"async\" loading=\"lazy\" class=\"wp-image-1040 size-medium aligncenter\" src=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/google-code-consent-300x190-1.png\" alt=\"Prompt to create product ID on Consent screen\" width=\"300\" height=\"190\" \/><\/li>\n<li>Click to edit the consent screen, and enter\u00a0a project name such as <em>Apis Control Panel<\/em>, then click <strong>Save<\/strong> to create this project<a href=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/google-code-consent-2.png\" rel=\"lightbox-1\" data-lbwps-width=\"841\" data-lbwps-height=\"657\" data-lbwps-srcsmall=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/google-code-consent-2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-1039 size-medium aligncenter\" src=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/google-code-consent-2-300x234-1.png\" alt=\"Create a project name\" width=\"300\" height=\"234\" \/><\/a><\/li>\n<\/ul>\n<\/li>\n<li>Select <strong>Application type<\/strong> &gt; <strong>Web application<\/strong><\/li>\n<li>Under\u00a0<strong>Authorized JavaScript origins<\/strong>, enter the suggested origin under <strong>Konto<\/strong> &gt; <strong>Settings<\/strong>. If no API key has been submitted yet, this value will appear. If an API key is present,\u00a0<em>delete<\/em> it to view the suggested origin.\n<div id=\"attachment_1023\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/origin-suggestion.png\" rel=\"lightbox-2\" data-lbwps-width=\"712\" data-lbwps-height=\"235\" data-lbwps-srcsmall=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/origin-suggestion.png\"><img decoding=\"async\" aria-describedby=\"caption-attachment-1023\" loading=\"lazy\" width=\"300\" height=\"99\" class=\"size-medium wp-image-1023\" src=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/origin-suggestion-300x99-1.png\" \/><\/p>\n<p id=\"caption-attachment-1023\" class=\"wp-caption-text\">Settings&#8221; width=&#8221;300&#8243; height=&#8221;99&#8243; \/&gt;<\/p>\n<p><\/a> Suggested authorized origin in Account &gt; Settings<\/div>\n<ul>\n<li>Use the secure variant, https:\/\/, unless you are connecting to the panel over http:\/\/<\/li>\n<\/ul>\n<\/li>\n<li>Click <strong>Create ID<\/strong>\n<ul>\n<li>This is a sample input\u00a0generated\u00a0from cp.sol.apnscp.com, your Authorized JavaScript origins and Authorized redirect URIs will differ if on a different server.\n<\/p>\n<div id=\"attachment_1024\" style=\"width: 305px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/create-client-id-modal.png\" rel=\"lightbox-3\" data-lbwps-width=\"494\" data-lbwps-height=\"503\" data-lbwps-srcsmall=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/create-client-id-modal.png\"><img decoding=\"async\" aria-describedby=\"caption-attachment-1024\" loading=\"lazy\" class=\"size-medium wp-image-1024\" src=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/create-client-id-modal-295x300-1.png\" width=\"295\" height=\"300\" \/><\/a><\/p>\n<p id=\"caption-attachment-1024\" class=\"wp-caption-text\">Configured Client ID dialog generated for an account on the server named &#8220;Sol&#8221;<\/p>\n<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li>Copy the <strong>Client ID<\/strong> value generated. This will be used later under\u00a0<span style=\"text-decoration: underline\"><span style=\"text-decoration: underline\">Configuring within the control panel<\/span><\/span>.<span style=\"text-decoration: underline\"><span style=\"text-decoration: underline\"><br \/>\n<\/span><\/span><\/p>\n<div id=\"attachment_1025\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/sample-client-id.png\" rel=\"lightbox-4\" data-lbwps-width=\"747\" data-lbwps-height=\"245\" data-lbwps-srcsmall=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/sample-client-id.png\"><img decoding=\"async\" aria-describedby=\"caption-attachment-1025\" loading=\"lazy\" class=\"size-medium wp-image-1025\" src=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/sample-client-id-300x98-1.png\" alt=\"Sample client ID generated within Google&#039;s API console. Client ID masked for security.\" width=\"300\" height=\"98\" \/><\/a><\/p>\n<p id=\"caption-attachment-1025\" class=\"wp-caption-text\">Sample client ID generated within Google&#8217;s API console. Client ID masked for security.<\/p>\n<\/div>\n<\/li>\n<li>Authorize control panel access to the Analytics API via\u00a0<strong>APIs &#038; Auth<\/strong> &gt;\u00a0<strong>APIs<\/strong>.\u00a0Under\u00a0<strong>API Library<\/strong>, search for &#8220;<em>Analytics API<\/em>&#8220;.\n<ul>\n<li>Select Analytics API.<\/li>\n<\/ul>\n<\/li>\n<li>Click on\u00a0<strong>Enable API<\/strong> if it is not enabled on your account.\n<\/p>\n<div id=\"attachment_1026\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/enable-api-button.png\" rel=\"lightbox-5\" data-lbwps-width=\"547\" data-lbwps-height=\"213\" data-lbwps-srcsmall=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/enable-api-button.png\"><img decoding=\"async\" aria-describedby=\"caption-attachment-1026\" loading=\"lazy\" class=\"size-medium wp-image-1026\" src=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/enable-api-button-300x117-1.png\" alt=\"Enable API button to enable Analytics data sharing within the control panel.\" width=\"300\" height=\"117\" \/><\/a><\/p>\n<p id=\"caption-attachment-1026\" class=\"wp-caption-text\">Enable API button to enable Analytics data sharing within the control panel.<\/p>\n<\/div>\n<\/li>\n<\/ol>\n<h3 id=\"configuring-within-the-control-panel\" >Configuring within the control panel<\/h3>\n<ol>\n<li>Visit <strong>Konto<\/strong> &gt; <strong>Settings<\/strong>. Under\u00a0<span style=\"text-decoration: underline\">Bedienfeld<\/span> enter the <strong>Client ID<\/strong> generated in the above section into <strong>Google Analytics API Key<\/strong>.<\/li>\n<li>Click\u00a0<strong>Save Changes<\/strong><\/li>\n<li>Visit <strong>Web<\/strong> &gt; <strong>.htaccess Manager<\/strong>\u00a0(note: this can also be done via the\u00a0<a href=\"https:\/\/kb.okra.host\/de\/guides\/htaccess-guide\/\">htaccess<\/a> directive ModPagespeedAnalyticsID)<\/li>\n<li>Click the Edit action to edit the\u00a0domain or subdomain to add integration.<\/li>\n<li>Click <strong>Add Directive<\/strong>\u00a0to expand the directive dialog.<\/li>\n<li style=\"text-align: left\">Under <strong>Personality<\/strong> select <code>Pagespeed<\/code>\n<ol>\n<li style=\"text-align: left\">Configure PageSpeed to use your Analytics ID:\n<ol>\n<li style=\"text-align: left\">For <strong>Directive<\/strong>, select\u00a0<code>ModPagespeedAnalyticsID <\/code><\/li>\n<li>For\u00a0<strong>Value<\/strong> enter your Analytics ID\u00a0created in KB: <a href=\"https:\/\/kb.okra.host\/de\/web-content\/enabling-google-analytics-support\/\">Enabling Google Analytics support<\/a><\/li>\n<li>Click <strong>Add<\/strong>\n<\/p>\n<div id=\"attachment_1030\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/sample-personality-input.png\" rel=\"lightbox-6\" data-lbwps-width=\"841\" data-lbwps-height=\"79\" data-lbwps-srcsmall=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/sample-personality-input.png\"><img decoding=\"async\" aria-describedby=\"caption-attachment-1030\" loading=\"lazy\" class=\"size-medium wp-image-1030\" src=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/sample-personality-input-300x28.png\" alt=\"Sample input configuring your Analytics ID.\" width=\"300\" height=\"28\" \/><\/a><\/p>\n<p id=\"caption-attachment-1030\" class=\"wp-caption-text\">Sample input configuring your Analytics ID.<\/p>\n<\/div>\n<\/li>\n<\/ol>\n<\/li>\n<li>Configure PageSpeed to inject reporting JavaScript into your web pages:\n<ol>\n<li>Enable inline Analytics injection now by changing\u00a0<strong>Directive<\/strong> from\u00a0<code>ModPageSpeedAnalyticsID<\/code> an <code>ModPageSpeedEnableFilters<\/code><\/li>\n<li>Change <strong>Value<\/strong> from your Analytics ID previously entered to\u00a0<code>insert_ga<\/code><\/li>\n<li>Click\u00a0<strong>Add<\/strong><\/li>\n<\/ol>\n<\/li>\n<li><strong>Save Changes<\/strong> to save your new .htaccess file<\/li>\n<\/ol>\n<\/li>\n<li>Go back to <strong>Konto<\/strong> &gt;\u00a0<strong>Dashboard<\/strong>. Click <em>Access Google Analytics<\/em> button to authenticate.\n<div id=\"attachment_1028\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/access-google-analytics-button.png\" rel=\"lightbox-7\" data-lbwps-width=\"1001\" data-lbwps-height=\"289\" data-lbwps-srcsmall=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/access-google-analytics-button.png\"><img decoding=\"async\" aria-describedby=\"caption-attachment-1028\" loading=\"lazy\" class=\"size-medium wp-image-1028\" src=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/06\/access-google-analytics-button-300x87-1.png\" alt=\"Access Google Analytics button to sign-on and begin sharing data with the control panel.\" width=\"300\" height=\"87\" \/><\/a><\/p>\n<p id=\"caption-attachment-1028\" class=\"wp-caption-text\">Access Google Analytics button to sign-on and begin sharing data with the control panel.<\/p>\n<\/div>\n<ul>\n<li><span style=\"color: #ff0000\"><strong>Wichtig:<\/strong><span style=\"color: #000000\"> if you receive an &#8220;<em>Error: origin_mismatch<\/em>&#8221; message, then you have incorrectly entered the\u00a0<strong>Authorized JavaScript origins<\/strong>. Return to the previous section to correct. Origin changes may take up to 15 minutes to propagate.<\/span><\/span><\/li>\n<\/ul>\n<\/li>\n<li>Refresh the page. Statistics will load.\n<ul>\n<li>If statistics fail to load, ensure Analytics API has been enabled (see previous section).<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h2 id=\"disabling-analytics\" >Disabling Analytics<\/h2>\n<p>Visit <strong>Konto<\/strong> &gt; <strong>Settings<\/strong> &gt; <span style=\"text-decoration: underline\">Bedienfeld<\/span> section &gt;\u00a0<strong>Google Analytics API Key<\/strong> &gt; <strong>Delete<\/strong> to remove API key access. This will also disable integrated Analytics.<\/p>\n<h2 id=\"limitations\" >Begrenzungen<\/h2>\n<p>Analytics only works on well-formed HTML pages. Raw files are never reflected in byte usage. For example, linking to a file directly, such as the <a href=\"http:\/\/d.goap.is\/100mb.zip\">100 MB test file<\/a>, is never reflected in usage (<em>click as much as you&#8217;d like! it is not reflected in Google Analytics usage<\/em>). However, loading an image, such as the logo or control panel sample\u00a0image\u00a0on apnscp.com, inline as part of a web page is reflected. This discrepancy occurs because Analytics must include itself in valid HTML. Sending a raw file precludes\u00a0bootstrapping by lack of a HTML document.<\/p>","protected":false},"excerpt":{"rendered":"<p>Overview Hosting platforms v5+ support easy integration of Google Analytics into your Dashboard. Analytics provide a bevvy of useful metrics including unique visitor count, visitor behavior, SEO\u00a0efficacy, goal targeting,\u00a0and browser usage. Sample Dashboard with integrated Analytics Enabling Analytics Analytics requires\u00a0setup within Google Code and the control panel. Prerequisite:\u00a0Google Analytics must&#8230;<\/p>","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[56],"ht-kb-tag":[],"class_list":["post-8424","ht_kb","type-ht_kb","status-publish","format-standard","has-post-thumbnail","hentry","ht_kb_category-control-panel"],"_links":{"self":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8424","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/comments?post=8424"}],"version-history":[{"count":2,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8424\/revisions"}],"predecessor-version":[{"id":8434,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8424\/revisions\/8434"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media\/8426"}],"wp:attachment":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media?parent=8424"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-category?post=8424"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-tag?post=8424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}