Skip to content

Pendo: Track if users are coming from OSS or Ent and latest version #2141

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

Merged
merged 1 commit into from
Dec 23, 2022

Conversation

opudrovs
Copy link
Contributor

@opudrovs opudrovs commented Dec 23, 2022

Closes weaveworks/weave-gitops#3154

  • Added passing version and tier to the updated Pendo component from OSS.

  • Updated some snapshots for unrelated but failing UI snapshot tests (it looks like just the order of code in the snapshots changed).

Notes:

  • In enterprise, we are supposed to have the app version from start as an env var and don't need to add a separate PendoContainer component, like in OSS, to make an API call. So, in enterprise on both Sign In page and other pages we track the version.

Testing:

  • To test if Pendo has been initialized and with which visitor metadata, run the following command in the browser console
console.log(window.pendo.getSerializedMetadata().visitor)

If Pendo is not initialized, this will throw an error.

Pendo should be always initialized (with the version) on pages on which the user is logged in and should only be initialized on the Sign In page (but without the version) if there is a user data stored in the window's localStorage.

To clear localStorage for testing, run:

window.localStorage.clear()

Tested it locally, works as expected.

@opudrovs opudrovs force-pushed the WG3154-extended-pendo-visitor-metadata branch 2 times, most recently from f15e4ca to 60b531a Compare December 23, 2022 03:26
@opudrovs opudrovs self-assigned this Dec 23, 2022
Pull in the latest main from OSS.

Update a component snapshot.
@opudrovs opudrovs force-pushed the WG3154-extended-pendo-visitor-metadata branch from 60b531a to 9774276 Compare December 23, 2022 12:03
@opudrovs opudrovs marked this pull request as ready for review December 23, 2022 12:14
@opudrovs opudrovs requested review from a team and foot December 23, 2022 12:15
Copy link
Member

@chanwit chanwit left a comment

Choose a reason for hiding this comment

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

LGTM

@opudrovs opudrovs merged commit c61e9e0 into main Dec 23, 2022
@opudrovs opudrovs deleted the WG3154-extended-pendo-visitor-metadata branch December 23, 2022 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pendo: Track if users are coming from OSS or Ent and latest version
2 participants