{"action":"created","comment":{"url":"https://api.github.com/repos/optimizely/marketing-website/pulls/comments/24516990","id":24516990,"diff_hunk":"@@ -117,7 +117,18 @@ w.optly.mrkt.trialForm = new Oform({\n \n       if(!w.optly.mrkt.automatedTest()){\n         setTimeout(function(){\n-          w.location = 'https://www.optimizely.com/edit?url=' + encodeURIComponent(d.getElementById('url').value) + '&' + window.location.href.split('?')[1];\n+          var redirectURL, domain, queryParams;\n+          domain = window.location.hostname;\n+          queryParams = window.location.href.split(/\\?(.+)?/)[1] || '';","path":"website-guts/assets/js/om/layouts/original.js","position":7,"original_position":7,"commit_id":"9fad098885cc10b0dbb77c8f5f457102e763ddbc","original_commit_id":"9fad098885cc10b0dbb77c8f5f457102e763ddbc","user":{"login":"kylerush","id":150579,"avatar_url":"https://avatars.githubusercontent.com/u/150579?v=3","gravatar_id":"","url":"https://api.github.com/users/kylerush","html_url":"https://github.com/kylerush","followers_url":"https://api.github.com/users/kylerush/followers","following_url":"https://api.github.com/users/kylerush/following{/other_user}","gists_url":"https://api.github.com/users/kylerush/gists{/gist_id}","starred_url":"https://api.github.com/users/kylerush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylerush/subscriptions","organizations_url":"https://api.github.com/users/kylerush/orgs","repos_url":"https://api.github.com/users/kylerush/repos","events_url":"https://api.github.com/users/kylerush/events{/privacy}","received_events_url":"https://api.github.com/users/kylerush/received_events","type":"User","site_admin":false},"body":"@stewsmith that regex splits the string on the first \"?\" and turns the two strings into an array. so the [0] key is everything before the \"?\" and the [1] key is everything after.","created_at":"2015-02-11T18:02:38Z","updated_at":"2015-02-11T18:02:38Z","html_url":"https://github.com/optimizely/marketing-website/pull/844#discussion_r24516990","pull_request_url":"https://api.github.com/repos/optimizely/marketing-website/pulls/844","_links":{"self":{"href":"https://api.github.com/repos/optimizely/marketing-website/pulls/comments/24516990"},"html":{"href":"https://github.com/optimizely/marketing-website/pull/844#discussion_r24516990"},"pull_request":{"href":"https://api.github.com/repos/optimizely/marketing-website/pulls/844"}}},"pull_request":{"url":"https://api.github.com/repos/optimizely/marketing-website/pulls/844","id":29046884,"html_url":"https://github.com/optimizely/marketing-website/pull/844","diff_url":"https://github.com/optimizely/marketing-website/pull/844.diff","patch_url":"https://github.com/optimizely/marketing-website/pull/844.patch","issue_url":"https://api.github.com/repos/optimizely/marketing-website/issues/844","number":844,"state":"open","locked":false,"title":"Adjust PPC redirect.","user":{"login":"kylerush","id":150579,"avatar_url":"https://avatars.githubusercontent.com/u/150579?v=3","gravatar_id":"","url":"https://api.github.com/users/kylerush","html_url":"https://github.com/kylerush","followers_url":"https://api.github.com/users/kylerush/followers","following_url":"https://api.github.com/users/kylerush/following{/other_user}","gists_url":"https://api.github.com/users/kylerush/gists{/gist_id}","starred_url":"https://api.github.com/users/kylerush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylerush/subscriptions","organizations_url":"https://api.github.com/users/kylerush/orgs","repos_url":"https://api.github.com/users/kylerush/repos","events_url":"https://api.github.com/users/kylerush/events{/privacy}","received_events_url":"https://api.github.com/users/kylerush/received_events","type":"User","site_admin":false},"body":"Per MKT-1126\r\n\r\nTo test:\r\n\r\n1. Open your host file\r\n2. Point both wwww.optimizely.com and www.optimizely.de to your local server. Example: \r\n```\r\n0.0.0.0 www.optimizely.com\r\n0.0.0.0 www.optimizely.de\r\n```\r\n3. Save the changes to your host file\r\n4. Visit both www.optimizely.de:9000/free-trial and www.optimizely.com:9000/free-trial\r\n5. Submit the form. You should be taken to the german editor on .de when you submit on the German page and the US editor on .com when you submit on the .com domain.\r\n6. MAKE SURE YOU REVERT THE CHANGES TO YOUR HOST FILE","created_at":"2015-02-10T21:34:05Z","updated_at":"2015-02-11T18:02:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"412bb51297d9fa7e06105a35dd0f33fa9a22fd40","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/optimizely/marketing-website/pulls/844/commits","review_comments_url":"https://api.github.com/repos/optimizely/marketing-website/pulls/844/comments","review_comment_url":"https://api.github.com/repos/optimizely/marketing-website/pulls/comments/{number}","comments_url":"https://api.github.com/repos/optimizely/marketing-website/issues/844/comments","statuses_url":"https://api.github.com/repos/optimizely/marketing-website/statuses/9fad098885cc10b0dbb77c8f5f457102e763ddbc","head":{"label":"optimizely:krush/adjust-om-redirect","ref":"krush/adjust-om-redirect","sha":"9fad098885cc10b0dbb77c8f5f457102e763ddbc","user":{"login":"optimizely","id":1274132,"avatar_url":"https://avatars.githubusercontent.com/u/1274132?v=3","gravatar_id":"","url":"https://api.github.com/users/optimizely","html_url":"https://github.com/optimizely","followers_url":"https://api.github.com/users/optimizely/followers","following_url":"https://api.github.com/users/optimizely/following{/other_user}","gists_url":"https://api.github.com/users/optimizely/gists{/gist_id}","starred_url":"https://api.github.com/users/optimizely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/optimizely/subscriptions","organizations_url":"https://api.github.com/users/optimizely/orgs","repos_url":"https://api.github.com/users/optimizely/repos","events_url":"https://api.github.com/users/optimizely/events{/privacy}","received_events_url":"https://api.github.com/users/optimizely/received_events","type":"Organization","site_admin":false},"repo":{"id":16794397,"name":"marketing-website","full_name":"optimizely/marketing-website","owner":{"login":"optimizely","id":1274132,"avatar_url":"https://avatars.githubusercontent.com/u/1274132?v=3","gravatar_id":"","url":"https://api.github.com/users/optimizely","html_url":"https://github.com/optimizely","followers_url":"https://api.github.com/users/optimizely/followers","following_url":"https://api.github.com/users/optimizely/following{/other_user}","gists_url":"https://api.github.com/users/optimizely/gists{/gist_id}","starred_url":"https://api.github.com/users/optimizely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/optimizely/subscriptions","organizations_url":"https://api.github.com/users/optimizely/orgs","repos_url":"https://api.github.com/users/optimizely/repos","events_url":"https://api.github.com/users/optimizely/events{/privacy}","received_events_url":"https://api.github.com/users/optimizely/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/optimizely/marketing-website","description":"Optimizely's marketing website--in progress.","fork":false,"url":"https://api.github.com/repos/optimizely/marketing-website","forks_url":"https://api.github.com/repos/optimizely/marketing-website/forks","keys_url":"https://api.github.com/repos/optimizely/marketing-website/keys{/key_id}","collaborators_url":"https://api.github.com/repos/optimizely/marketing-website/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/optimizely/marketing-website/teams","hooks_url":"https://api.github.com/repos/optimizely/marketing-website/hooks","issue_events_url":"https://api.github.com/repos/optimizely/marketing-website/issues/events{/number}","events_url":"https://api.github.com/repos/optimizely/marketing-website/events","assignees_url":"https://api.github.com/repos/optimizely/marketing-website/assignees{/user}","branches_url":"https://api.github.com/repos/optimizely/marketing-website/branches{/branch}","tags_url":"https://api.github.com/repos/optimizely/marketing-website/tags","blobs_url":"https://api.github.com/repos/optimizely/marketing-website/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/optimizely/marketing-website/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/optimizely/marketing-website/git/refs{/sha}","trees_url":"https://api.github.com/repos/optimizely/marketing-website/git/trees{/sha}","statuses_url":"https://api.github.com/repos/optimizely/marketing-website/statuses/{sha}","languages_url":"https://api.github.com/repos/optimizely/marketing-website/languages","stargazers_url":"https://api.github.com/repos/optimizely/marketing-website/stargazers","contributors_url":"https://api.github.com/repos/optimizely/marketing-website/contributors","subscribers_url":"https://api.github.com/repos/optimizely/marketing-website/subscribers","subscription_url":"https://api.github.com/repos/optimizely/marketing-website/subscription","commits_url":"https://api.github.com/repos/optimizely/marketing-website/commits{/sha}","git_commits_url":"https://api.github.com/repos/optimizely/marketing-website/git/commits{/sha}","comments_url":"https://api.github.com/repos/optimizely/marketing-website/comments{/number}","issue_comment_url":"https://api.github.com/repos/optimizely/marketing-website/issues/comments/{number}","contents_url":"https://api.github.com/repos/optimizely/marketing-website/contents/{+path}","compare_url":"https://api.github.com/repos/optimizely/marketing-website/compare/{base}...{head}","merges_url":"https://api.github.com/repos/optimizely/marketing-website/merges","archive_url":"https://api.github.com/repos/optimizely/marketing-website/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/optimizely/marketing-website/downloads","issues_url":"https://api.github.com/repos/optimizely/marketing-website/issues{/number}","pulls_url":"https://api.github.com/repos/optimizely/marketing-website/pulls{/number}","milestones_url":"https://api.github.com/repos/optimizely/marketing-website/milestones{/number}","notifications_url":"https://api.github.com/repos/optimizely/marketing-website/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/optimizely/marketing-website/labels{/name}","releases_url":"https://api.github.com/repos/optimizely/marketing-website/releases{/id}","created_at":"2014-02-13T06:45:06Z","updated_at":"2015-02-11T03:10:33Z","pushed_at":"2015-02-11T17:15:07Z","git_url":"git://github.com/optimizely/marketing-website.git","ssh_url":"git@github.com:optimizely/marketing-website.git","clone_url":"https://github.com/optimizely/marketing-website.git","svn_url":"https://github.com/optimizely/marketing-website","homepage":"https://www.optimizely.com","size":384808,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":25,"forks":12,"open_issues":25,"watchers":14,"default_branch":"master"}},"base":{"label":"optimizely:master","ref":"master","sha":"d34e0f442f7b996582eb5299dcd8ae2aaf796132","user":{"login":"optimizely","id":1274132,"avatar_url":"https://avatars.githubusercontent.com/u/1274132?v=3","gravatar_id":"","url":"https://api.github.com/users/optimizely","html_url":"https://github.com/optimizely","followers_url":"https://api.github.com/users/optimizely/followers","following_url":"https://api.github.com/users/optimizely/following{/other_user}","gists_url":"https://api.github.com/users/optimizely/gists{/gist_id}","starred_url":"https://api.github.com/users/optimizely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/optimizely/subscriptions","organizations_url":"https://api.github.com/users/optimizely/orgs","repos_url":"https://api.github.com/users/optimizely/repos","events_url":"https://api.github.com/users/optimizely/events{/privacy}","received_events_url":"https://api.github.com/users/optimizely/received_events","type":"Organization","site_admin":false},"repo":{"id":16794397,"name":"marketing-website","full_name":"optimizely/marketing-website","owner":{"login":"optimizely","id":1274132,"avatar_url":"https://avatars.githubusercontent.com/u/1274132?v=3","gravatar_id":"","url":"https://api.github.com/users/optimizely","html_url":"https://github.com/optimizely","followers_url":"https://api.github.com/users/optimizely/followers","following_url":"https://api.github.com/users/optimizely/following{/other_user}","gists_url":"https://api.github.com/users/optimizely/gists{/gist_id}","starred_url":"https://api.github.com/users/optimizely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/optimizely/subscriptions","organizations_url":"https://api.github.com/users/optimizely/orgs","repos_url":"https://api.github.com/users/optimizely/repos","events_url":"https://api.github.com/users/optimizely/events{/privacy}","received_events_url":"https://api.github.com/users/optimizely/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/optimizely/marketing-website","description":"Optimizely's marketing website--in progress.","fork":false,"url":"https://api.github.com/repos/optimizely/marketing-website","forks_url":"https://api.github.com/repos/optimizely/marketing-website/forks","keys_url":"https://api.github.com/repos/optimizely/marketing-website/keys{/key_id}","collaborators_url":"https://api.github.com/repos/optimizely/marketing-website/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/optimizely/marketing-website/teams","hooks_url":"https://api.github.com/repos/optimizely/marketing-website/hooks","issue_events_url":"https://api.github.com/repos/optimizely/marketing-website/issues/events{/number}","events_url":"https://api.github.com/repos/optimizely/marketing-website/events","assignees_url":"https://api.github.com/repos/optimizely/marketing-website/assignees{/user}","branches_url":"https://api.github.com/repos/optimizely/marketing-website/branches{/branch}","tags_url":"https://api.github.com/repos/optimizely/marketing-website/tags","blobs_url":"https://api.github.com/repos/optimizely/marketing-website/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/optimizely/marketing-website/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/optimizely/marketing-website/git/refs{/sha}","trees_url":"https://api.github.com/repos/optimizely/marketing-website/git/trees{/sha}","statuses_url":"https://api.github.com/repos/optimizely/marketing-website/statuses/{sha}","languages_url":"https://api.github.com/repos/optimizely/marketing-website/languages","stargazers_url":"https://api.github.com/repos/optimizely/marketing-website/stargazers","contributors_url":"https://api.github.com/repos/optimizely/marketing-website/contributors","subscribers_url":"https://api.github.com/repos/optimizely/marketing-website/subscribers","subscription_url":"https://api.github.com/repos/optimizely/marketing-website/subscription","commits_url":"https://api.github.com/repos/optimizely/marketing-website/commits{/sha}","git_commits_url":"https://api.github.com/repos/optimizely/marketing-website/git/commits{/sha}","comments_url":"https://api.github.com/repos/optimizely/marketing-website/comments{/number}","issue_comment_url":"https://api.github.com/repos/optimizely/marketing-website/issues/comments/{number}","contents_url":"https://api.github.com/repos/optimizely/marketing-website/contents/{+path}","compare_url":"https://api.github.com/repos/optimizely/marketing-website/compare/{base}...{head}","merges_url":"https://api.github.com/repos/optimizely/marketing-website/merges","archive_url":"https://api.github.com/repos/optimizely/marketing-website/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/optimizely/marketing-website/downloads","issues_url":"https://api.github.com/repos/optimizely/marketing-website/issues{/number}","pulls_url":"https://api.github.com/repos/optimizely/marketing-website/pulls{/number}","milestones_url":"https://api.github.com/repos/optimizely/marketing-website/milestones{/number}","notifications_url":"https://api.github.com/repos/optimizely/marketing-website/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/optimizely/marketing-website/labels{/name}","releases_url":"https://api.github.com/repos/optimizely/marketing-website/releases{/id}","created_at":"2014-02-13T06:45:06Z","updated_at":"2015-02-11T03:10:33Z","pushed_at":"2015-02-11T17:15:07Z","git_url":"git://github.com/optimizely/marketing-website.git","ssh_url":"git@github.com:optimizely/marketing-website.git","clone_url":"https://github.com/optimizely/marketing-website.git","svn_url":"https://github.com/optimizely/marketing-website","homepage":"https://www.optimizely.com","size":384808,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":25,"forks":12,"open_issues":25,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/optimizely/marketing-website/pulls/844"},"html":{"href":"https://github.com/optimizely/marketing-website/pull/844"},"issue":{"href":"https://api.github.com/repos/optimizely/marketing-website/issues/844"},"comments":{"href":"https://api.github.com/repos/optimizely/marketing-website/issues/844/comments"},"review_comments":{"href":"https://api.github.com/repos/optimizely/marketing-website/pulls/844/comments"},"review_comment":{"href":"https://api.github.com/repos/optimizely/marketing-website/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/optimizely/marketing-website/pulls/844/commits"},"statuses":{"href":"https://api.github.com/repos/optimizely/marketing-website/statuses/9fad098885cc10b0dbb77c8f5f457102e763ddbc"}}}}