A
A
Alexander2016-05-04 14:54:18
Django
Alexander, 2016-05-04 14:54:18

How is google analytical screwed correctly?

in html file I put this:

<section id="auth-button"></section>
<section id="view-selector"></section>
<section id="timeline"></section>
<script>
(function(w,d,s,g,js,fjs){
  g=w.gapi||(w.gapi={});g.analytics={q:[],ready:function(cb){this.q.push(cb)}};
  js=d.createElement(s);fjs=d.getElementsByTagName(s)[0];
  js.src='https://apis.google.com/js/platform.js';
  fjs.parentNode.insertBefore(js,fjs);js.onload=function(){g.load('analytics')};
}(window,document,'script'));
</script>
<script>
gapi.analytics.ready(function() {
  var CLIENT_ID = 77138813;
  gapi.analytics.auth.authorize({
    container: 'auth-button',
    clientid: CLIENT_ID,
  });
  var viewSelector = new gapi.analytics.ViewSelector({
    container: 'view-selector'
  });
  var timeline = new gapi.analytics.googleCharts.DataChart({
    reportType: 'ga',
    query: {
      'dimensions': 'ga:date',
      'metrics': 'ga:sessions',
      'start-date': '30daysAgo',
      'end-date': 'yesterday',
    },
    chart: {
      type: 'LINE',
      container: 'timeline'
    }
  });
gapi.analytics.auth.on('success', function(response) {
    viewSelector.execute();
  });
  viewSelector.on('change', function(ids) {
    var newIds = {
      query: {
        ids: ids
      }
    };
    timeline.set(newIds).execute();
  });
});
</script>

I refresh the page but there is nothing. Maybe it's stupid, but I'm the first to do it. Tell me what I'm doing wrong and where to dig.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
D
Denis Ineshin, 2016-05-04
@kentuck1213

By itself, the code that is Google Analytics, that Yandex.metrics on the site is not visible in any way and does not affect the appearance in any way.

M
Max Kostikov, 2016-05-04
@mxms

The main thing is that he was inside.

M
Moskus, 2015-06-06
@ayapergenov

For example, like this:

background: #2e5a89; /* Old browsers */
background: -moz-radial-gradient(center, ellipse cover,  #2e5a89 0%, #16283e 100%); /* FF3.6+ */
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#2e5a89), color-stop(100%,#16283e)); /* Chrome,Safari4+ */
background: -webkit-radial-gradient(center, ellipse cover,  #2e5a89 0%,#16283e 100%); /* Chrome10+,Safari5.1+ */
background: -o-radial-gradient(center, ellipse cover,  #2e5a89 0%,#16283e 100%); /* Opera 12+ */
background: -ms-radial-gradient(center, ellipse cover,  #2e5a89 0%,#16283e 100%); /* IE10+ */
background: radial-gradient(ellipse at center,  #2e5a89 0%,#16283e 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2e5a89', endColorstr='#16283e',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */

M
Max Payne, 2015-06-06
@YardalGedal

It will be the most creative solution :D

html {
        background: url(https://hsto.org/files/32f/eea/47c/32feea47cf134e02be7c55bcc9240b46.jpg) no-repeat center center fixed;
        -webkit-background-size: cover;
        -moz-background-size: cover;
        -o-background-size: cover;
        background-size: cover;
}

A
Alexander Loginov-Solonitsyn, 2015-06-06
@kasheibess

htmlbook.ru/css3-na-primerakh/radialnyi-gradient , and if you need to scale when resizing the parent, then only with a picture... well, for ie, you also have to insert a picture... I personally put a picture. Now apparently the fashion in the web for a radial gradient.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question