Load the PayPal JavaScript SDK directly on the pages where visitors pay, and put only the PayPal advertising tag in a custom Advertising vendor in TermsFeed Privacy Consent. The SDK draws the PayPal buttons and runs the payment, so on a payment page it is part of the service the visitor asked for. An advertising tag measures campaigns for your business, so it waits for consent on every page.

PayPal has no template in the TermsFeed app, because the SDK loads directly where it runs and needs no vendor. The SDK loads from www.paypal.com and sets cookies that PayPal uses to process the payment and detect fraud.

Treating the SDK as strictly necessary on payment pages is a common reading of the exemption in the ePrivacy Directive for storage the visitor needs, not a ruling. PayPal buttons on product pages are the contested case. Settle where your PayPal buttons fall with your legal adviser, using the TermsFeed post on essential cookies as the starting point.

What happens on your site with PayPal

The PayPal buttons work on your payment pages for every visitor, and the PayPal advertising tag runs only for visitors who accept the Advertising vendor category or its vendor. A custom vendor does not send a consent signal, so PayPal receives none from Privacy Consent, and the vendor alone decides when the tag runs.

  • Before an answer. The SDK loads on payment pages only, and the advertising tag does not load on any page.
  • Accepts. The advertising tag loads on every page, and the SDK keeps loading on payment pages.
  • Declines. The advertising tag never loads, and the PayPal buttons still work on payment pages.
  • Changes the answer later. Turning the advertising vendor off in the Preferences Center saves the answer at once, and the tag keeps running until the next page load. Cookies PayPal already set stay in the browser, because Privacy Consent does not delete cookies.
  • Is not asked. A visit follows the opt-out model under the Standard consent logic when neither the visitor nor your company is in the EU, the EEA, the UK, or Switzerland. The consent banner stays hidden, and the advertising tag runs from the first page view until the visitor opts out. A visitor in Quebec sees the consent banner. A company in Quebec asks visitors in Canada, and visitors in other countries follow their own location. A visitor who sends Global Privacy Control (GPC) gets the consent banner wherever the visitor is.

How to load the PayPal JavaScript SDK on payment pages

Put the PayPal SDK <script> in the template of each page where the visitor starts a payment, outside Privacy Consent. Those pages include the cart, the checkout, and a product page whose PayPal button starts a payment. Keep the SDK off pages where no payment starts, such as blog posts and landing pages.

This is the SDK as PayPal gives it, with your own client ID and currency.

<script src="https://www.paypal.com/sdk/js?client-id=YOUR_CLIENT_ID&currency=USD"></script>

List PayPal as strictly necessary on those pages in your Cookies Policy. A PayPal payment that sends the visitor to a page PayPal hosts runs outside your site, where Privacy Consent does not run. Confirm the script in Chrome DevTools: open the Network tab on the checkout, type sdk/js in the filter box, and reload, and the request to www.paypal.com/sdk/js appears before any answer.

Add the PayPal advertising tag as a custom vendor

Adding the custom Advertising vendor takes 6 steps and about 10 minutes. Copy the advertising tag from your PayPal account or from the PayPal plugin of your store, with its <script> elements, before you start.

  1. Open your consent banner in the TermsFeed app and click "Vendors".
  2. Click "Add a vendor", then click the "Custom vendor" card.
  3. Fill in the identifying fields with the values in the table under these steps.
  4. Open the "JavaScript tags" tab, switch on "If allowed", and paste the advertising tag into "JavaScript code to insert if allowed".
  5. Click "Add vendor". The vendor appears on the Vendors page under "Active".
  6. Delete the same tag from your theme, your header code, and any plugin setting that prints it.

These values keep the vendor out of Essential and name the right purpose in the Preferences Center.

Field Value
"Vendor name" PayPal Advertising
"Link to their Privacy Policy" The PayPal Privacy Statement for your country, linked in the footer of paypal.com
"What are they used for?" Advertising
"Purpose" Deliver ads that are more relevant to you

Never paste a <noscript> fallback that comes with the tag, because it fires for visitors with JavaScript turned off, who never see the consent banner. Privacy Consent keeps the content of a <noscript> in a vendor tag as inert text, so a copy in your page is the one that fires. Fill in the other fields with Add a Custom Vendor. A new vendor sets a re-consent date on a live consent banner, so plan the PayPal Advertising release with Add a Vendor After Launch.

How to verify the PayPal setup

The check covers a page without a payment, which loads nothing from PayPal before consent, and a payment page, which loads the SDK at once. Run it from a location that gets the consent banner, or simulate one with Test Visitor Location. A new private window picks up the vendor you saved, while a browser that loaded the settings in the last hour holds the older list for up to 1 hour.

  1. Open a blog post or the home page in a new private window, open Chrome DevTools, select the Network tab, and type paypal in the filter box.
  2. Reload the page. No request to paypal.com or paypalobjects.com appears while the consent banner waits for an answer.
  3. Click I Agree. The requests from the advertising tag appear, and the Elements tab shows its <script> with a termsfeed-pc1-vendor-tag-id value ending in -javascript.
  4. Close every private window, because private windows share stored data while any of them stays open.
  5. Open a new private window with the same Network filter, load the same page, and click I Decline. No PayPal request appears, including after a reload.
  6. Go to the checkout in that window. A request to www.paypal.com/sdk/js appears at once, and the PayPal buttons show and open the payment window.

Cookies PayPal sets

PayPal has no template, so take the cookie list from the Application tab and from the PayPal statement on cookies. The PayPal statement on cookies and tracking technologies describes groups of cookies, such as essential and marketing, and does not name each one. Open the Application tab of Chrome DevTools, select Cookies, and record what appears after the SDK loads and again after the advertising tag loads.

List the cookies from the SDK as strictly necessary on payment pages, and the cookies from the advertising tag under Advertising.

What to add to your Privacy Policy for PayPal

Name PayPal in your Privacy Policy, say what it collects, and separate the payment from the advertising tag. Adapt this sample clause to your site.

We use PayPal, a payment service, to take payments on our checkout pages. PayPal runs on those pages for every visitor, because a payment needs it. The PayPal advertising tag, which measures our campaigns, runs only after you accept Advertising vendors in our consent banner. Change your choice at any time in Privacy Preferences. Read how PayPal handles data in the PayPal Privacy Statement for your country.

Common mistakes with PayPal

Most PayPal setups that reach PayPal before consent load the SDK on every page or keep the advertising tag outside the vendor.

  • The SDK in the site-wide header. A theme or a plugin that prints the SDK on every page loads PayPal on pages where no payment starts. Limit the SDK to the pages with a PayPal button.
  • Pay Later messages on content pages. Pay Later messaging comes from the same SDK, so a message on a blog post or a landing page loads PayPal there. Show the messages only on product, cart, and checkout pages.
  • The SDK inside a vendor. An SDK behind an Advertising or a Functionality vendor leaves visitors who decline without the PayPal buttons at checkout. Load the SDK directly on payment pages, and keep only the advertising tag in the vendor.
  • The advertising tag in Essential. An Essential vendor runs for every visitor on every page, whatever the answer. Keep the vendor in Advertising, and compare the groups with Choose a Vendor Category.
  • A second copy from the plugin. A copy from the plugin runs before consent next to the copy in the vendor. Turn off the marketing or advertising option of the plugin, and read what else stays outside the vendor list in Blocking Limits.