v3.22.4

Stockholders’ Equity and Equity Incentive Plans - Stock-based Compensation Expense (Details) - USD ($) $ in Thousands | 12 Months Ended
--- | ---
Dec. 31, 2022 | Dec. 31, 2021 | Dec. 31, 2020
Share-based Payment Arrangement, Expensed and Capitalized, Amount [Line Items] |  |  |
Total stock-based compensation expense | $ 20,646 | $ 14,107 | $ 3,563
Tax benefit from stock-based compensation | (3,537) | (1,825) | (493)
Total stock-based compensation expense, net of tax effect | 17,109 | 12,282 | 3,070
Cost of revenue |  |  |
Share-based Payment Arrangement, Expensed and Capitalized, Amount [Line Items] |  |  |
Total stock-based compensation expense | 1,135 | 825 | 86
Technology and development |  |  |
Share-based Payment Arrangement, Expensed and Capitalized, Amount [Line Items] |  |  |
Total stock-based compensation expense | 3,225 | 2,232 | 599
Sales and marketing |  |  |
Share-based Payment Arrangement, Expensed and Capitalized, Amount [Line Items] |  |  |
Total stock-based compensation expense | 7,645 | 5,176 | 1,101
General and administrative |  |  |
Share-based Payment Arrangement, Expensed and Capitalized, Amount [Line Items] |  |  |
Total stock-based compensation expense | $ 8,641 | $ 5,874 | $ 1,777

X
- Definition Share-based Payment Arrangement, Expense, Net + References No definition available. + Details
Name: | pubm_ShareBasedPaymentArrangementExpenseNet
Namespace Prefix: | pubm_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Definition Share-based Payment Arrangement, Tax Benefit + References No definition available. + Details
Name: | pubm_ShareBasedPaymentArrangementTaxBenefit
Namespace Prefix: | pubm_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Amount of expense for award under share-based payment arrangement. Excludes amount capitalized. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Publisher FASB -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (h)(1)(i) -URI https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901 + Details
Name: | us-gaap_AllocatedShareBasedCompensationExpense
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Definition Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table. + References No definition available. + Details
Name: | us-gaap_EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Details
Name: | us-gaap_IncomeStatementLocationAxis=us-gaap_CostOfSalesMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_IncomeStatementLocationAxis=us-gaap_ResearchAndDevelopmentExpenseMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_IncomeStatementLocationAxis=us-gaap_SellingAndMarketingExpenseMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_IncomeStatementLocationAxis=us-gaap_GeneralAndAdministrativeExpenseMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |