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

Feature Request: Origin Site/URI #22

Closed
jaswrks opened this Issue Nov 19, 2016 · 8 comments

Comments

Projects
None yet
3 participants
@jaswrks
Copy link

jaswrks commented Nov 19, 2016

Add the following fields to the JS Snippet:

'wp_site' => c::clip(home_url('/'), 255),
'wp_uri'  => c::midClip(c::currentUri(), 255),

@jaswrks jaswrks added the enhancement label Nov 19, 2016

jaswrks pushed a commit that referenced this issue Nov 19, 2016

jaswsinc
@jaswrks

This comment has been minimized.

Copy link

jaswrks commented Nov 19, 2016

Next Release Changelog:

  • Adding wp_site and wp_uri fields to JS Snippet to make it easier for support representatives to identify the origin of a customer request; e.g., whenever a single Intercom account is being used to support more then one WordPress installation, or multiple child sites/domains in a Multisite Network. See Issue #22.

@jaswrks jaswrks added this to the Next Release milestone Nov 19, 2016

jaswrks pushed a commit that referenced this issue Nov 19, 2016

jaswsinc

@jaswrks jaswrks self-assigned this Nov 19, 2016

@renzms

This comment has been minimized.

Copy link

renzms commented Nov 28, 2016

@raamdev

Enhancement confirmed as working.

Tested using:

  • WP Sharks Core Version 161026.47592
  • WooCommerce Intercom Pro Version 161124.6961-RC
  • WooCommerce Version 2.6.8

No bugs here 👍

screen shot 2016-11-28 at 10 09 08 pm

@jaswrks

This comment has been minimized.

Copy link

jaswrks commented Nov 28, 2016

@renzms Thank you.

@raamdev I'm seeing room for improvement here and it might be worth us holding the next release for if we all agree.

Problems

2016-11-28_12-44-25

  • wp_site, as it exists, includes the scheme:// which leaves the potential for http:// and https:// variations to accumulate on the Intercom side, which may result in confusion and/or inaccurate search results when filtering by this field in Intercom.

  • wp_uri does not include the domain, which prevents the field value from becoming clickable. So it's not possible to click that field value and be taken to the underlying URL, which would be somewhat useful since this field is all about identifying where the customer was at when they were seeking assistance.

Suggested Changes

  • wp_site could be renamed to wp_home_url and be forced to contain a scheme matching that of the default scheme for the site and not the current scheme the customer landed on.

  • wp_uri could be changed to wp_current_url and include the full URL of the current page.

  • Also suggest adding wp_network_home_url whenever the plugin is running on a multisite network. This would identify the current network the request came from, in addition to wp_home_url which would identify the current child site in a such a scenario.

  • Also suggest renaming wp_user_edit to wp_user_edit_url

@jaswrks

This comment has been minimized.

Copy link

jaswrks commented Dec 3, 2016

Updated Changelog

  • Enhancement: Adding wp_home_url and wp_network_home_url fields to JS Snippet to make it easier for support representatives to identify the origin of a customer request; e.g., whenever a single Intercom account is being used to support more then one WordPress installation, or multiple child sites/domains in a Multisite Network. See Issue #22.

  • Intercom user_id: This release changes the way an Intercom user_id is generated. Instead of just the WP User ID, the Intercom user_id is now formulated in a way that allows a single Intercom account to be used for multiple installations of WordPress. The user_id sent to Intercom is now made up of two parts. 1. A hash of the current WordPress home_url() (normalized). 2. The current user's WordPress ID (or, in the case of guest checkout, an e-, followed by a hash of the user's email address). The final user_id becomes: [location hash].[user ID]; e.g., 3610a686.123, 3610a686.e-9943c993 (guest).

  • New People Attribute: This release adds a new People Attribute by the name of wp_user_id, giving support reps. the ability to track WP User IDs in Intercom.

@jaswrks

This comment has been minimized.

Copy link

jaswrks commented Dec 3, 2016

Additional changelog entry:

  • New Filter: A new filter has been exposed: js_snippet_attrs. This allows a developer to add their own custom attributes; above and beyond what is already defined by WooCommerce Intercom Pro itself.
@jaswrks

This comment has been minimized.

Copy link

jaswrks commented Dec 3, 2016

Additional changelog entry:

  • Compatibility: Adding support and compatibility with WPML's ICL_LANGUAGE_CODE so the Intercom messenger will always be displayed in an appropriate language.

jaswrks pushed a commit that referenced this issue Dec 3, 2016

jaswsinc
@renzms

This comment has been minimized.

Copy link

renzms commented Dec 5, 2016

@jaswsinc @raamdev

Updates for additional details for Intercom users working as intended.

Enhancement: Adding wp_home_url and wp_network_home_url fields to JS Snippet to make it easier for support representatives to identify the origin of a customer request; e.g., whenever a single Intercom account is being used to support more then one WordPress installation, or multiple child sites/domains in a Multisite Network. See Issue #22.

Intercom user_id: This release changes the way an Intercom user_id is generated. Instead of just the WP User ID, the Intercom user_id is now formulated in a way that allows a single Intercom account to be used for multiple installations of WordPress. The user_id sent to Intercom is now made up of two parts. 1. A hash of the current WordPress home_url() (normalized). 2. The current user's WordPress ID (or, in the case of guest checkout, an e-, followed by a hash of the user's email address). The final user_id becomes: [location hash].[user ID]; e.g., 3610a686.123, 3610a686.e-9943c993 (guest).

