{"id":399629,"date":"2026-11-16T22:35:51","date_gmt":"2026-11-16T22:35:51","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/newad-advanced-adtracking\/"},"modified":"2026-11-16T22:35:26","modified_gmt":"2026-11-16T22:35:26","slug":"newad-advanced-adtracking","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/newad-advanced-adtracking\/","author":23599963,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.2.1","stable_tag":"1.2.1","tested":"7.1.4","requires":"5.6","requires_php":"7.4","requires_plugins":null,"header_name":"Newad Advanced AdTracking","header_author":"Ricardo Shiro - Newad","header_description":"Injects the Newad AAT tag and proxies data collection same-origin through WordPress, for sites whose CSP blocks aat.newad.com.br.","last_updated":"2026-11-16 22:35:26","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/aat.newad.com.br","header_author_uri":"https:\/\/newad.com.br","rating":0,"author_block_rating":0,"active_installs":0,"downloads":51,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.2.1":{"tag":"1.2.1","author":"newad","date":"2026-11-16 22:35:26","revision":3806201}},"upgrade_notice":[],"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.2.1"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[232,19966,23295,28464,550],"plugin_category":[36],"plugin_contributors":[293276],"plugin_business_model":[],"class_list":["post-399629","plugin","type-plugin","status-publish","hentry","plugin_tags-analytics","plugin_tags-csp","plugin_tags-gtm","plugin_tags-pixel","plugin_tags-tracking","plugin_category-analytics","plugin_contributors-newad","plugin_committers-newad"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/newad-advanced-adtracking.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin is an alternative to the subdomain CNAME (<code>custom_collection_domain<\/code>, configured via\naat_console) for clients whose Content-Security-Policy blocks <code>aat.newad.com.br<\/code>. Instead of\ndepending on the client's own DNS team, the plugin runs inside WordPress itself: it injects the\n    nwd_aat_tag.js tag pointing to the site's own REST routes and proxies collection\nserver-to-server to Newad's real service. Since the visitor's request never leaves the client's\ndomain, no CSP rule applies to it.<\/p>\n\n<p>The plugin does not replace the tag \u2014 <code>nwd_aat_tag.js<\/code> is fetched from the upstream at runtime\nand served verbatim, cached. Funnel classification stays entirely on Newad's backend; the plugin\nis a pure byte proxy.<\/p>\n\n<p><strong>REST routes created (namespace <code>newad-aat\/v1<\/code>):<\/strong><\/p>\n\n<ul>\n<li><code>GET \/wp-json\/newad-aat\/v1\/collect<\/code> \u2014 relays <code>d<\/code>\/<code>debug<\/code> to <code>\/v1\/collect<\/code> upstream.<\/li>\n<li><code>GET \/wp-json\/newad-aat\/v1\/tag.js<\/code> \u2014 serves <code>nwd_aat_tag.js<\/code>, cached (1-hour transient plus a\npersistent \"last good\" fallback).<\/li>\n<li><code>GET \/wp-json\/newad-aat\/v1\/banner.js<\/code> \u2014 serves the Newad Consent Manager cookie notice,\ncached, only when enabled in the plugin's settings.<\/li>\n<li><code>GET \/wp-json\/newad-aat\/v1\/proof<\/code> \u2014 relays the visitor's consent choice upstream, only when\nthe Newad Consent Manager is enabled.<\/li>\n<\/ul>\n\n<p>All four routes are public and unauthenticated \u2014 the same public surface the real upstream\nendpoints already have (they don't require authentication either, since that's a hard\nrequirement for working as a tracking tag\/pixel).<\/p>\n\n<p><strong>Admin screen (Settings \u2192 Newad AdTracking):<\/strong><\/p>\n\n<ul>\n<li>Required \"Site code\" field (the advertiser's code at Newad) \u2014 while it's empty, no tag is\ninjected.<\/li>\n<li><code>collect_all<\/code> toggle (mirrors <code>window.nwdAatConfig.collect_all<\/code>).<\/li>\n<li>\"Test installation\" button \u2014 confirms server-side whether a collection event has arrived.<\/li>\n<li>\"Scan this site\" button \u2014 looks for an old, hand-pasted Newad tag on the homepage and in the\nactive theme's files, and reports the file and line. Read-only; it never modifies the site.<\/li>\n<li>Read-only catalog of suggested selectors for WooCommerce, Contact Form 7 and Gravity Forms\n(plus a notice for Elementor), to paste as a scenario in the Newad console.<\/li>\n<\/ul>\n\n<h3>External services<\/h3>\n\n<p>This plugin is the transport layer for the Newad AAT tag \u2014 it only exists to talk to Newad's\nservice at <code>https:\/\/aat.newad.com.br<\/code> (operated by Newad, hired by this site's administrator).\nThe destination is hard-coded in the plugin: no setting, URL parameter or filter can change it.\nThe plugin makes 4 calls to that service, all through <code>wp_remote_get()<\/code>:<\/p>\n\n<ul>\n<li><strong>On every site visit<\/strong> (public route <code>GET \/wp-json\/newad-aat\/v1\/collect<\/code>, triggered by the\ntag in the visitor's browser): relays the event payload the tag already generated \u2014 page\nvisited, referrer, campaign parameters (UTM\/click) and a pseudonymous visitor identifier\n(<code>nwd_uid<\/code>, generated by the tag itself; never a name, email or ID document). The plugin does\nnot read or alter this payload, it only retransmits it.<\/li>\n<li><strong>When the tag script and the cookie notice load<\/strong> (<code>\/tag.js<\/code> and <code>\/banner.js<\/code> routes, cached\nfor up to 1 hour): fetches the files published by Newad. The only data sent is the \"Site code\"\nfilled in on the plugin's settings screen \u2014 it identifies the client's account at Newad, not\nthe visitor.<\/li>\n<li><strong>When a choice is recorded on the cookie notice<\/strong> (<code>\/proof<\/code> route, only when the Newad\nConsent Manager is enabled): relays the visitor's choice (accepted\/rejected categories and\nnotice version) as proof of consent.<\/li>\n<li>The <strong>\"Test installation\"<\/strong> button (admin screen, triggered manually by whoever administers\nthe site) queries the upstream to confirm whether a collection event has arrived.<\/li>\n<\/ul>\n\n<p>Privacy policy: https:\/\/aat.newad.com.br\/privacy\/advanced-adtracking\nTerms of use: https:\/\/aat.newad.com.br\/terms\/advanced-adtracking<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>.zip<\/code> file under Plugins \u2192 Add New \u2192 Upload Plugin.<\/li>\n<li>Activate the plugin.<\/li>\n<li>Go to Settings \u2192 Newad AdTracking and paste the site code from Newad's installation guide.<\/li>\n<li>Use the \"Test installation\" button after a real visit to the site.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"there%27s%20already%20a%20newad%20tag%20pasted%20into%20the%20theme.%20do%20i%20need%20to%20remove%20it%20before%20installing%20the%20plugin%3F\"><h3>There's already a Newad tag pasted into the theme. Do I need to remove it before installing the plugin?<\/h3><\/dt>\n<dd><p>No. The plugin publishes <code>window.nwdAatConfig<\/code> as a locked property: the old tag can no longer\noverride the collection endpoint and becomes inert (no duplicate events). Use \"Scan this site\" to\nsee where it lives and remove it whenever convenient. An old tag living inside a Google Tag\nManager container stays in the container and the plugin can't see it.<\/p><\/dd>\n<dt id=\"does%20this%20replace%20the%20%60nwd_aat_tag.js%60%20tag%3F\"><h3>Does this replace the `nwd_aat_tag.js` tag?<\/h3><\/dt>\n<dd><p>No. The tag is fetched from the upstream at runtime and served verbatim \u2014 the plugin only\nchanges the transport (same-origin instead of cross-origin), never the tag's content or\nbehavior.<\/p><\/dd>\n<dt id=\"does%20the%20plugin%20decide%20what%20counts%20as%20consent%3F\"><h3>Does the plugin decide what counts as consent?<\/h3><\/dt>\n<dd><p>No. Consent decisions are made by the Newad Consent Manager, when it's enabled, or by the site's\nown CMP \u2014 the tag reads Google Consent Mode v2 from <code>dataLayer<\/code> on its own. The plugin only\nrelays the cookie notice script and the visitor's resulting choice; it never interprets or\ndecides what is or isn't allowed.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20%60%2Fv1%2Fimp%60%20%28publisher%20impression%20pixel%29%3F\"><h3>Does it work with `\/v1\/imp` (publisher impression pixel)?<\/h3><\/dt>\n<dd><p>That's not this plugin's use case \u2014 <code>\/v1\/imp<\/code> is for the publisher's page (RTB), not for the\nadvertiser's WordPress site.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.2.1<\/h4>\n\n<ul>\n<li>Settings screen: the JavaScript now ships as a static file loaded with <code>wp_enqueue_script()<\/code>\ninstead of an inline <code>&lt;script&gt;<\/code> block.<\/li>\n<li>Plugin header: the description is a single, complete line.<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>Newad Consent Manager: relays the cookie notice and the proof of choice through the site\nitself.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>The tag's config is now published locked (<code>Object.defineProperty<\/code>): an old manual snippet,\nbefore or after the plugin, no longer overrides the collection endpoint.<\/li>\n<li>New \"Scan this site\" button: finds the old tag in the HTML and theme files (read-only) and\nruns on its own the first time the admin screen opens after activation.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release: automatic tag injection, same-origin proxy for <code>\/v1\/collect<\/code> and\n  nwd_aat_tag.js, installation diagnostics and a suggested selector catalog.<\/li>\n<\/ul>","raw_excerpt":"Injects the Newad AAT tag and proxies collection same-origin, for sites whose CSP blocks Newad's default collection domain (aat.newad.com.br).","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/399629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=399629"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/newad"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=399629"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=399629"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=399629"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=399629"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=399629"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=399629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}