-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: remove the index from ad id for easier identification #88
Conversation
@birme This makes it easier to use transcoded creatives as they now have a unique name, which could be used as key in CouchDB. |
Looks good to me but I have @Nfrederiksen have the final saying |
@Wkkkkk Can you clarify what you mean by each creative having a unique name by removing the index postfix? :) I don't understand. If the index is not there then the same ad creatives will appear multiple times in a VAST would they not? Index was originally there to 'fake' it being a different ad ^^' |
We actually want to know if there exist same ad creatives in the VAST response so that we can transcode them beforehand and reuse the transcoded ones by their id. To be clear, this means that an example VAST would look like this before this change: <Creative id="CRETIVE-ID_001" adId="black-friday1" sequence="1">
<UniversalAdId idRegistry="test-ad-id.eyevinn" idValue="AAA%2FFFFF123%2F1"><![CDATA[AAA%2FFFFF123%2F1]]</UniversalAdId>
... And after: <Creative id="CRETIVE-ID_001" adId="black-friday" sequence="1">
<UniversalAdId idRegistry="test-ad-id.eyevinn" idValue="AAA%2FFFFF123%2F"><![CDATA[AAA%2FFFFF123%2F]]</UniversalAdId>
... The id in If the same creative is included in the response as the next one. It would look like: <Creative id="CRETIVE-ID_002" adId="black-friday" sequence="2">
<UniversalAdId idRegistry="test-ad-id.eyevinn" idValue="AAA%2FFFFF123%2F"><![CDATA[AAA%2FFFFF123%2F]]</UniversalAdId>
... |
To your last question, we are still "faking" them to be different creatures since these two creatives would have different id (CRETIVE-ID_001 and CRETIVE-ID_002). |
I understand now. You transcode per adId. Would it be possible to use the mediafile URL as a key? I am a little hesitant to not being able to 'fake' that all universalAdId in a VAST are unique. |
I see your concerns. It is true that one could use the URL path as key but it seems over-complicated. I was doing it this way because stand-alone ads are named by just id. @@ -146,15 +146,15 @@ function AttachStandAloneAds(vast, ads, params, podSize) {
.attachCreatives()
.attachCreative({
id: `CREATIVE-ID_00${i + podSize}`,
[adId]: `${ads[i].id}`,
sequence: `${i + podSize}`,
}); |
Yeah... I see your point. But consider the case when we use "TENANT_AD_LIST", aka an external list. Now if that list happens to have different URL's but the same AdID on several items then you'd transcode the same source multiple times there too. |
OK @Wkkkkk here is a suggested solution. Or maybe you can just slice the last character (the index) on each id, when you parse the VAST in your service... |
Let's remove the index on |
LGTM let it fire |
Only you and Jonas can merge it. |
This commit removed the index from the id in pod ads.
It would then be easy to identify each creative by their
UniversalAdId
oradId
.One open question is whether to do the same for stand-alone ads or not.