Improve cross-domain tracking and add "Always" script category
Move linker config into gtag('config') call with accept_incoming and
decorate_forms for reliable cross-domain linking. Capture _gl parameter
in sessionStorage to preserve attribution across navigation. Add
referrer-based attribution replay fallback so GA4 reports source/medium
instead of (not set) when UTMs are absent. Add "Always" script category
that executes without waiting for consent.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.att-cc-badge--always { background: #4CAF50; }
|
||||
.att-cc-badge--functional { background: #2196F3; }
|
||||
.att-cc-badge--analytics { background: #FF9800; }
|
||||
.att-cc-badge--marketing { background: #9C27B0; }
|
||||
|
||||
@@ -82,11 +82,12 @@ $scripts = ATT_Consent_Scripts_Manager::get_all_scripts();
|
||||
<th><label for="att-cc-script-category"><?php esc_html_e( 'Category', 'att-consent' ); ?></label></th>
|
||||
<td>
|
||||
<select id="att-cc-script-category" name="category">
|
||||
<option value="always"><?php esc_html_e( 'Always', 'att-consent' ); ?></option>
|
||||
<option value="functional"><?php esc_html_e( 'Functional', 'att-consent' ); ?></option>
|
||||
<option value="analytics" selected><?php esc_html_e( 'Analytics', 'att-consent' ); ?></option>
|
||||
<option value="marketing"><?php esc_html_e( 'Marketing', 'att-consent' ); ?></option>
|
||||
</select>
|
||||
<p class="description"><?php esc_html_e( 'The script will only execute after the visitor consents to this category.', 'att-consent' ); ?></p>
|
||||
<p class="description"><?php esc_html_e( '"Always" scripts run on every page load without waiting for consent. Other categories execute only after the visitor consents.', 'att-consent' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user