When to use this
Saving gclid on an Aesthera lead is optional and separate from firing the Google Ads conversion tag on your website. Use it when your lead or CRM workflow needs the click ID. Aesthera enables capture for the clinic, and your developer connects the website’s consent signal.
Connect the consent signal
Add this function to the website containing the widget. Call it with the advertising-consent boolean from your consent tool when that state is known and whenever it changes. Defining the function alone does not connect it to your consent tool.
function updateAestheraConsent(advertisingAllowed) {
window.aestheraAdAttributionConsent = advertisingAllowed === true;
window.dispatchEvent(
new Event('aesthera:ad-attribution-consent-changed')
);
}
// In your consent tool’s initial-state and change callbacks:
// updateAestheraConsent(advertisingAllowed);When capture is allowed
Pass false when consent is denied or revoked. This Aesthera hook does not configure Google Consent Mode or replace your website’s consent tool. Preserve click IDs through redirects and navigation to the widget page. Aesthera does not recover a click ID from a previous page.
- The tracked embed is installed on an approved website and Aesthera has enabled click ID capture.
- A valid gclid is present in the URL of the page containing the widget.
- The website has set window.aestheraAdAttributionConsent to true based on the visitor’s advertising consent.
Developer verification
On an approved test page, add ?gclid=qa-click-id to the URL. With capture enabled and consent granted, a test submission should include embed_attribution.gclid in the contact-info request. Repeat with denied consent and with consent revoked before submission; gclid should be absent. This dummy value tests capture, not Google Ads attribution.
Include it in your CRM payload
Ask for gclid in the agreed custom webhook mapping. It can be empty when no click ID was captured. Providing the field to a CRM does not automatically import offline conversions into Google Ads.