Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-1947 Plus checkout UTM params #499

Merged
merged 4 commits into from Feb 21, 2020
Merged

GH-1947 Plus checkout UTM params #499

merged 4 commits into from Feb 21, 2020

Conversation

@benstrumeyer
Copy link
Contributor

@benstrumeyer benstrumeyer commented Feb 19, 2020

  • [*] Have you followed the guidelines in CONTRIBUTING.md?
  • [*] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • [*] Have you added an explanation of what your changes do?
  • [*] Does your submission pass tests?
  • [*] Did you lint your code prior to submission?
  • Add UTM params to Plus checkout from all locations

Ticket: https://cliqztix.atlassian.net/browse/GH-1947

@benstrumeyer benstrumeyer requested review from Eden12345, zarembsky and ghostery/ghostery as code owners Feb 19, 2020
_locales/en/messages.json Outdated Show resolved Hide resolved
src/background.js Outdated Show resolved Hide resolved
sendMessage('account.openCheckoutPage');
export function openCheckoutPage(from) {
sendMessage('account.openCheckoutPage', {
from

This comment has been minimized.

@christophertino

christophertino Feb 21, 2020
Member

Change this property to utms

This comment has been minimized.

@benstrumeyer

benstrumeyer Feb 21, 2020
Author Contributor

Good name!

@@ -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;

This comment has been minimized.

@christophertino

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

This comment has been minimized.

@benstrumeyer

benstrumeyer Feb 21, 2020
Author Contributor

I like that this removes the if statement on a magic string

@christophertino christophertino added this to the 8.4.7 milestone Feb 21, 2020
@christophertino christophertino merged commit b9186bc into develop Feb 21, 2020
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@christophertino christophertino deleted the plus-utm-params branch Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants