{"action":"created","issue":{"url":"https://api.github.com/repos/mautic/mautic/issues/6043","repository_url":"https://api.github.com/repos/mautic/mautic","labels_url":"https://api.github.com/repos/mautic/mautic/issues/6043/labels{/name}","comments_url":"https://api.github.com/repos/mautic/mautic/issues/6043/comments","events_url":"https://api.github.com/repos/mautic/mautic/issues/6043/events","html_url":"https://github.com/mautic/mautic/pull/6043","id":320260604,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg1OTcyNzE2","number":6043,"title":"Store tokens in redirect URLs and replace the tokens on redirect","user":{"login":"escopecz","id":1235442,"node_id":"MDQ6VXNlcjEyMzU0NDI=","avatar_url":"https://avatars2.githubusercontent.com/u/1235442?v=4","gravatar_id":"","url":"https://api.github.com/users/escopecz","html_url":"https://github.com/escopecz","followers_url":"https://api.github.com/users/escopecz/followers","following_url":"https://api.github.com/users/escopecz/following{/other_user}","gists_url":"https://api.github.com/users/escopecz/gists{/gist_id}","starred_url":"https://api.github.com/users/escopecz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/escopecz/subscriptions","organizations_url":"https://api.github.com/users/escopecz/orgs","repos_url":"https://api.github.com/users/escopecz/repos","events_url":"https://api.github.com/users/escopecz/events{/privacy}","received_events_url":"https://api.github.com/users/escopecz/received_events","type":"User","site_admin":false},"labels":[{"id":908369027,"node_id":"MDU6TGFiZWw5MDgzNjkwMjc=","url":"https://api.github.com/repos/mautic/mautic/labels/BC%20Break","name":"BC Break","color":"ededed","default":false},{"id":235218107,"node_id":"MDU6TGFiZWwyMzUyMTgxMDc=","url":"https://api.github.com/repos/mautic/mautic/labels/Code%20Review","name":"Code Review","color":"fcc4da","default":false},{"id":810138820,"node_id":"MDU6TGFiZWw4MTAxMzg4MjA=","url":"https://api.github.com/repos/mautic/mautic/labels/Enhancement","name":"Enhancement","color":"2037aa","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/mautic/mautic/milestones/44","html_url":"https://github.com/mautic/mautic/milestone/44","labels_url":"https://api.github.com/repos/mautic/mautic/milestones/44/labels","id":3209824,"node_id":"MDk6TWlsZXN0b25lMzIwOTgyNA==","number":44,"title":"2.14.0","description":"This release will include a large number of new features as well as a few critical fixes. Primarily campaign and segment refactoring will be included.","creator":{"login":"dbhurley","id":5251425,"node_id":"MDQ6VXNlcjUyNTE0MjU=","avatar_url":"https://avatars1.githubusercontent.com/u/5251425?v=4","gravatar_id":"","url":"https://api.github.com/users/dbhurley","html_url":"https://github.com/dbhurley","followers_url":"https://api.github.com/users/dbhurley/followers","following_url":"https://api.github.com/users/dbhurley/following{/other_user}","gists_url":"https://api.github.com/users/dbhurley/gists{/gist_id}","starred_url":"https://api.github.com/users/dbhurley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbhurley/subscriptions","organizations_url":"https://api.github.com/users/dbhurley/orgs","repos_url":"https://api.github.com/users/dbhurley/repos","events_url":"https://api.github.com/users/dbhurley/events{/privacy}","received_events_url":"https://api.github.com/users/dbhurley/received_events","type":"User","site_admin":false},"open_issues":65,"closed_issues":49,"state":"open","created_at":"2018-03-22T16:56:09Z","updated_at":"2018-06-22T11:25:33Z","due_on":"2018-06-26T07:00:00Z","closed_at":null},"comments":6,"created_at":"2018-05-04T12:42:39Z","updated_at":"2018-06-22T15:38:15Z","closed_at":"2018-05-11T14:42:25Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/mautic/mautic/pulls/6043","html_url":"https://github.com/mautic/mautic/pull/6043","diff_url":"https://github.com/mautic/mautic/pull/6043.diff","patch_url":"https://github.com/mautic/mautic/pull/6043.patch"},"body":"\r\n**Please be sure you are submitting this against the _staging_ branch.**\r\n\r\n[//]: # ( Please answer the following questions: )\r\n\r\n| Q  | A\r\n| --- | ---\r\n| Bug fix? | Y\r\n| New feature? | Y\r\n| Automated tests included? | Y\r\n| Related user documentation PR URL | N\r\n| Related developer documentation PR URL | /\r\n| Issues addressed (#s or URLs) | https://github.com/mautic/mautic/issues/5345, https://github.com/mautic/mautic/issues/3825, https://github.com/mautic/mautic/issues/6013\r\n| BC breaks? | N\r\n| Deprecations? | N\r\n\r\n[//]: # ( Note that all new features should have a related user and/or developer documentation PR in their respective repositories. )\r\n\r\n[//]: # ( Required: )\r\n#### Description:\r\nThe links containing tokens aren't being tracked. The reason is that each such link can be different and the click stats would be messy then.\r\n\r\nThis PR ignores the tokens in the links on email send so the URLs with tokens are saved to the `page_redirects` table. The tokens are translated to the contact values during the redirect.\r\n\r\nThis is how the URLs that contain tokens are displayed with some clicks:\r\n![screen shot 2018-05-08 at 13 30 38](https://user-images.githubusercontent.com/1235442/39754908-0ccab3ba-52c4-11e8-8d8c-846ba39017fb.png)\r\n\r\n#### Steps to test this PR:\r\n1. Create a segment email.\r\n2. Create some different button/link variants.\r\n    2.1. One link which consist entirely from a token. Like `href=\"{contactfield=website}`\r\n    2.2. One link which use a token in the path. Like `href=\"http://mautic.org/{contactfield=firstname}`\r\n    2.3. One link which use a token in the URL query. Like `href=\"https://mautic.org?email={contactfield=email}`\r\n    2.4. One link which use a token with default value. Like `href=\"{contactfield=nofield|http://johnlinhart.com}`\r\n    2.5. Try some other variation that can cause a problem that I didn't think of. Just try to break it!\r\n3. Go to the Advanced tab and auto-generate the text message from the HTML message.\r\n4. Ensure at least on contact from your test segment has a website, one has a firstname value.\r\n5. Send the email to a list of your test contacts. \r\n6. Try to open the links from the emails you got in a incognito browser and see where it redirect. Ensure it's the right URL and that URL query (the email address) is URL-encoded. \r\n7. Don't forget to check the text version of the email and that the links in it are working too."},"comment":{"url":"https://api.github.com/repos/mautic/mautic/issues/comments/399484297","html_url":"https://github.com/mautic/mautic/pull/6043#issuecomment-399484297","issue_url":"https://api.github.com/repos/mautic/mautic/issues/6043","id":399484297,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTQ4NDI5Nw==","user":{"login":"npracht","id":14075239,"node_id":"MDQ6VXNlcjE0MDc1MjM5","avatar_url":"https://avatars2.githubusercontent.com/u/14075239?v=4","gravatar_id":"","url":"https://api.github.com/users/npracht","html_url":"https://github.com/npracht","followers_url":"https://api.github.com/users/npracht/followers","following_url":"https://api.github.com/users/npracht/following{/other_user}","gists_url":"https://api.github.com/users/npracht/gists{/gist_id}","starred_url":"https://api.github.com/users/npracht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npracht/subscriptions","organizations_url":"https://api.github.com/users/npracht/orgs","repos_url":"https://api.github.com/users/npracht/repos","events_url":"https://api.github.com/users/npracht/events{/privacy}","received_events_url":"https://api.github.com/users/npracht/received_events","type":"User","site_admin":false},"created_at":"2018-06-22T15:38:15Z","updated_at":"2018-06-22T15:38:15Z","author_association":"MEMBER","body":"Oh great, please let me know :)\r\nHave a nice weekend !"}}
{"actor":{"display_login":"npracht"}}