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

Fix 'path is required in .pageview()' in GA addon #8468

Merged
merged 1 commit into from Nov 12, 2019

Conversation

soundasleep
Copy link
Contributor

See #6012

This uses the fix in https://github.com/thundermiracle/storybook-loader/pull/19/files. Not tested - I don't have Typescript running locally.

@vercel
Copy link

vercel bot commented Oct 18, 2019

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/storybook/monorepo/ia5ysh0pb
🌍 Preview: https://monorepo-git-fork-soundasleep-patch-2.storybook.now.sh

@ndelangen ndelangen added this to the 5.2.x milestone Oct 18, 2019
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

Any chance you can test this? I have very little confidence that renamimg a variable would fix the problem, since it's not passed as a named argument.

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

Any chance you can test this? I have very little confidence that renamimg a variable would fix the problem, since it's not passed as a named argument.

@ndelangen
Copy link
Member

@shilman
Copy link
Member

shilman commented Oct 23, 2019

@ndelangen so you think it's erroring because it's being passed a URL instead of a path. Can you test it? I'm not keen to merge a change that hasn't been tested.

@vesahyp
Copy link

vesahyp commented Nov 12, 2019

Facing the same issue. As a temporary workaround i've added the same STORY_CHANGED event listener to another internal addon:

api.on(STORY_CHANGED, () => {
    const { path } = api.getUrlState();
    ReactGA.pageview(path);
});

Switching url to path works.

UPDATE: formatting

@shilman
Copy link
Member

shilman commented Nov 12, 2019

Thanks @vesahyp! Merging!

@shilman shilman added bug patch:yes Bugfix & documentation PR that need to be picked to main branch labels Nov 12, 2019
@shilman shilman merged commit f9cb17a into storybookjs:master Nov 12, 2019
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Nov 30, 2019
shilman added a commit that referenced this pull request Nov 30, 2019
Fix 'path is required in .pageview()' in GA addon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: analytics bug patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants