Hi,
for a few clients we're keen on updating their existing Google Ads tracking with an extra parameter to separate "new customers" from existing ones. I understand we need to update the checkout GTAG with one line of code, but obviously, we need to have a variable that triggers the right boolean value.
https://support.google.com/google-ads/answer/9918441?hl=en#:~:text=Getting%20started%20in%20Google%2...
1) is this possible ?
2) if yes, how would you upgrade the existing GTAG implementation:
<!-- Global Site Tag (gtag.js) - Google AdWords: xxxxxx -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-xxxxx"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'AW-xxxxx', {'send_page_view': false});
</script>
{% if first_time_accessed %}
<script>
gtag('event', 'conversion', {
'send_to': 'AW-xxxx/xxxx',
'value': {{ checkout.subtotal_price | money_without_currency }},
'currency': '{{ shop.currency }}',
'transaction_id': '{{ order_number }}'
});
</script>
{% endif %}
Thanks a lot for your input!
User | Count |
---|---|
24 | |
20 | |
17 | |
16 | |
15 |