New People Attribute: This release adds a new People Attribute by the name of wp_user_id, giving support reps. the ability to track WP User IDs in Intercom.

Logged In User
screen shot 2016-12-06 at 12 26 34 am

Guest User
screen shot 2016-12-06 at 12 26 58 am

raamdev added a commit to wpsharks/woocommerce-intercom that referenced this issue Dec 10, 2016

Phing release of v161209.85885 with the following changes:
- **Bug Fix:** Call to undefined method `WC_Order::get_currency()` should be `get_order_currency()`. Reported by @raamdev in [this GitHub issue](wpsharks/woocommerce-intercom-pro#4).
- **Bug Fix:** Before a new Event is generated to track a user's Order or Subscription status on the Intercom side, a new API call is now made to ensure that a matching User does in fact exist on the Intercom side before an Event is created. This corrects a problem reported in the previous release that resulted in an error during checkout: `User Not Found`. See [Issue #6](wpsharks/woocommerce-intercom-pro#6 (comment))
- **Bug Fix:** In the Event API calls, `amount` must be given in **cents** (i.e., total x 100) for proper calculation on the Intercom side. Closes [this GitHub issue](wpsharks/woocommerce-intercom-pro#17).
- **New Feature:** It is now possible to configure the Intercom Messenger icon display settings so that it's only shown to logged-in users, only to logged-out users, or to everyone (default behavior). See: **Dashboard → WooCommerce → Intercom → Messenger Display Options**.
- **New Feature:** Adding support for URI Inclusion patterns. See [Issue #12](wpsharks/woocommerce-intercom-pro#12).
- **New Feature:** Adding support for URI Exclusion patterns. See [Issue #12](wpsharks/woocommerce-intercom-pro#12).
- **New People Attribute:** This release adds a new People Attribute by the name of `wp_user_id`, giving support reps. the ability to track WP User IDs in Intercom.
- **New Filter:** A new filter has been exposed: `js_snippet_attrs`. This allows a developer to add their own custom attributes; above and beyond what is already defined by WooCommerce Intercom Pro itself.
- **New Filter:** `add_filter('woocommerce_intercom_js_snippet_enable', '__return_false');` to disable the JS snippet selectively.
- **Enhancement:** Standardizing Event names sent to Intercom. New format: `order-[status]`. See [Issue #19](wpsharks/woocommerce-intercom-pro#19).
- **Enhancement:** Adding `wp_home_url` and `wp_network_home_url` fields to JS Snippet to make it easier for support representatives to identify the origin of a customer request; e.g., whenever a single Intercom account is being used to support more then one WordPress installation, or multiple child sites/domains in a Multisite Network. See [Issue #22](wpsharks/woocommerce-intercom-pro#22).
- **Intercom `user_id`:** This release changes the way an Intercom `user_id` is generated. Instead of just the WP User ID, the Intercom `user_id` is now formulated in a way that allows a single Intercom account to be used for multiple installations of WordPress. The `user_id` sent to Intercom is now made up of two parts. 1. A hash of the current WordPress `home_url()` (normalized). 2. The current user's WordPress ID (or, in the case of guest checkout, an `e-`, followed by a hash of the user's email address). The final `user_id` becomes: `[location hash].[user ID]`; e.g., `3610a686.123`, `3610a686.e-9943c993` (guest).
- **Compatibility:** Adding support and compatibility with WPML's `ICL_LANGUAGE_CODE` so the Intercom messenger will always be displayed in an appropriate language.
- **Compatibility:** This release adds compatibility with WooCommerce Subscriptions. See [Issue #1](wpsharks/woocommerce-intercom-pro#1).
- **Compatibility:** This release adds support for all WooCommerce Order and/or Subscription status changes, including those added by WooCommerce extensions such as the WooCommerce Give Order extension. See [Issue #1](wpsharks/woocommerce-intercom-pro#1).
- **Compatibility:** Removing API Key setting for Intercom in favor of a Personal Access Token. There is now a configuration field under: **WP Dashboard → WooCommerce → Intercom** settings where you can supply a Personal Access Token for API calls to Intercom. Use the instructions provided in this area to generate and fill-in your Personal Access Token. See [Issue #20](wpsharks/woocommerce-intercom-pro#20).
- **Compatibility:** Adding support for guest checkout events that track a customer by email address instead of by user ID. Closes [this GitHub issue](wpsharks/woocommerce-intercom-pro#6).
- **Compatibility:** Updating `composer.json` to specify that we will use the Intercom SDK v3.x (but not 4.x) until a full review of a new major release has been completed.
- **Cleanup:** Moving JS snippet into a template file w/ replacement code. Closes [this GitHub issue](wpsharks/woocommerce-intercom-pro#8).
@raamdev

This comment has been minimized.

Copy link
Contributor

raamdev commented Dec 10, 2016

WooCommerce Intercom Pro v161209.85885 has been released and includes changes from this GitHub Issue. See the changelog for further details.


This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#22).

@raamdev raamdev closed this Dec 10, 2016

@wpsharks wpsharks locked and limited conversation to collaborators Dec 10, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.