Adding the AdXensor script
- functions.php (recommended)
- header.php
This method adds the AdXensor script tag to every page of your site via Replace
wp_enqueue_scripts.1
Open your theme's functions.php
Go to Appearance → Theme File Editor in the WordPress admin, or edit the file directly via SFTP/SSH:
2
Add the following snippet
pub-XXXXXXXX with your Site ID.Placing ad slots
Once the script is loaded, place<ins> tags anywhere in your theme or page content.
- Theme template file
- Block editor (Gutenberg)
Common ad placements
Responsive ads
Usedata-ad-format="auto" to let AdXensor automatically pick the best size for the visitor’s device:
WooCommerce
AdXensor slots work on WooCommerce pages the same way as regular WordPress pages. Add slots using the Custom HTML block in WooCommerce page templates or use hooks:Verifying the integration
1
Visit your website
Visit your website in a browser.
2
Open DevTools and filter by adxensor
Open DevTools → Network and filter by
adxensor.3
Check the requests
You should see a request to
cdn.adxensor.com/tag.js and then to core.adxensor.com/v1/ad.4
Confirm in the dashboard
In the AdXensor Publisher Dashboard, go to My Sites → [Your Site] → Statistics and confirm that pageview events appear within a few minutes.
Troubleshooting
→ Full troubleshooting guide