• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

prebid / Prebid.js / #283

20 Feb 2025 06:08PM UTC coverage: 90.519% (-0.005%) from 90.524%
#283

push

travis-ci

prebidjs-release
Prebid 9.31.0 release

41886 of 52458 branches covered (79.85%)

62085 of 68588 relevant lines covered (90.52%)

203.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.0
/modules/tapadIdSystem.js
1
import { logMessage } from '../src/utils.js';
1✔
2
import { submodule } from '../src/hook.js';
3
import * as ajax from '../src/ajax.js'
4

5
export const graphUrl = 'https://rtga.tapad.com/v1/graph';
1✔
6

7
export const tapadIdSubmodule = {
1✔
8
  name: 'tapadId',
9
  /**
10
   * decode the stored id value for passing to bid requests
11
   * @function
12
   * @returns {{tapadId: string} | undefined}
13
   */
14
  decode(id) {
15
    return { tapadId: id };
×
16
  },
17
  /*
18
   * @function
19
   * @summary initiate Real Time Graph
20
   * @param {SubmoduleParams} [configParams]
21
   * @param {ConsentData} [consentData]
22
   * @returns {IdResponse }}
23
   */
24
  getId(config, consentData) {
25
    const uspData = consentData?.usp;
5✔
26
    if (uspData && uspData !== '1---') {
5!
27
      return { id: undefined };
×
28
    }
29
    const configParams = config.params || {};
5✔
30

31
    if (configParams.companyId == null || isNaN(Number(configParams.companyId))) {
5✔
32
      logMessage('Please provide a valid Company Id. Contact prebid@tapad.com for assistance.');
2✔
33
    }
34

35
    return {
5✔
36
      callback: (complete) => {
37
        ajax.ajaxBuilder(10000)(
5✔
38
          `${graphUrl}?company_id=${configParams.companyId}&tapad_id_type=TAPAD_ID`,
39
          {
40
            success: (response) => {
41
              const responseJson = JSON.parse(response);
1✔
42
              if (responseJson.hasOwnProperty('tapadId')) {
1!
43
                complete(responseJson.tapadId);
1✔
44
              }
45
            },
46
            error: (_, e) => {
47
              if (e.status === 404) {
2✔
48
                complete(undefined);
1✔
49
              }
50
              if (e.status === 403) {
2✔
51
                logMessage('Invalid Company Id. Contact prebid@tapad.com for assistance.');
1✔
52
              }
53
            }
54
          }
55
        );
56
      }
57
    }
58
  },
59
  eids: {
60
    'tapadId': {
61
      source: 'tapad.com',
62
      atype: 1
63
    },
64
  }
65
}
66
submodule('userId', tapadIdSubmodule);
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc