Add cross-domain tracking support (v1.2.0)

Add linker domains setting to Advanced tab for cross-domain measurement.
Outputs gtag('set','linker') before config call so GA4 appends the _gl
parameter to links pointing at configured domains.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-04 13:33:30 +00:00
parent 2294c8eda7
commit 868ed867e2
5 changed files with 41 additions and 5 deletions

View File

@@ -55,6 +55,20 @@ if ( ! defined( 'ABSPATH' ) ) {
</p>
</td>
</tr>
<tr>
<th scope="row">
<label for="cross_domain_domains"><?php esc_html_e( 'Cross-Domain Tracking', 'att-consent' ); ?></label>
</th>
<td>
<textarea name="cross_domain_domains" id="cross_domain_domains" rows="4" class="large-text code"><?php echo esc_textarea( $settings['cross_domain_domains'] ); ?></textarea>
<p class="description">
<?php esc_html_e( 'Enter one domain per line for cross-domain measurement. The linker parameter will be appended to URLs pointing to these domains, allowing unified user tracking across sites.', 'att-consent' ); ?>
</p>
<p class="description">
<?php esc_html_e( 'Example: bookingengine.myguestdiary.com', 'att-consent' ); ?>
</p>
</td>
</tr>
</table>
<h2><?php esc_html_e( 'Google Consent Mode v2 Signal Reference', 'att-consent' ); ?></h2>