Skip to main content

Advertising Best Practices

  • Start building your advertising components early. Typically we see ad integrations take a lot of time because they need to be tested thoroughly to ensure they are working and configured properly.

  • Try to reduce the number of ad components you make. If you use multiple ad services then create only one component for each ad service. This will increase reusability and reduce the size of your bundles.

  • Use the this.props.isAdmin to check whether or not you are in the PageBuilder admin and then display a placeholder for ad slot units in PageBuilder Editor preview window. Doing so prevents preview in PageBuilder Editor from skewing your advertising data.

  • Only load you advertiser scripts when there are ads on the page. That means appending them to the DOM once the component has mounted rather than including them in your layout or output type files.

  • Store ad configurations that don't change often in site properties

  • Ensure your ads are AMP-compatible if possible.

  • If you have GDPR requirements to turn off tracking make sure tracking is also turned off in your advertisements if there is a way to pass in a flag to disable analytics there.