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

LiveYield Analytics Adapter #3443

Merged
merged 7 commits into from Jan 23, 2019
Merged

LiveYield Analytics Adapter #3443

merged 7 commits into from Jan 23, 2019

Conversation

tomek-jedro
Copy link
Contributor

Type of change

  • New analytics adapter

Description of change

New PubOcean LiveYield Analytics adapter.

  • test parameters for validating the adapter:
{
  provider: 'liveyield',
  options: {
    customerId: 'b4c106a4-a8cb-4321-a9d2-aec3cde2e64e',
    customerName: 'Prebid Test',
    customerSite: 'prebid-test.com',
    sessionTimezoneOffset: '-300'
  }
}

Copy link
Collaborator

@jsnellbaker jsnellbaker left a 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;
Copy link
Collaborator

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?

Copy link
Contributor Author

@tomek-jedro tomek-jedro Jan 15, 2019

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

Copy link
Collaborator

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.

* human friendly value.
*/
getPlacementOrAdUnitCode: function(bid, version) {
return version[1] === '0' ? bid.placementCode : bid.adUnitCode;
Copy link
Collaborator

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?

Copy link
Contributor Author

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

@tomek-jedro
Copy link
Contributor Author

@jsnellbaker can you check it? everything should be fine, im happy to help

Copy link
Collaborator

@jsnellbaker jsnellbaker left a 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.

import adapter from 'src/AnalyticsAdapter';
import adaptermanager from 'src/adaptermanager';
import CONSTANTS from 'src/constants.json';
import * as utils from 'src/utils';
Copy link
Collaborator

@jsnellbaker jsnellbaker Jan 22, 2019

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?

@jsnellbaker
Copy link
Collaborator

@tomek-jedro Thanks for making these additional updates. Everything looks good now.

@jsnellbaker jsnellbaker merged commit b436eb6 into prebid:master Jan 23, 2019
pedrolopezmrf pushed a commit to Marfeel/Prebid.js that referenced this pull request Mar 18, 2019
* LiveYield Analytics Adapter

* tests corrections

* fixed getPlacementOrAdUnitCode function

* corrections

* paths fixed

* adaptermanager import fixed

* manager corrections
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants