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

adding defaultRates, a FAQ, and linking to setConfig documentation #973

Merged
merged 2 commits into from
Oct 1, 2018

Conversation

bretg
Copy link
Contributor

@bretg bretg commented Sep 24, 2018

@jeanstemp and @mkendall07 - please take a look at this modification to the publisher API doc ... thought it would be nice to have all the setConfig() options linked from the main API doc, and the currency options were over in the module-specific page.

Copy link
Contributor

@jeanstemp jeanstemp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few minor edit suggestions

@@ -49,14 +50,15 @@ For example, the default Prebid "low granularity" bucket is:
| USD$0.50 increments, capped at USD$5 |

The following config translates the "low granularity" bucket with a conversion rate of
108 yen to 1 US dollar. It also defines the current conversion rate as being 110 yen to the dollar,
108 yen to 1 US dollar. It also defines the default conversion rate as being 110 yen to the dollar,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should end the sentence with a colon instead of a comma

@@ -174,6 +176,7 @@ pbjs.setConfig({
"currency": {
"adServerCurrency": "JPY",
"granularityMultiplier": 108
"defaultRates": { "USD": { "JPY": 110 }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't defaultRates optional? In which case adding it wouldn't necessarily make this the "simplest integration".

@@ -241,7 +247,8 @@ a currency object that may contain several parameters:
| granularityMultiplier | `decimal` | How much to scale the price granularity calculations. Defaults to 1. | 108 |
| conversionRateFile | `URL` | Optional path to a file containing currency conversion data. See below for the format. Prebid.org hosts a file as described in the next section. | `http://example.com/rates.json` |
| rates | object | This optional argument allows you to specify the rates with a JSON object, subverting the need for the conversionRateFile parameter. If this argument is specified, the conversion rate file will not be loaded. | { 'USD': { 'CNY': 6.8842, 'GBP': 0.7798, 'JPY': 110.49 } } |
| bidderCurrencyDefault | `object` | This is an optional argument to provide publishers a way to define bid currency. This option is provided as a transition until such a time that most bidder adapters define currency on bid response. | { "bidderXYZ": "GBP" } |
| defaultRates | `object` | Optionally defines a default rate that can be used if the currency file cannot be loaded. This option isn't used when the `rates` parameter is supplied. | { 'USD': { 'GPB': 0.75 }} |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"An optional parameter that defines" rather than "Optionally defines"

@@ -299,4 +306,14 @@ If the timeout occurs while bids are still on the queue, they will be skipped ra

Of course, use of Prebid currency feature is optional.

**Why isn't my currency supported in Prebid's file?**

The data in Prebid's hosted currency file comes from a reliable free source that doesn't contain all the countries in the world.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest: The data in Prebid's hosted currency file comes from a free source. This source is reliable, but it doesn't contain currencies for all countries of the world.


The data in Prebid's hosted currency file comes from a reliable free source that doesn't contain all the countries in the world.

If there's a currency conversion you need, there are several options:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"If there's a currency conversion you need that's not included, ..."


1. Use the 'defaultRates` feature
1. Build and host a currency conversion file that includes the desired currencies
1. Find a reliable, free, no-strings source of conversation data that we can integrate into our hosted file and post an issue on the github forum.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"...into our hosted file, then post..."

@bretg
Copy link
Contributor Author

bretg commented Sep 26, 2018

thanks @jeanstemp -- all comments covered.

@bretg
Copy link
Contributor Author

bretg commented Sep 26, 2018

@mkendall07 - are you good with the link from the Pub API doc to the module-specific doc? Am assuming this is preferable to copying the setConfig args, but we could also implement as an include file.

@bretg bretg merged commit 1bcbfc0 into master Oct 1, 2018
@bretg bretg deleted the currency-defaultrate branch March 17, 2019 19:49
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

Successfully merging this pull request may close these issues.

2 participants