{"action":"created","issue":{"url":"https://api.github.com/repos/affiliatewp/AffiliateWP/issues/876","labels_url":"https://api.github.com/repos/affiliatewp/AffiliateWP/issues/876/labels{/name}","comments_url":"https://api.github.com/repos/affiliatewp/AffiliateWP/issues/876/comments","events_url":"https://api.github.com/repos/affiliatewp/AffiliateWP/issues/876/events","html_url":"https://github.com/affiliatewp/AffiliateWP/issues/876","id":109910187,"number":876,"title":"URLs in Visits table incorrect with pretty permalinks enabled","user":{"login":"ghost1227","id":36433,"avatar_url":"https://avatars.githubusercontent.com/u/36433?v=3","gravatar_id":"","url":"https://api.github.com/users/ghost1227","html_url":"https://github.com/ghost1227","followers_url":"https://api.github.com/users/ghost1227/followers","following_url":"https://api.github.com/users/ghost1227/following{/other_user}","gists_url":"https://api.github.com/users/ghost1227/gists{/gist_id}","starred_url":"https://api.github.com/users/ghost1227/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghost1227/subscriptions","organizations_url":"https://api.github.com/users/ghost1227/orgs","repos_url":"https://api.github.com/users/ghost1227/repos","events_url":"https://api.github.com/users/ghost1227/events{/privacy}","received_events_url":"https://api.github.com/users/ghost1227/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/affiliatewp/AffiliateWP/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"ghost1227","id":36433,"avatar_url":"https://avatars.githubusercontent.com/u/36433?v=3","gravatar_id":"","url":"https://api.github.com/users/ghost1227","html_url":"https://github.com/ghost1227","followers_url":"https://api.github.com/users/ghost1227/followers","following_url":"https://api.github.com/users/ghost1227/following{/other_user}","gists_url":"https://api.github.com/users/ghost1227/gists{/gist_id}","starred_url":"https://api.github.com/users/ghost1227/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghost1227/subscriptions","organizations_url":"https://api.github.com/users/ghost1227/orgs","repos_url":"https://api.github.com/users/ghost1227/repos","events_url":"https://api.github.com/users/ghost1227/events{/privacy}","received_events_url":"https://api.github.com/users/ghost1227/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/affiliatewp/AffiliateWP/milestones/39","html_url":"https://github.com/affiliatewp/AffiliateWP/milestones/1.8","labels_url":"https://api.github.com/repos/affiliatewp/AffiliateWP/milestones/39/labels","id":1091448,"number":39,"title":"1.8","description":null,"creator":{"login":"pippinsplugins","id":1034109,"avatar_url":"https://avatars.githubusercontent.com/u/1034109?v=3","gravatar_id":"","url":"https://api.github.com/users/pippinsplugins","html_url":"https://github.com/pippinsplugins","followers_url":"https://api.github.com/users/pippinsplugins/followers","following_url":"https://api.github.com/users/pippinsplugins/following{/other_user}","gists_url":"https://api.github.com/users/pippinsplugins/gists{/gist_id}","starred_url":"https://api.github.com/users/pippinsplugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pippinsplugins/subscriptions","organizations_url":"https://api.github.com/users/pippinsplugins/orgs","repos_url":"https://api.github.com/users/pippinsplugins/repos","events_url":"https://api.github.com/users/pippinsplugins/events{/privacy}","received_events_url":"https://api.github.com/users/pippinsplugins/received_events","type":"User","site_admin":false},"open_issues":26,"closed_issues":1,"state":"open","created_at":"2015-04-30T17:29:30Z","updated_at":"2015-10-06T00:19:57Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2015-10-06T00:07:21Z","updated_at":"2015-10-06T18:01:47Z","closed_at":null,"body":"While working on #843, I discovered that with pretty permalinks enabled for affiliate URLs, the visits table displays landing pages inclusive of the ref variable as shown below:\r\n\r\n![](http://cloud.section214.com/image/0I0O102F0v1z/Image%202015-10-05%20at%206.56.48%20PM.png)\r\n\r\nWithout pretty permalinks, the `?ref=x` query variable is removed before it is displayed. This is handled in the `includes/class-visits-db.php` file through the following line:\r\n\r\n`$data['url'] = remove_query_arg( affiliate_wp()->tracking->get_referral_var(), $data['url'] );`\r\n\r\nRemoving the query arg this way doesn't work with pretty permalinks, so we'll have to find another way to handle it or add a check for pretty permalinks and strip the ref some other way."},"comment":{"url":"https://api.github.com/repos/affiliatewp/AffiliateWP/issues/comments/145947582","html_url":"https://github.com/affiliatewp/AffiliateWP/issues/876#issuecomment-145947582","issue_url":"https://api.github.com/repos/affiliatewp/AffiliateWP/issues/876","id":145947582,"user":{"login":"pippinsplugins","id":1034109,"avatar_url":"https://avatars.githubusercontent.com/u/1034109?v=3","gravatar_id":"","url":"https://api.github.com/users/pippinsplugins","html_url":"https://github.com/pippinsplugins","followers_url":"https://api.github.com/users/pippinsplugins/followers","following_url":"https://api.github.com/users/pippinsplugins/following{/other_user}","gists_url":"https://api.github.com/users/pippinsplugins/gists{/gist_id}","starred_url":"https://api.github.com/users/pippinsplugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pippinsplugins/subscriptions","organizations_url":"https://api.github.com/users/pippinsplugins/orgs","repos_url":"https://api.github.com/users/pippinsplugins/repos","events_url":"https://api.github.com/users/pippinsplugins/events{/privacy}","received_events_url":"https://api.github.com/users/pippinsplugins/received_events","type":"User","site_admin":false},"created_at":"2015-10-06T18:01:47Z","updated_at":"2015-10-06T18:01:47Z","body":"It's intentionally not defined as a query var."}}