-
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
PubWise.io Analytics Module Update - SPOT Support, Module Rules & Minor Features #5677
Conversation
Update from Upstream Master
…add activationId and improve tests
I'm converting this to a draft while we figure out the Browserstack issue. |
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.
Test coverage is at 78%, lower than our accepted minimum that is 80%. Please try to improve line coverage the best you can
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.
have a look at suggestions i left regarding the code.
@musikele thanks for the review, the storageManager removal was a regression. We'll get that fixed and look at the other items. |
@musikele Updates have been made. Let me know if you need anything further. |
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 @GLStephen , found another issue while testing this functionality. If I configure the adapter with default values as specified in docs, I get network errors in console. Can you have a look at it?
modules/pubwiseAnalyticsAdapter.js
Outdated
pubwiseAnalytics.adapterEnableAnalytics = pubwiseAnalytics.enableAnalytics; | ||
|
||
pubwiseAnalytics.enableAnalytics = function (config) { | ||
if (config.options.debug === undefined) { | ||
config.options.debug = utils.debugTurnedOn(); | ||
} | ||
configOptions = config.options; |
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.
So, I have probably found an issue here. Based on the docs you've written at the top of this file, I added these lines to my test page:
pbjs.enableAnalytics({
provider: "pubwise",
options: {
site: "test-test-test-test",
},
});
when the execution gets here, configOptions.endpoint
was set to defaultUrl
, but that gets removed by this assignment:
configOptions = config.options;
As a result, i see a bunch of errors in console:
POST http://localhost:9999/integrationExamples/gpt/undefined 405 (Method Not Allowed)
(anonymous) @ ajax.js:91
flushEvents @ pubwiseAnalyticsAdapter.js:171
...
Prebid ERROR: xhr error null Method Not Allowed
Note the undefined at the end of the url.
So, configOptions.endpoint
does not exist anymore.
I think you wanted to extend configOptions with the data coming from function arguments:
configOptions = {
...configOptions,
...config.options
}
(This can be also achieved by using Object.assign)
Can you have a look into this?
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.
@musikele this is resolved now
@musikele thanks for the catch on that, I've also updated to use a reserved ID for testing so that the API will return proper responses, so the old test-test-test-test will now return an "over quota" response. |
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.
LGTM
…or Features (prebid#5677) * updates to bring module up to current module rules, lints, etc. also add activationId and improve tests * fix eslint error * Fix IE11 Includes Check Failing Tests * revert debug setting * updates to fix PR review issues * updates to fix default params handling
…es & Minor Features (prebid#5677)" This reverts commit f8f4bf5.
Type of change
Description of change
Test Params