GH-1947 Plus checkout UTM params #499
Merged
+28
−17
Conversation
app/panel/utils/msg.js
Outdated
| sendMessage('account.openCheckoutPage'); | ||
| export function openCheckoutPage(from) { | ||
| sendMessage('account.openCheckoutPage', { | ||
| from |
christophertino
Feb 21, 2020
Member
Change this property to utms
Change this property to utms
benstrumeyer
Feb 21, 2020
Author
Contributor
Good name!
Good name!
src/background.js
Outdated
| @@ -849,7 +849,14 @@ function onMessageHandler(request, sender, callback) { | |||
| return false; | |||
| } | |||
| if (name === 'account.openCheckoutPage') { | |||
| utils.openNewTab({ url: `https://checkout.${globals.GHOSTERY_DOMAIN}.com/plus`, become_active: true }); | |||
| let url = `https://checkout.${globals.GHOSTERY_DOMAIN}.com/plus`; | |||
| const { from } = message; | |||
christophertino
Feb 21, 2020
Member
Rather than checking for the source, let's just check to see if any utms are passed along with the message and append to the url string
Rather than checking for the source, let's just check to see if any utms are passed along with the message and append to the url string
benstrumeyer
Feb 21, 2020
Author
Contributor
I like that this removes the if statement on a magic string
I like that this removes the if statement on a magic string
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Ticket: https://cliqztix.atlassian.net/browse/GH-1947