Skip to content

Commit

Permalink
stats: change query string in PiwikExporter
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiaraBi committed Oct 16, 2018
1 parent f0352e1 commit fd46644
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions zenodo/modules/stats/exporters.py
Expand Up @@ -128,13 +128,14 @@ def _build_query_string(self, event):
_id=visitor_id,
cid=visitor_id,
cvar=cvar,
country=event.country,
cdt=event.timestamp,
urlref=event.referrer,
action_name=action_name
)

if 'file_key' in event:
if event.to_dict().get('country'):
params['country'] = event.country.lower()
if event.to_dict().get('file_key'):
params['url'] = ui_link_for('record_file', id=event.recid,
filename=event.file_key)
params['download'] = params['url']
Expand Down

0 comments on commit fd46644

Please sign in to comment.