Project

General

Profile

« Previous | Next » 

Revision 60280

[Library|Trunk]

Piwik: download give the current url instead of the blob url. Remove url parameter from trackDownload()

Metrics: add usage counts link in the logo

View differences:

modules/uoa-services-library/trunk/ng-openaire-library/src/app/searchPages/searchUtils/searchDownload.component.ts
111 111
        //window.location.href = window.URL.createObjectURL(data);
112 112
        
113 113
        if (this.isPiwikEnabled && (typeof document !== 'undefined')) {
114
          this.subscriptions.push(this._piwikService.trackDownload(this.properties, url, this.piwikSiteId).subscribe());
114
          this.subscriptions.push(this._piwikService.trackDownload(this.properties, this.piwikSiteId).subscribe());
115 115
        }
116 116
      },
117 117
      error => {
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/organization/organization.component.ts
361 361
        
362 362
        //window.open(window.URL.createObjectURL(data));
363 363
        if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
364
          this.subscriptions.push(this._piwikService.trackDownload(this.properties, url, this.piwikSiteId).subscribe());
364
          this.subscriptions.push(this._piwikService.trackDownload(this.properties, this.piwikSiteId).subscribe());
365 365
        }
366 366
      },
367 367
      err => {
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/project/project.component.ts
431 431
        this.download(url, filename+".csv");
432 432

  
433 433
        if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
434
          this.subscriptions.push(this._piwikService.trackDownload(this.properties, url, this.piwikSiteId).subscribe());
434
          this.subscriptions.push(this._piwikService.trackDownload(this.properties, this.piwikSiteId).subscribe());
435 435
        }
436 436
      },
437 437
      error => {
......
537 537
          this.download(url, filename+".html");
538 538

  
539 539
          if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
540
            this.subscriptions.push(this._piwikService.trackDownload(this.properties, url, this.piwikSiteId).subscribe());
540
            this.subscriptions.push(this._piwikService.trackDownload(this.properties,  this.piwikSiteId).subscribe());
541 541
          }
542 542
        },
543 543
        err => {
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/landing-utils/metrics/metrics.component.ts
99 99
        </div>
100 100
        <div class="footer uk-flex uk-flex-middle" [@footer]="state.toString()">
101 101
          <span>Powered by</span>
102
          <img width="120" src="assets/common-assets/logo-large-usage-counts.png">
102
          <a href="https://usagecounts.openaire.eu" target="_blank">
103
            <img width="120" src="assets/common-assets/logo-large-usage-counts.png">
104
          </a>
103 105
        </div>
104 106
      </div>
105 107
    </div>
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/result/resultLanding.component.html
146 146
            <div class="main-tabs-div">
147 147
              <ng-template #summary_tab>
148 148
                <div class="uk-grid uk-margin-remove">
149
                 <!-- <div *ngIf="!hasPrimaryInfo" class="uk-width-expand uk-padding">
149
                  <div *ngIf="!hasPrimaryInfo && hasSecondaryInfo" class="uk-width-expand uk-padding">
150 150
                    <div class="uk-animation-fade uk-alert uk-alert-primary" role="alert">
151 151
                      No summary information available
152 152
                    </div>
153
                  </div>-->
153
                  </div>
154 154
                  <div *ngIf="hasPrimaryInfo" class="uk-width-expand uk-padding">
155 155
                    <!-- Description -->
156 156
                    <div *ngIf="resultLandingInfo.description" class="uk-margin-medium-bottom">
modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/piwik/piwik.service.ts
25 25

  
26 26
      }
27 27
    }
28
    trackDownload (properties:EnvProperties, downloadURL, siteId = null):any {
28
    trackDownload (properties:EnvProperties, siteId = null):any {
29 29
      var ua = this.getUserAgent();
30 30
      var referrer = this.getReferrer();
31
      var url = properties.piwikBaseUrl+((siteId!=null)?siteId:properties.piwikSiteId)+"&rec=1&url="+StringUtils.URIEncode(downloadURL)+"&download="+StringUtils.URIEncode(downloadURL)+
31
      var url = properties.piwikBaseUrl+((siteId!=null)?siteId:properties.piwikSiteId)+"&rec=1&url="+StringUtils.URIEncode(location.href)+"&download="+StringUtils.URIEncode(location.href)+
32
        "&action_name="+StringUtils.URIEncode("Download titleeee!!!!")+
32 33
      ((ua != null && ua.length > 0)?('&ua='+StringUtils.URIEncode(ua)):'')+
33 34
      ((referrer != null && referrer.length > 0)?('&urlref='+StringUtils.URIEncode(referrer)):'');
34 35
      //console.log("Piwik - trackDownload: "+url);

Also available in: Unified diff