Skip to content

Conversation

@kdaswani
Copy link
Contributor

@kdaswani kdaswani commented May 11, 2021

What does this PR do?
This PR updates our Nielsen DCR and Nielsen DTVR integrations to meet Nielsen requirements. Changes requested by Nielsen are outlined in this spreadsheet.

Are there breaking changes in this PR?
No.

Testing

Nielsen DCR

  • Unit Tests - all passed, including new (boxed in red below) and changed tests:

Screen Shot 2021-05-11 at 8 40 51 PM

  • Local tests

Video Playback Interrupted triggers stop (instead of end):
Screen Shot 2021-05-25 at 1 54 06 PM

Video Playback Exited triggers stop:
Screen Shot 2021-05-25 at 1 55 38 PM

customSectionProperty picks up setting from UI to map page property value to section if defined. In this example, I mapped test_section_property in the UI as the Custom Section Property setting:
Screen Shot 2021-05-25 at 1 56 38 PM

If custom property is not included in page call, falls back on the page name:
Screen Shot 2021-05-25 at 1 56 54 PM

Nielsen DTVR

  • Unit Tests - all passed, including new (for video playback exited) and changed tests. Removed two tests that are no longer relevant as Nielsen has requested we do not call end.
    Screen Shot 2021-05-19 at 1 17 38 PM

  • Local tests
    Local testing passed. Firing Video Content Completed, Video Playback Completed, Video Playback Exited, Video Playback Interrupted, Video Playback Paused, Video Playback Seek Started, and Video Playback Buffer Started for linear streams result in no calls to Nielsen as requested. Resuming playback via Video Playback Resumed reloads metadata and ID3 tags are picked up for any mapped events.

All PRs must follow the process for change control as outlined in:
https://segment.atlassian.net/wiki/spaces/GRC/pages/453935287/Reinforcing+Change+Control

  • Testing completed successfully using unit tests and local testing (via a.js compiler)

Any background context you want to provide?
Fox has been trying to get certified by Nielsen for a year+ now. In order to get certified using the Segment-Nielsen integrations, our integrations to meet Nielsen's requirements. This should be the last set of changes blocking certification.

Is there parity with the server-side/android/iOS integration components (if applicable)?
Yes. The same changes have already been made to iOS (published new versions) and Android (being tested by customer before publishing new versions):

Does this require a new integration setting? If so, please explain how the new setting works
Yes. The Nielsen DCR integration requires a new setting for customSectionProperty. This setting is already live in prod (Partner Portal) as it is used in iOS and Android too. The setting allows a customer to choose which property on their page calls maps to the Nielsen section field. If nothing is set, we will fallback on the page name which is the existing behavior.

Links to helpful docs and other external resources
See spreadsheet linked above.

@kdaswani
Copy link
Contributor Author

kdaswani commented May 19, 2021

Confirmation from Nielsen contact on how to handle DTVR completion and interruption events as their public documentation is incorrect:
Screen Shot 2021-05-19 at 12 02 15 PM

@kdaswani kdaswani requested a review from bsneed May 26, 2021 00:19
@kdaswani
Copy link
Contributor Author

Hi @bsneed! I have made changes to our Nielsen DCR and DTVR web integrations, as requested by Nielsen. The changes made are outlined in the linked spreadsheet and JIRA. I've already made similar changes on iOS and Android so this is the last platform we need to tackle. I added some new unit tests and locally tested, and everything looks good. Would you or someone on the Libraries team be able to review and approve my changes? I'm newer to releasing web device-mode changes, but in the past we have pinned Fox's staging source(s) to a version of a.js with the changes so that they could test before we add to a release train. Is this possible? @brennan has helped with this in the past. thanks!

@kdaswani
Copy link
Contributor Author

kdaswani commented May 26, 2021

Sources to pin (jotting this down for future reference):

  • web_staging in foxdcg (source ID: EpHMO5LNMi). This is Fox's staging site where they have tested pinned changes before.
  • seg_kxan_com_dev in nexstardigital (source ID: SPvxroLThG). Nexstar requested the new customSectionProperty and are open to validating behavior on a staging site.

@pooyaj pooyaj self-requested a review May 26, 2021 17:09
@pooyaj
Copy link
Contributor

pooyaj commented May 26, 2021

hey @kdaswani, I'll take a look shortly

@kdaswani
Copy link
Contributor Author

kdaswani commented Jun 1, 2021

Hi @pooyaj have you had a chance to take a look at this PR? Thanks!

Copy link
Contributor

@pooyaj pooyaj left a comment

Choose a reason for hiding this comment

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

Just one concern around the changes in the yarn.lock. otherwise lgtm

Copy link
Contributor

@pooyaj pooyaj left a comment

Choose a reason for hiding this comment

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

After comparing the segment-events 2.2.0 vs. 2.2.5, the changes are non-breaking so this should be safe.

@kdaswani kdaswani force-pushed the kiara/nielsen-changes branch from 3c137b2 to 363ea95 Compare June 4, 2021 17:57
@kdaswani
Copy link
Contributor Author

Added a small change to fix a bug with how length is populated. We weren't previously checking if the setting was undefined/empty, which would cause the integration to put the entire content object in the length field for ad events and never move to the else statement. I.e.
Screen Shot 2021-06-29 at 11 13 09 AM

By adding a check for if the setting exists, we move to the else statement if it is empty and length is populated correctly:
Screen Shot 2021-06-29 at 11 15 59 AM

Confirmed all unit tests still pass:
Screen Shot 2021-06-29 at 1 51 51 PM

@pooyaj can you take a look? I think I'll need to update the SHA in the beta version for Nielsen DCR here: https://github.com/segmentio/analytics.js-private/pull/632/files. And then pin the new commit to the three dev sites previously pinned. Is that correct? Thanks!

@kdaswani kdaswani requested a review from pooyaj June 29, 2021 20:59
@kdaswani
Copy link
Contributor Author

kdaswani commented Jul 6, 2021

Updated mapping for assetid for StaticStart content to be a SHA256 hash of url. This is because Nielsen does not allow special characters in the assetid and URLs can sometimes contain prohibited characters. They require assetid is unique for each page/article, but it does not need to be descriptive of the actual page. They have confirmed that a deterministic hash of URL (i.e. SHA256) will work. Updated unit tests and all passed. Tested locally using compiler and assetid is correctly set as the SHA256 hash of http://localhost:3000/.
Screen Shot 2021-07-06 at 12 48 31 PM

@kdaswani kdaswani merged commit d6f9738 into master Aug 26, 2021
@kdaswani kdaswani deleted the kiara/nielsen-changes branch August 26, 2021 21:30
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.

3 participants