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

Shim requests for utag.js with a no-op utag.view response script #216

Closed
groovecoder opened this Issue Nov 14, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@groovecoder
Member

groovecoder commented Nov 14, 2016

In our breakage analysis in #204, we noted that users reported broken videos on multiple sites that use Tealium's utag.js script for video views. (E.g., weather.com)

When a user visits a page that makes a request for utag.js, shim the response with script that provides no-op utag.view (and utag.link?), so that no JS errors are raised on the page.

@groovecoder groovecoder self-assigned this Nov 14, 2016

@groovecoder groovecoder referenced this issue Nov 14, 2016

Closed

Breakage Analysis: 2016-11-01 #204

3 of 3 tasks complete

groovecoder added a commit that referenced this issue Nov 21, 2016

groovecoder added a commit that referenced this issue Nov 22, 2016

groovecoder added a commit that referenced this issue Dec 13, 2016

groovecoder added a commit that referenced this issue Dec 13, 2016

groovecoder added a commit that referenced this issue Dec 13, 2016

groovecoder added a commit that referenced this issue Dec 13, 2016

@groovecoder

This comment has been minimized.

Show comment
Hide comment
@groovecoder

groovecoder Dec 13, 2016

Member

Okay, I got the shim working and it does prevent the ReferenceError: utag is not defined error. There are some complications:

  1. Bug: Add-on code can't currently load moz-extension:// resources (lost the bug number on this, but I'll find it and update here), so I had to push the shim up to a GitHub Pages fork & branch. Until that bug is fixed, we will have to push shim JS resources up to another static server or ship them in an accessible resource location. (Either in an add-on or in the platform)

  2. The shim seems to have a negligible effect that varies by how each domain implements it.

  • weather.com: prevents ReferenceErorr, but another error on the page still causes an infinite"Loading..." message.
  • cbs.com: preventsReferenceError and infinite spinner on cbs.com, but when the video starts to play, it says: "This video is unavailable because we were unable to load a message from our sponsors. If you are using ad blocking software please disable it and reload the page."
  • cnet.com: prevents ReferenceError, but another error on the page still causes an infinite "Loading..." message.
  • cbsnews.com: Page doesn't seem to source the script like the other domains, so the shim doesn't work. No ReferenceError, but the main.js script of the page errors: Error: Script error for "//tags.tiqcdn.com/utag/cbsi/cbsnewssite/prod/utag.js", needed by: managers/ad, managers/click-tracking, managers/tealium, components/video/video-uvpjs http://requirejs.org/docs/errors.html#scripterror

So, in summary, a shimming tactic:

  • Will include a complicated map of shims: with per-domain logic built into each tracker shim, or a per-domain-per-tracker matrix of different shims
  • May only prevent the JS errors and not actually fix video playback

@johngruen @fmarier - what do you think? Is it worth adding this and measuring overall video breakage with & without the shim? My hypothesis is that the shim will have no effect on reported video breakage, because of the issues above. But I'm happy to experiment and be surprised by observational data.

Member

groovecoder commented Dec 13, 2016

Okay, I got the shim working and it does prevent the ReferenceError: utag is not defined error. There are some complications:

  1. Bug: Add-on code can't currently load moz-extension:// resources (lost the bug number on this, but I'll find it and update here), so I had to push the shim up to a GitHub Pages fork & branch. Until that bug is fixed, we will have to push shim JS resources up to another static server or ship them in an accessible resource location. (Either in an add-on or in the platform)

  2. The shim seems to have a negligible effect that varies by how each domain implements it.

  • weather.com: prevents ReferenceErorr, but another error on the page still causes an infinite"Loading..." message.
  • cbs.com: preventsReferenceError and infinite spinner on cbs.com, but when the video starts to play, it says: "This video is unavailable because we were unable to load a message from our sponsors. If you are using ad blocking software please disable it and reload the page."
  • cnet.com: prevents ReferenceError, but another error on the page still causes an infinite "Loading..." message.
  • cbsnews.com: Page doesn't seem to source the script like the other domains, so the shim doesn't work. No ReferenceError, but the main.js script of the page errors: Error: Script error for "//tags.tiqcdn.com/utag/cbsi/cbsnewssite/prod/utag.js", needed by: managers/ad, managers/click-tracking, managers/tealium, components/video/video-uvpjs http://requirejs.org/docs/errors.html#scripterror

So, in summary, a shimming tactic:

  • Will include a complicated map of shims: with per-domain logic built into each tracker shim, or a per-domain-per-tracker matrix of different shims
  • May only prevent the JS errors and not actually fix video playback

@johngruen @fmarier - what do you think? Is it worth adding this and measuring overall video breakage with & without the shim? My hypothesis is that the shim will have no effect on reported video breakage, because of the issues above. But I'm happy to experiment and be surprised by observational data.

@groovecoder groovecoder assigned fmarier and johngruen and unassigned groovecoder Dec 13, 2016

@fmarier

This comment has been minimized.

Show comment
Hide comment
@fmarier

fmarier Dec 16, 2016

Member

It sounds like this approach isn't going to work in practice. Doing a site-specific shim to work around bugs in a single site's implementation isn't going to scale.

I'd say it's probably not worth pursuing this.

Member

fmarier commented Dec 16, 2016

It sounds like this approach isn't going to work in practice. Doing a site-specific shim to work around bugs in a single site's implementation isn't going to scale.

I'd say it's probably not worth pursuing this.

@groovecoder

This comment has been minimized.

Show comment
Hide comment
@groovecoder

groovecoder Dec 17, 2016

Member

@fmarier is our expert. 😄 Closing this one. I'll look thru our list to see if there something else on which we might iterate in the experiment.

Member

groovecoder commented Dec 17, 2016

@fmarier is our expert. 😄 Closing this one. I'll look thru our list to see if there something else on which we might iterate in the experiment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment