Enhanced conversions is an added feature that you turn on for each of your conversion tracking measurements that you setup in Google Ads. Each conversion tag that you setup can have the Enhanced conversion added to it.
When you turn on this feature for any individual conversion tracking tag, you are passing hashed customer data such as email, address, and phone number of the customer that converted.
Google then can use that hashed data to matchup the person that converted on your store with their Google Account. This lets Google learn more about that customers purchases and thus helps you to target them with better converting Ads in the future.
π Important: Setup your conversion tracking tag first then come back to this article. https://docs.evolutionx.io/en/articles/3560711-adwords-conversion-tracking-setup-google-adwords-google-tag-manager
π Note: Once you have accepted the Terms of Service, it can take up to 5 days for your Google Tag Manager account to be enabled for enhanced conversions. Make sure your conversion tracking tag is set up in Google Tag Manager and then check back in 5 days to see the enhanced conversions functionality enabled. Google's documentation
Custom Javascript ( user_data variable )
function () {
var userData;
for (var i = 0; i < window.dataLayer.length; i++) {
if (window.dataLayer[i].email) {
userData = i;
}
};
return {
"email": window.dataLayer[userData].email,
"phone_number": window.dataLayer[userData].phone_number,
"address": {
"first_name":window.dataLayer[userData].name.first_name,
"last_name":window.dataLayer[userData].name.last_name,
"street":window.dataLayer[userData].address.street,
"city":window.dataLayer[userData].address.city,
"region":window.dataLayer[userData].address.state,
"postal_code":window.dataLayer[userData].address.postcode,
"country":window.dataLayer[userData].address.country
}
}
}