Title: Newad Advanced AdTracking
Author: newad
Published: <strong>November 16, 2026</strong>
Last modified: November 16, 2026

---

Search plugins

![](https://s.w.org/plugins/geopattern-icon/newad-advanced-adtracking.svg)

# Newad Advanced AdTracking

 By [newad](https://profiles.wordpress.org/newad/)

[Download](https://downloads.wordpress.org/plugin/newad-advanced-adtracking.1.2.1.zip)

 * [Details](https://wordpress.org/plugins/newad-advanced-adtracking/#description)
 * [Reviews](https://wordpress.org/plugins/newad-advanced-adtracking/#reviews)
 *  [Installation](https://wordpress.org/plugins/newad-advanced-adtracking/#installation)
 * [Development](https://wordpress.org/plugins/newad-advanced-adtracking/#developers)

 [Support](https://wordpress.org/support/plugin/newad-advanced-adtracking/)

## Description

This plugin is an alternative to the subdomain CNAME (`custom_collection_domain`,
configured via
 aat_console) for clients whose Content-Security-Policy blocks `aat.
newad.com.br`. Instead of depending on the client’s own DNS team, the plugin runs
inside WordPress itself: it injects the nwd_aat_tag.js tag pointing to the site’s
own REST routes and proxies collection server-to-server to Newad’s real service.
Since the visitor’s request never leaves the client’s domain, no CSP rule applies
to it.

The plugin does not replace the tag — `nwd_aat_tag.js` is fetched from the upstream
at runtime
 and served verbatim, cached. Funnel classification stays entirely on
Newad’s backend; the plugin is a pure byte proxy.

**REST routes created (namespace `newad-aat/v1`):**

 * `GET /wp-json/newad-aat/v1/collect` — relays `d`/`debug` to `/v1/collect` upstream.
 * `GET /wp-json/newad-aat/v1/tag.js` — serves `nwd_aat_tag.js`, cached (1-hour 
   transient plus a
    persistent “last good” fallback).
 * `GET /wp-json/newad-aat/v1/banner.js` — serves the Newad Consent Manager cookie
   notice,
    cached, only when enabled in the plugin’s settings.
 * `GET /wp-json/newad-aat/v1/proof` — relays the visitor’s consent choice upstream,
   only when
    the Newad Consent Manager is enabled.

All four routes are public and unauthenticated — the same public surface the real
upstream
 endpoints already have (they don’t require authentication either, since
that’s a hard requirement for working as a tracking tag/pixel).

**Admin screen (Settings  Newad AdTracking):**

 * Required “Site code” field (the advertiser’s code at Newad) — while it’s empty,
   no tag is
    injected.
 * `collect_all` toggle (mirrors `window.nwdAatConfig.collect_all`).
 * “Test installation” button — confirms server-side whether a collection event 
   has arrived.
 * “Scan this site” button — looks for an old, hand-pasted Newad tag on the homepage
   and in the
    active theme’s files, and reports the file and line. Read-only; it
   never modifies the site.
 * Read-only catalog of suggested selectors for WooCommerce, Contact Form 7 and 
   Gravity Forms
    (plus a notice for Elementor), to paste as a scenario in the Newad
   console.

### External services

This plugin is the transport layer for the Newad AAT tag — it only exists to talk
to Newad’s
 service at `https://aat.newad.com.br` (operated by Newad, hired by this
site’s administrator). The destination is hard-coded in the plugin: no setting, 
URL parameter or filter can change it. The plugin makes 4 calls to that service,
all through `wp_remote_get()`:

 * **On every site visit** (public route `GET /wp-json/newad-aat/v1/collect`, triggered
   by the
    tag in the visitor’s browser): relays the event payload the tag already
   generated — page visited, referrer, campaign parameters (UTM/click) and a pseudonymous
   visitor identifier (`nwd_uid`, generated by the tag itself; never a name, email
   or ID document). The plugin does not read or alter this payload, it only retransmits
   it.
 * **When the tag script and the cookie notice load** (`/tag.js` and `/banner.js`
   routes, cached
    for up to 1 hour): fetches the files published by Newad. The 
   only data sent is the “Site code” filled in on the plugin’s settings screen —
   it identifies the client’s account at Newad, not the visitor.
 * **When a choice is recorded on the cookie notice** (`/proof` route, only when
   the Newad
    Consent Manager is enabled): relays the visitor’s choice (accepted/
   rejected categories and notice version) as proof of consent.
 * The **“Test installation”** button (admin screen, triggered manually by whoever
   administers
    the site) queries the upstream to confirm whether a collection event
   has arrived.

Privacy policy: https://aat.newad.com.br/privacy/advanced-adtracking
 Terms of use:
https://aat.newad.com.br/terms/advanced-adtracking

## Installation

 1. Upload the `.zip` file under Plugins  Add New  Upload Plugin.
 2. Activate the plugin.
 3. Go to Settings  Newad AdTracking and paste the site code from Newad’s installation
    guide.
 4. Use the “Test installation” button after a real visit to the site.

## FAQ

### There’s already a Newad tag pasted into the theme. Do I need to remove it before installing the plugin?

No. The plugin publishes `window.nwdAatConfig` as a locked property: the old tag
can no longer
 override the collection endpoint and becomes inert (no duplicate 
events). Use “Scan this site” to see where it lives and remove it whenever convenient.
An old tag living inside a Google Tag Manager container stays in the container and
the plugin can’t see it.

### Does this replace the `nwd_aat_tag.js` tag?

No. The tag is fetched from the upstream at runtime and served verbatim — the plugin
only
 changes the transport (same-origin instead of cross-origin), never the tag’s
content or behavior.

### Does the plugin decide what counts as consent?

No. Consent decisions are made by the Newad Consent Manager, when it’s enabled, 
or by the site’s
 own CMP — the tag reads Google Consent Mode v2 from `dataLayer`
on its own. The plugin only relays the cookie notice script and the visitor’s resulting
choice; it never interprets or decides what is or isn’t allowed.

### Does it work with `/v1/imp` (publisher impression pixel)?

That’s not this plugin’s use case — `/v1/imp` is for the publisher’s page (RTB),
not for the
 advertiser’s WordPress site.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Newad Advanced AdTracking” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ newad ](https://profiles.wordpress.org/newad/)

[Translate “Newad Advanced AdTracking” into your language.](https://translate.wordpress.org/projects/wp-plugins/newad-advanced-adtracking)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/newad-advanced-adtracking/),
check out the [SVN repository](https://plugins.svn.wordpress.org/newad-advanced-adtracking/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/newad-advanced-adtracking/)
by [RSS](https://plugins.trac.wordpress.org/log/newad-advanced-adtracking/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.2.1

 * Settings screen: the JavaScript now ships as a static file loaded with `wp_enqueue_script()`
   
   instead of an inline `<script>` block.
 * Plugin header: the description is a single, complete line.

#### 1.2.0

 * Newad Consent Manager: relays the cookie notice and the proof of choice through
   the site
    itself.

#### 1.1.0

 * The tag’s config is now published locked (`Object.defineProperty`): an old manual
   snippet,
    before or after the plugin, no longer overrides the collection endpoint.
 * New “Scan this site” button: finds the old tag in the HTML and theme files (read-
   only) and
    runs on its own the first time the admin screen opens after activation.

#### 1.0.0

 * Initial release: automatic tag injection, same-origin proxy for `/v1/collect`
   and
    nwd_aat_tag.js, installation diagnostics and a suggested selector catalog.

## Meta

 *  Version **1.2.1**
 *  Last updated **24 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 5.6 or higher **
 *  Tested up to **7.1.4**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [analytics](https://wordpress.org/plugins/tags/analytics/)[csp](https://wordpress.org/plugins/tags/csp/)
   [gtm](https://wordpress.org/plugins/tags/gtm/)[pixel](https://wordpress.org/plugins/tags/pixel/)
   [tracking](https://wordpress.org/plugins/tags/tracking/)
 *  [Advanced View](https://wordpress.org/plugins/newad-advanced-adtracking/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/newad-advanced-adtracking/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/newad-advanced-adtracking/reviews/)

## Contributors

 *   [ newad ](https://profiles.wordpress.org/newad/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/newad-advanced-adtracking/)