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

New Analytics Adapter: Implement Appier Analytics Adapter. #3871

Merged
merged 1 commit into from
Jun 10, 2019

Conversation

kd-appier
Copy link
Contributor

Type of change

  • Bugfix
  • 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
    • Analytics Adapter

Description of change

New Appier Analytics Adapter to gather Prebid.js event data and forward to Appier reporting platform.

  • official adapter submission

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

A link to a PR on the docs repo at https://github.com/prebid/prebid.github.io/

@kd-appier kd-appier force-pushed the appier-analytics-adapter-v1.0.0 branch 2 times, most recently from 3aa27d7 to 04209e9 Compare May 30, 2019 11:03
@kd-appier kd-appier changed the title Implement Appier Analytics Adapter. New Analytics Adapter: Implement Appier Analytics Adapter. Jun 3, 2019
@jsnellbaker jsnellbaker self-requested a review June 5, 2019 12:17
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 @kd-appier

Thanks for submitting this new analytics adapter. There are a few initial points/questions I had (see comments in-line below).

Additionally, do you have a sample set of values to use for the options config that I can use for testing?

Finally, can you please put together PR for the docs repo to add your analytics adapter so your analytics adapter will appear on the this page?

Thanks!

@@ -0,0 +1,245 @@
import {ajax} from 'src/ajax';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use a relative path reference for this import (like the others).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thank you~

import adapterManager from '../src/adapterManager';
import {logError, logInfo} from '../src/utils';

const utils = require('../src/utils');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since it appears you're only using the deepClone function from the utils file, could you just import that function along with the logError and logInfo functions above to simplify things?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thank you~

if (bid.currency === 'USD') {
return bid.cpm;
} else {
return bid.getCpmInNewCurrency('USD');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just to confirm - this property getCpmInNewCurrency is only populated when the publisher has the currency module activated. Are you expecting the currency module to be active as a requirement for using your analytics adapter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, currency module is required. I have added this reminder in README.md, thank you :)

@kd-appier
Copy link
Contributor Author

Thank you @jsnellbaker :)

I have fixed the issues in your comments. This is the testing config:

            pbjs.enableAnalytics([
                {
                    provider: 'appierAnalytics',
                    options: {
                        affiliateId: 'Wh9T9301',
                        configId: '1293c411edca44579dfc59a1b7ac2808',
                        server: 'https://prebid-analytics-stg.c.appier.net/v1'
                    }
                }
            ]);

This is our PR for the docs repo:
prebid/prebid.github.io#1347

Thank you very much :)

@jsnellbaker
Copy link
Collaborator

@kd-appier Thanks for all the updates and the test credentials. Everything appeared to be working successfully on my end and the code changes look good.

@jsnellbaker jsnellbaker merged commit 3cb7342 into prebid:master Jun 10, 2019
@kd-appier
Copy link
Contributor Author

Cool. thank you @jsnellbaker :)

VideoReach pushed a commit to VideoReach/Prebid.js that referenced this pull request Aug 1, 2019
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