Skip to content

Jetpack Start: Allow hosts to pass a tracking ID when provisioning or cancelling a plan#8686

Merged
gravityrail merged 2 commits intomasterfrom
update/jetpack-start-partner-tracking
Feb 13, 2018
Merged

Jetpack Start: Allow hosts to pass a tracking ID when provisioning or cancelling a plan#8686
gravityrail merged 2 commits intomasterfrom
update/jetpack-start-partner-tracking

Conversation

@ebinnion
Copy link
Copy Markdown
Contributor

@ebinnion ebinnion commented Jan 31, 2018

While debugging plan provisions and cancellations, I've noticed that users will often create various clones of sites and will move a domain name around those sites.

This sometimes results in the plan for a given site being cancelled when it probably shouldn't.

We have logs in place on WordPress.com to track when a partner provisions or cancels a plan, but it sure would be nice if we could tell exactly which site the partner intended on provisioning or cancelling the plan for. After this PR, hosts will be allowed to pass in a --host_tracking_id argument which will help in debugging.

To test:

For instructions on setting up a partner ID and secret, see: PCYsg-eDL-p2

  • Checkout branch
  • Use the following command, replacing partner the arguments :
    • sh jetpack/bin/partner-provision.sh --partner_id={PARTNER_ID} --partner_secret={PARTNER_SECRET} --user={LOCAL_WP_USER_ID} --plan=professional --host_tracking_id=$some_numeric_value
  • Check logstash and ensure that id has the value that was sent via host_tracking_id

Changelog entry

  • We updated scripts for partners allowing to pass a tracking ID when provisioning or cancelling a plan which will help in debugging.

@ebinnion ebinnion added Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Needs Review This PR is ready for review. [Feature] Jetpack CLI Jetpack Start labels Jan 31, 2018
@ebinnion ebinnion added this to the 5.9 milestone Jan 31, 2018
@ebinnion ebinnion self-assigned this Jan 31, 2018
@ebinnion ebinnion requested a review from gravityrail January 31, 2018 17:22
@ebinnion ebinnion requested a review from a team as a code owner January 31, 2018 17:22
Copy link
Copy Markdown
Contributor

@oskosk oskosk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@oskosk oskosk added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Feb 8, 2018

$url = sprintf( 'https://%s/rest/v1.3/jpphp/%d/partner-provision', $this->get_api_host(), $blog_id );
if ( ! empty( $named_args['host_tracking_id'] ) ) {
$url = esc_url_raw( add_query_arg( 'host_source_id', $named_args, $url ) );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like giving this a different name on WPCOM and Jetpack could be a source of bugs in the future. Any particular reason why it can't be called host_tracking_id in both places?

Also I think generally speaking partner_tracking_id or partner_tracking_code is better, because it lines up with the naming we give other partner things like "partner key" and "partner secret"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason. I can make that change. 😄

@ebinnion ebinnion force-pushed the update/jetpack-start-partner-tracking branch from 4e81447 to e8c14c7 Compare February 13, 2018 16:45
@ebinnion ebinnion force-pushed the update/jetpack-start-partner-tracking branch from e8c14c7 to 0d55f4d Compare February 13, 2018 17:25
@ebinnion
Copy link
Copy Markdown
Contributor Author

Deployed r170009-wpcom to change tracking parameter in API to partner_tracking_id.

@ebinnion ebinnion dismissed gravityrail’s stale review February 13, 2018 17:41

Feedback addressed

Copy link
Copy Markdown
Contributor

@gravityrail gravityrail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gravityrail gravityrail merged commit 925a49c into master Feb 13, 2018
@gravityrail gravityrail deleted the update/jetpack-start-partner-tracking branch February 13, 2018 19:00
oskosk added a commit that referenced this pull request Feb 27, 2018
oskosk added a commit that referenced this pull request Feb 27, 2018
* update changelog.txt

* Update readme.txt with scaffolding for 5.9 changelog and release draft shortlink

* Add changelog entry for #8243

* Add changelog entry for #8296

* Add changelog entry for #8367

* Add changelog entry for #8686

* Add changelog entry for #8707

* Add changelog entry for #8709 and #8714

* Add changelog entry for #8729

* Add changelog entry for #8777

* Add changelog entry for #8780

* Add changelog entry for #8786

* Add changelog entry for #8787

* Add changelog entry for #8801 #8805 #8832 #8865 and #8804

* Add changelog entry for #8817

* Add changelog entry for #8822

* Add changelog entry for #8823

* Add changelog entry for #8829

* Add changelog entry for #8834

* move some items to major enhancements

* Add changelog entry for #8836

* Add changelog entry for #8839

* Add changelog entry for #8861

* Add changelog entry for #8862

* Add changelog entry for #8863

* Add changelog entry for #8866

* Add changelog entry for #8870

* Add changelog entry for #8874

* Add changelog entry for #8875

* Add changelog entry for #8881

* Add changelog entry for #8890

* Add changelog entry for #8911

* Add changelog entry for #8927

* Add changelog entry for #8931

* Add changelog entry for #8933

* Add changelog entry for #8930

* fix wording

* typo

* minor fixes

* replace partner scripts for Jetpack Start in changelog entry

* Update to-test.md

* Update to-test.md

* minor style fixes to to-test.md

* minor style fixes to to-test.md

* minor fixes on to-test.md

* Add changelog entry for #8868

* Add changelog entry for #8844

* Add changelog entry for #8664

* Add changelog entry for #8935

* Add changelog entry for #8425

* Add changelog entry for #8625
@kraftbj kraftbj removed the [Status] Ready to Merge Go ahead, you can push that green button! label Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Jetpack CLI Jetpack Start

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants