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

WSTEAMA-1412: Add Reverb dependency as the transpiled version #12189

Merged
merged 100 commits into from
Jan 21, 2025

Conversation

alex-magana
Copy link
Contributor

@alex-magana alex-magana commented Nov 18, 2024

Resolves JIRA [WSTEAMA-1412]

Overall changes

Integrate the hosted version of Reverb into the page for tracking purposes.

https://mybbc-analytics.files.bbci.co.uk/reverb-client-js/reverb-3.9.2.js

Code changes

  • Add the hosted version of Reverb to the page.
  • Use Reverb for page view events and component page/click events.
  • Enable service level migration from the current tracking logic.

Testing

  1. List the steps used to test this PR.

Helpful Links

Add Links to useful resources related to this PR if applicable.

Coding Standards

Repository use guidelines

Comment on lines +522 to +523
hashedId: getAtUserId(),
isSignedIn: false,
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 same logic as above (lines 480-481)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for highlighting this Karina.
I reckon we should. Let me take a look at the existing logic
to confirm what informed this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've set this to false in both buildReverbAnalyticsModel and buildReverbPageSectionEventModel.
This is informed by the documentation here.
I've checked the beacons and confirmed that idclient is still reported in beacons
fired to ATI/Piano.

Copy link
Contributor

Choose a reason for hiding this comment

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

When I was working on my personalisation project, I had set it to be !!hashedId - see #11353 (comment)

@gavinspence is this something we would like to put in place now, or shall we leave it for later?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the context. I've responded in the thread in 11353 for continuity.

I'll hold off merging pending steer from @gavinspence.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From discussing with @gavinspence, we've concluded that we should retain
isSignedIn as false to:

  • reflect the current logic/UX where audiences are "visitors" and not "users"
  • ensure that the data stored by Piano reflects that audiences are not signed in. This
    ensures that when personalisation is introduced, the aggregated sign-in data won't
    include data from a time when we reported visitors as being signed in even though they were not.

While investigating this, we've established that Reverb doesn't use hashedId to track
visitors. This property is used for accounts/users contrary to our initial understanding.
From the Reverb code, it appears Reverb logic doesn't use the cookie, atuserid,
to persist visitor IDs. We're awaiting clarification on how to pass in the idclient value.
Based on these findings, we may not need the user object in the Reverb config after all.

In summation, since visitors are identified using the idclient value obtained from
atuserid (or the equivalent cookie in Reverb), I believe we should be able to correlate visitors and accounts if/when they are created since we'll begin to pass in the hashedId which we'll then be able to cross-reference against existing idclient UUIDs.

Please let me know if this position works for you @karinathomasbbc , in which case we can proceed
to merge the PR and fix forward the idclient configuration once we've heard from Reverb.
With this merged, we should then be able to enable Reverb on TEST for Pidgin and examine the
tracking beacons further for any needed improvements prior to going LIVE for the low impact trial.

For future reference:

https://support.piano.io/hc/en-us/articles/4468178673170-Concept-of-Visitors

Copy link
Contributor

Choose a reason for hiding this comment

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

That's fine @alex-magana, thanks for the detailed response and for following up with Product.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Brill! I'll proceed to merge this.
Thanks Karina.

Copy link
Contributor

@amoore108 amoore108 left a comment

Choose a reason for hiding this comment

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

Stellar work!

@alex-magana alex-magana merged commit 09f9908 into latest Jan 21, 2025
11 checks passed
@alex-magana alex-magana deleted the reverb-dependency-minified branch January 21, 2025 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants