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

RP Analytics Adapter update for UTM KVs #5998

Merged

Conversation

mmoschovas
Copy link
Contributor

RP Analytics Adapter update to scan URL query params to match 'utm_' params, convert to KV object format and pass data along as fpkvs. Unique query aram KVs will be added to the fpkvs object; whereas, query params will overwrite both matching KVs defined in localstorage or setConfig

Type of change

  • Bugfix
  • [X ] Feature
  • New bidder adapter
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Does this change affect user-facing APIs or examples documented on http://prebid.org?
  • Other

Description of change

RP Analytics Adapter update to scan URL query params to match 'utm_' params, convert to KV object format and pass data along as fpkvs. Unique query aram KVs will be added to the fpkvs object; whereas, query params will overwrite both matching KVs defined in localstorage or setConfig

  • test parameters for validating bids
{
  bidder: '<bidder name>',
  params: {
    // ...
  }
}

Be sure to test the integration with your adserver using the Hello World sample page.

  • contact email of the adapter’s maintainer
  • official adapter submission

For any changes that affect user-facing APIs or example code documented on http://prebid.org, please provide:

Other information

…params, convert to KV object format and pass data along as fpkvs. Unique query aram KVs will be added to the fpkvs object; whereas, query params will overwrite both matching KVs defined in localstorage or setConfig
@robertrmartinez robertrmartinez self-assigned this Nov 18, 2020
}

return obj;
}
Copy link
Collaborator

@robertrmartinez robertrmartinez Nov 20, 2020

Choose a reason for hiding this comment

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

could do something like

return Object.keys(search).reduce((accum, param) => {
       if (param.match(/utm_/)) {
         accum[param.replace(/utm_/, '')] = search[param];
       }
      return accum;
}, {});

Copy link
Collaborator

Choose a reason for hiding this comment

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

then no need to allocate the variable obj

@robertrmartinez robertrmartinez merged commit a7beb57 into prebid:master Nov 30, 2020
stsepelin pushed a commit to cointraffic/Prebid.js that referenced this pull request May 28, 2021
* RP Analytics Adapter update to scan URL query params to match 'utm_' params, convert to KV object format and pass data along as fpkvs. Unique query aram KVs will be added to the fpkvs object; whereas, query params will overwrite both matching KVs defined in localstorage or setConfig

* Update to attempt to fix CircleCi errors

* Update to use utils parseQS

* Minor change to attempt to pass Safari tests

* Switching spec logic to mock parseQS function as opposed to the window.location

* Another attempt to determine Safari failure

* Reverting last change and modifying fpkvs

* Added sort to test to correctly evaluate on Safari browser and reverted back to windowLocation mock

* Update to switch logic to utilize reduce()
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