Ad Code Management

Welcome to the NZRT Wiki Podcast. Today we’re looking at Ad Code Management.

So, if you’ve ever wondered how NZRT brings advertising into its WordPress site, this episode walks you through exactly that. Advertising is one of the ways NZRT generates revenue, and managing ad code properly keeps things running smoothly without hurting the experience for your visitors.

Let’s start with how ads actually get onto the site. There are four main ways to integrate ad code into a WordPress setup. The first is through the header or footer of the theme. This is what you’d call a global placement — any code you drop in there runs across every page on the site. The second method is placing ads within the content itself, so they appear inside posts as readers scroll through. Third, you can use sidebar widgets to display ads in the sidebars of pages. And fourth, there are dedicated ad plugins. NZRT uses plugins like Ad Inserter, AdThrive, and Mediavine depending on the situation — these give you more fine-grained control over where and when ads appear.

Now, where does all that ad code actually live? NZRT stores ad codes securely in a file called Ad code dot m d, found inside the Text folder. That file is the central reference point for everything ad-related. It holds the Google AdSense code, any codes from direct advertisers NZRT works with, custom tracking pixels for monitoring ad performance, and consent or privacy scripts that need to load alongside the ads.

Speaking of privacy — this is a big one. Ad compliance isn’t optional, and there are a few things you always need to keep in mind. You must include privacy notices and opt-out links so your visitors know what data is being collected and how they can say no. You need to respect GDPR and CCPA regulations — these are the major privacy laws covering users in Europe and California respectively, and they apply regardless of where your site is hosted if you’re serving visitors in those regions. If you’re running sponsored content, you need to disclose it clearly — there’s no hiding that something is a paid placement. And finally, cookie consent management needs to be in place, because most ad networks use cookies to track and target users.

Within the NZRT context, ad code management sits with the site admin, which is xc. The goal is straightforward — ads bring in revenue while keeping the site experience as clean and trustworthy as possible for visitors. It’s a balancing act, and having everything centralised in that Ad code file means there’s always one place to go when something needs updating or auditing.

If you want to dig deeper, there are two related areas worth looking at. The Security Overview note covers how sensitive code and credentials are handled across the site more broadly, and the NZRT Site Overview gives you the bigger picture of how all the moving parts of the WordPress setup fit together.

That’s it for this episode of the NZRT Wiki Podcast. Thanks for listening.