{"action":"created","issue":{"url":"https://api.github.com/repos/piwik/piwik/issues/7151","labels_url":"https://api.github.com/repos/piwik/piwik/issues/7151/labels{/name}","comments_url":"https://api.github.com/repos/piwik/piwik/issues/7151/comments","events_url":"https://api.github.com/repos/piwik/piwik/issues/7151/events","html_url":"https://github.com/piwik/piwik/pull/7151","id":56963990,"number":7151,"title":"Add option to map API tracking parameter to custom variable in log importer script.","user":{"login":"diosmosis","id":125140,"avatar_url":"https://avatars.githubusercontent.com/u/125140?v=3","gravatar_id":"","url":"https://api.github.com/users/diosmosis","html_url":"https://github.com/diosmosis","followers_url":"https://api.github.com/users/diosmosis/followers","following_url":"https://api.github.com/users/diosmosis/following{/other_user}","gists_url":"https://api.github.com/users/diosmosis/gists{/gist_id}","starred_url":"https://api.github.com/users/diosmosis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diosmosis/subscriptions","organizations_url":"https://api.github.com/users/diosmosis/orgs","repos_url":"https://api.github.com/users/diosmosis/repos","events_url":"https://api.github.com/users/diosmosis/events{/privacy}","received_events_url":"https://api.github.com/users/diosmosis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/piwik/piwik/labels/c:%20Log%20Analytics%20(import_logs.py)","name":"c: Log Analytics (import_logs.py)","color":"ededed"},{"url":"https://api.github.com/repos/piwik/piwik/labels/Enhancement","name":"Enhancement","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/piwik/piwik/milestones/72","labels_url":"https://api.github.com/repos/piwik/piwik/milestones/72/labels","id":850567,"number":72,"title":"Piwik 2.11.0","description":"Pool of tickets we pick issues to work on. This release may include DB schema upgrades.\r\n","creator":{"login":"mattab","id":466765,"avatar_url":"https://avatars.githubusercontent.com/u/466765?v=3","gravatar_id":"","url":"https://api.github.com/users/mattab","html_url":"https://github.com/mattab","followers_url":"https://api.github.com/users/mattab/followers","following_url":"https://api.github.com/users/mattab/following{/other_user}","gists_url":"https://api.github.com/users/mattab/gists{/gist_id}","starred_url":"https://api.github.com/users/mattab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattab/subscriptions","organizations_url":"https://api.github.com/users/mattab/orgs","repos_url":"https://api.github.com/users/mattab/repos","events_url":"https://api.github.com/users/mattab/events{/privacy}","received_events_url":"https://api.github.com/users/mattab/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":123,"state":"open","created_at":"2014-11-03T02:42:12Z","updated_at":"2015-02-09T23:49:49Z","due_on":"2015-02-11T11:00:00Z","closed_at":null},"comments":4,"created_at":"2015-02-08T19:29:08Z","updated_at":"2015-02-10T00:10:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/piwik/piwik/pulls/7151","html_url":"https://github.com/piwik/piwik/pull/7151","diff_url":"https://github.com/piwik/piwik/pull/7151.diff","patch_url":"https://github.com/piwik/piwik/pull/7151.patch"},"body":"This pull request adds two options to import_logs.py that move tracking API parameters to custom variables. This is for a PRO request to allow not tracking user IDs from `cs-username` using uid and instead track via a custom variable. To do this, you would specify `--api-arg-to-visit-cvar=\"uid=User Name\"`. The option references tracking API parameters so it can be used w/ any format.\r\n\r\nI think using API parameters might be limiting however. After thinking about it, it might be better to make it use regex groups. Then we can add two more options, `--ignore-fields=userid`, `--w3c-field-regex=my-custom-field=myregex` so users can import any field they want into a custom variable.\r\n\r\nIncludes change to ImportLogs system test and fix for import log custom variable handling (old behavior was to not set multiple custom variables if they were set already instead of simply adding custom variables).\r\n\r\n@mattab @quba Can you let me know what you think?"},"comment":{"url":"https://api.github.com/repos/piwik/piwik/issues/comments/73619023","html_url":"https://github.com/piwik/piwik/pull/7151#issuecomment-73619023","issue_url":"https://api.github.com/repos/piwik/piwik/issues/7151","id":73619023,"user":{"login":"diosmosis","id":125140,"avatar_url":"https://avatars.githubusercontent.com/u/125140?v=3","gravatar_id":"","url":"https://api.github.com/users/diosmosis","html_url":"https://github.com/diosmosis","followers_url":"https://api.github.com/users/diosmosis/followers","following_url":"https://api.github.com/users/diosmosis/following{/other_user}","gists_url":"https://api.github.com/users/diosmosis/gists{/gist_id}","starred_url":"https://api.github.com/users/diosmosis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diosmosis/subscriptions","organizations_url":"https://api.github.com/users/diosmosis/orgs","repos_url":"https://api.github.com/users/diosmosis/repos","events_url":"https://api.github.com/users/diosmosis/events{/privacy}","received_events_url":"https://api.github.com/users/diosmosis/received_events","type":"User","site_admin":false},"created_at":"2015-02-10T00:10:25Z","updated_at":"2015-02-10T00:10:25Z","body":"It wouldn't invalidate it, but it would be redundant since you could use the other options to do what's in this use case."}}