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

<Impression> tags are not extracted from a parent wrapper #24

Open
shlomitc opened this issue Nov 1, 2015 · 6 comments
Open

<Impression> tags are not extracted from a parent wrapper #24

shlomitc opened this issue Nov 1, 2015 · 6 comments

Comments

@shlomitc
Copy link
Contributor

shlomitc commented Nov 1, 2015

Causes the wrapping VAST provider to not be notified when the inner-vast impression is sent.

I think this is quite a simple fix and I will open a PR for that, but I just wanted to know where is the right place to do it.

No doubt it should inside the VASTAd function flow.
At first look I thought it should be where you copy tracking and creatives from parent (line 578).
But since parentAd.impressions is an array of string, you don't need to copy the same way you extract TrackingEvents (companions/nonlinears/...)

Any other thoughts?

@jonhoo
Copy link
Owner

jonhoo commented Nov 3, 2015

Somewhere around 578 sounds good. You should have access to the parent's impressions using pa.impressions.

@Fire-Brand
Copy link

+1 on that PR 👍

@shlomitc
Copy link
Contributor Author

shlomitc commented Nov 9, 2015

I started my PR and got to look into the code the tests.
When I added my fix tests failed, so I had to look what I broke, but tests looks perfect.

It seems that whoever integrated the library in my project, did not not use the track() function of the TrackingEvents object to fire the events. He just extracted them from the parsed ads object and used another pixel firing mechanism instead.

So this means I should parse the wrapper tags out myself instead of adding it to the VASTAd as I suggested.

I'll skip this PR, but it was a great way to understand the library, which is quite brilliant!
Anyway, I'll open a a PR and add grunt tasks to run the tests with every build.

@jonhoo
Copy link
Owner

jonhoo commented Nov 10, 2015

Great, thank you!

@sterpe
Copy link
Contributor

sterpe commented Feb 27, 2016

@shlomitc @jonhoo, I also run into an inability to use the track() function effectively, as there is no way to know when the pixel was either 200 OK, aborted, or errored and in the case where multiple pixels have been collected in the bucket for the same event, there wasn't a clear way to introduce an aggregate cb() or promise to the function. (To me at least).

@jonhoo
Copy link
Owner

jonhoo commented Feb 27, 2016

@sterpe: it should be possible to add some error tracking to the track() requests (using .onerror/.onload for Image() and the return status for XHR), and then simply return a list of promises (or perhaps a promise.all or promise.any). After all, track() doesn't currently return anything useful, so this would be backwards compatible too.

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

No branches or pull requests

4 participants