Project

General

Profile

« Previous | Next » 

Revision 54722

probably fixed piwik-matomo analytics script

View differences:

index.html
1 1
<!doctype html>
2 2
<html lang="en">
3
<head>
4
  <meta charset="utf-8">
5
  <title>OpenAIRE's Repository Manager</title>
6
  <base href="/">
3
  <head>
4
    <meta charset="utf-8">
5
    <title>OpenAIRE's Repository Manager</title>
6
    <base href="/">
7 7

  
8
  <meta name="viewport" content="width=device-width, initial-scale=1">
9
  <link rel="icon" type="image/x-icon" href="favicon.ico">
8
    <meta name="viewport" content="width=device-width, initial-scale=1">
9
    <link rel="icon" type="image/x-icon" href="favicon.ico">
10 10

  
11 11

  
12
  <!-- Animation CSS -->
13
  <link type="text/css" href="assets/css/animate.css" rel="stylesheet">
14
  <link type="text/css" href="assets/css/font-awesome/css/font-awesome.min.css" rel="stylesheet">
15
  <link type="text/css" href="assets/css/plugins/steps/jquery.steps.css" rel="stylesheet">
12
    <!-- Animation CSS -->
13
    <link type="text/css" href="assets/css/animate.css" rel="stylesheet">
14
    <link type="text/css" href="assets/css/font-awesome/css/font-awesome.min.css" rel="stylesheet">
15
    <link type="text/css" href="assets/css/plugins/steps/jquery.steps.css" rel="stylesheet">
16 16

  
17 17

  
18
  <link type="text/css" href="assets/css/fonts/yanonekaffeesatz.css" rel="stylesheet">
18
    <link type="text/css" href="assets/css/fonts/yanonekaffeesatz.css" rel="stylesheet">
19 19

  
20
  <!-- stylesheets -->
21
  <link type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
20
    <!-- stylesheets -->
21
    <link type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
22 22

  
23
  <link type="text/css" rel="stylesheet" href="assets/css/theme.css">
23
    <link type="text/css" rel="stylesheet" href="assets/css/theme.css">
24 24

  
25
  <link type="text/css" rel="stylesheet" href="assets/css/RepositoryManager.css">
26
  <link type="text/css" rel="stylesheet" href="assets/css/custom.css">
27
  <link type="text/css" rel="stylesheet" href="assets/css/custom-provide.css">
25
    <link type="text/css" rel="stylesheet" href="assets/css/RepositoryManager.css">
26
    <link type="text/css" rel="stylesheet" href="assets/css/custom.css">
27
    <link type="text/css" rel="stylesheet" href="assets/css/custom-provide.css">
28 28

  
29
  <link type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans|Roboto|Roboto+Condensed" rel="stylesheet">
29
    <link type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans|Roboto|Roboto+Condensed" rel="stylesheet">
30 30

  
31
  <script src="dist/polyfills.bundle.js"></script>
32
  <script src="https://code.jquery.com/jquery-3.2.1.min.js"
33
          integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
31
    <script src="dist/polyfills.bundle.js"></script>
32
    <script src="https://code.jquery.com/jquery-3.2.1.min.js"
33
            integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
34 34

  
35
  <script src="assets/js/uikit-3/js/uikit.min.js"></script>
36
  <script src="assets/js/theme.js"></script>
35
    <script src="assets/js/uikit-3/js/uikit.min.js"></script>
36
    <script src="assets/js/theme.js"></script>
37 37

  
38
  <!--NEW FONT AWESOME-->
39
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css"
40
        integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
38
    <!--NEW FONT AWESOME-->
39
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css"
40
          integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
41 41

  
42
</head>
43
<body>
42
  </head>
43
  <body>
44 44

  
45
  <!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
46
  <noscript>
47
    <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
48
      Your web browser must have JavaScript enabled
49
      in order for this application to display correctly.
50
    </div>
51
  </noscript>
45
    <!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
46
    <noscript>
47
      <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
48
        Your web browser must have JavaScript enabled
49
        in order for this application to display correctly.
50
      </div>
51
    </noscript>
52 52

  
53
  <!-- Piwik -->
54
  <script type="text/javascript">
55
    var piwikUrl;
56
    if ((window.location.origin).includes('beta') ||
57
      (window.location.origin).includes('athenarc') ) {
58
      piwikUrl = 'https://analytics.openaire.eu/piwik.php?idsite=92&rec=1';
59
    } else {
60
      piwikUrl = 'https://analytics.openaire.eu/piwik.php?idsite=111&rec=1';
61
    }
62
    // document.getElementById('piwikImg').setAttribute("src", piwikUrl);
53
    <oa-repo-manager>
54
      <div uk-spinner="ratio: 2" class="uk-overlay uk-position-center uk-dark" style="margin: auto"></div>
55
    </oa-repo-manager>
63 56

  
64
    var _paq = window._paq || [];
65
    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
66
    _paq.push(['trackPageView']);
67
    _paq.push(['enableLinkTracking']);
68

  
69
    (function() {
70
      /* CREATING PIWIK IMAGE */
71
      dv = document.createElement('div');
72
      dv.setAttribute('style', 'height:0px;');
73
      im = document.createElement('img');
74
      im.setAttribute('src', piwikUrl);
75
      im.setAttribute('style', 'border:0;');
76
      im.setAttribute('alt', '');
77
      dv.appendChild(im);
78
      document.appendChild(dv);
79

  
80

  
81
      /* ORIGINAL TRACKING SCRIPT */
82
      var u="//analytics.openaire.eu/";
83
      _paq.push(['setTrackerUrl', u+'piwik.php']);
84
      if ( (window.location.origin).includes('beta') || (window.location.origin).includes('athenarc') ) {
85
        _paq.push(['setSiteId', '92']);
86
        console.log('92');
87
      } else {
88
        _paq.push(['setSiteId', '111']);
89
        console.log('111');
90
      }
91
      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
92
      g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
93
    })();
94
  </script>
95
  <!-- End Piwik Code -->
96

  
97
  <!-- PIEIK IMAGE IS NOW CREATED DYNAMICALLY USING JS -->
98
  <!--<div style="height: 0px">
99
    &lt;!&ndash; Piwik Image Tracker&ndash;&gt;
100
    <img id="piwikImg" src="https://analytics.openaire.eu/piwik.php?idsite=92&rec=1" style="border:0" alt="" />
101
    &lt;!&ndash; End Piwik &ndash;&gt;
102
  </div>-->
103

  
104

  
105
  <oa-repo-manager>
106
    <div uk-spinner="ratio: 2" class="uk-overlay uk-position-center uk-dark" style="margin: auto"></div>
107
  </oa-repo-manager>
108

  
109
</body>
57
  </body>
110 58
</html>

Also available in: Unified diff