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

chore(PPDSC-2234): investigate Storybook analytics #338

Merged
merged 28 commits into from
Sep 30, 2022

Conversation

mutebg
Copy link
Contributor

@mutebg mutebg commented Aug 17, 2022

PPDSC-2234

What

  1. Background - we need a way to track our storybook
  2. What did you do:
    2.1. Created a storybook plugin which utilises our Tealium and Consent component so we can track
    2.2. Fixed Tealium component to take reactHelmet prop as its described in the docs.
  3. What does the reviewers should expect

I have done:

  • Written unit tests against changes
  • Written functional tests against the component and/or NewsKit site
  • Updated relevant documentation

I have tested manually:

  • The feature's functionality is working as expected on Chrome, Firefox, Safari and Edge
  • The screen reader reads and flows through the elements as expected.
  • There are no new errors in the browser console coming from this PR.
  • When visual test is not added, it renders correctly on different browsers and mobile viewports (Safari, Firefox, small mobile viewport, tablet)
  • The Playground feature is working as expected

Before:

After:

Who should review this PR:

How to test:

@newskit-engineering
Copy link
Collaborator

@mutebg mutebg marked this pull request as ready for review September 2, 2022 05:55
@mutebg mutebg added the ready for review Please assist in getting this reviewed label Sep 2, 2022
};

if (window && window.tealiumTrack) {
console.log('SEND_EVENT', event);
Copy link
Contributor

Choose a reason for hiding this comment

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

left over console log?

if (window && window.tealiumTrack) {
console.log('SEND_EVENT', event);
window.tealiumTrack(event);
// window.utag.view(e);
Copy link
Contributor

Choose a reason for hiding this comment

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

leftover comment

},
consent: {
accountId: 259,
//TODO: change to https://storybook.newskit.co.uk
Copy link
Contributor

Choose a reason for hiding this comment

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

left todo?

evgenitsn
evgenitsn previously approved these changes Sep 23, 2022
Copy link
Contributor

@evgenitsn evgenitsn left a comment

Choose a reason for hiding this comment

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

Looks good, except the comments from Marco.

};

addons.register(ADDON_ID, api => {
// The addon only sets the
Copy link
Contributor

Choose a reason for hiding this comment

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

Incomplete comment

// send initial page view event, since storybook doesn't do it via STORY_CHANGED
// When the preview boots, the first story is chosen via a selection specifier
api.on(STORY_SPECIFIED, () => {
console.log('STORY_SPECIFIED');
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need the console logs?

package.json Show resolved Hide resolved
@mutebg mutebg merged commit 8ba0ff9 into main Sep 30, 2022
@mutebg mutebg deleted the chore/PPDSC-2234-storybook-analytics branch September 30, 2022 11:29
Xin00163 pushed a commit that referenced this pull request Oct 17, 2022
* chore(PPDSC-2234): investigate Storybook analytics

* chore(PPDSC-2234): change addon

* chore(PPDSC-2234): change tracking function

* chore(PPDSC-2234): use newskit components

* chore(PPDSC-2234): update storybook and plugins

* chore(PPDSC-2234): configure source point

* chore(PPDSC-2234): update snapshots

* chore(PPDSC-2234): update storybook

* chore(PPDSC-2234): update label

* chore(PPDSC-2234): config tealium profilleid

* chore(PPDSC-2234): enable tracking

* chore(PPDSC-2234): add page name

* chore(PPDSC-2234): fix fonts paths

* chore(PPDSC-2234): fix deps

* chore(PPDSC-2234): fix undefined error

* chore(PPDSC-2234): fix js error

* chore(PPDSC-2234): fix object

* chore(PPDSC-2234): adress comments

* chore(PPDSC-2234): update privacy policy link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Please assist in getting this reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants