-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
LiveYield Analytics Adapter #3443
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tomek-jedro
I have some questions about some of the functions (see below); otherwise this overall looks good.
* mapping. | ||
*/ | ||
getAdUnitName: function(placementOrAdUnitCode) { | ||
return placementOrAdUnitCode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there more to be done here? The comment refers to a mapping of values, but this function just returns the argument variable.
If this setup is intended, could you clarify more about why this is needed and/or what this is adding?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this function should be overridden by customer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case - it may ideal to either surround the function calls in a try/catch
block or validate the overridden functions set in the config.options
to handle any accidental setups.
modules/liveyieldAnalyticsAdapter.js
Outdated
* human friendly value. | ||
*/ | ||
getPlacementOrAdUnitCode: function(bid, version) { | ||
return version[1] === '0' ? bid.placementCode : bid.adUnitCode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you expand upon the intended logic here?
Currently version
comes in as a string like 1.37.0
. So the version[1]
would always equal a .
character and cause the logic check to return the false
value. Do you have a scenario/use-case where the true
value of this expression would be returned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will be fixed, that function should check for the first element
@jsnellbaker can you check it? everything should be fine, im happy to help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tomek-jedro Thanks for making the recent requested updates. There is one more set of changes needed (due in part to something that was committed semi-recently).
Please take a look at the note below. We should be good to merge after this change is made.
modules/liveyieldAnalyticsAdapter.js
Outdated
import adapter from 'src/AnalyticsAdapter'; | ||
import adaptermanager from 'src/adaptermanager'; | ||
import CONSTANTS from 'src/constants.json'; | ||
import * as utils from 'src/utils'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to a recent merge (see #3435), we now require any imports for a core or modules
file (like this Analytics adapter file) to use a relative path style.
Additionally, the name of the file adaptermanager
was changed to adapterManager
in master (you may need to rebase with master
for your branch to accept this type of change).
Can you please update these imports here?
@tomek-jedro Thanks for making these additional updates. Everything looks good now. |
* LiveYield Analytics Adapter * tests corrections * fixed getPlacementOrAdUnitCode function * corrections * paths fixed * adaptermanager import fixed * manager corrections
* LiveYield Analytics Adapter * tests corrections * fixed getPlacementOrAdUnitCode function * corrections * paths fixed * adaptermanager import fixed * manager corrections
* LiveYield Analytics Adapter * tests corrections * fixed getPlacementOrAdUnitCode function * corrections * paths fixed * adaptermanager import fixed * manager corrections
Type of change
Description of change
New PubOcean LiveYield Analytics adapter.