Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Track Google Ads conversions with CAOS for WordPress
* @formatter:off
* Plugin Name: Google Ads for CAOS
* Plugin URI:
* Description: Track Google Ads conversions with CAOS.
* Version: 1.0.0
* Author: Daan van den Bergh
* Author URI:
* License: GPL2v2 or later
* @formatter:on
if (!defined('ABSPATH')) {
* Replace 'YOUR-ADS-ID' with, well, your Google Ads ID.
function caos_google_ads()
$adsId = 'YOUR-ADS-ID';
if (CAOS_OPT_REMOTE_JS_FILE == 'gtag.js') {
function() use ($adsId) {
return "gtag('config', '$adsId');";
add_action('caos_process_settings', 'caos_google_ads');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.